This strategy serves as a beginner's guide to connect TradingView signals to Zignaly Crypto Trading Platform.
It was originally tested at BTCUSDT pair and 1D timeframe.
Before using this documentation it's recommended that you: [LIST] * Use default TradingView strategy script or another script and setup its associated alert manually. Just make the alert pop-up in the screen. * Create a 'Copy-Trader provider' (or Signal Provider) in Zignaly and send signals to it either thanks to your browser or with some basic programming. [/LIST]
[B]SETTINGS[/B] [B]__ SETTINGS - Capital[/B] [LIST] * (CAPITAL) Capital quote invested per order in USDT units {100.0}. This setting is only used when '(ZIG) Provider type' is set to 'Signal Provider'. * (CAPITAL) Capital percentage invested per order (%) {25.0}. This setting is only used when '(ZIG) Provider type' is set to 'Copy Trader Provider'. [/LIST]
[B]__ SETTINGS - Misc[/B] [LIST] * (ZIG) Enable Alert message {True}: Whether to enable alert message or not. * (DEBUG) Enable debug on order comments {True}: Whether to show alerts on order comments or not. * Number of decimal digits for Prices {2}. * (DECIMAL) Maximum number of decimal for contracts {3}. [/LIST] [B]__ SETTINGS - Zignaly[/B] [LIST] * (ZIG) Integration type {TradingView only}: Hybrid: Both TradingView and Zignaly handle take profit, trailing stops and stop losses. Useful if you are scared about TradingView not firing an alert. It might arise problems if TradingView and Zignaly get out of sync. TradingView only: TradingView sends entry and exit orders to Zignaly so that Zignaly only buys or sells. Zignaly won't handle stop loss or other settings on its own. * (ZIG) Zignaly Alert Type {WebHook}: 'Email' or 'WebHook'. * (ZIG) Provider type {Copy Trader Provider}: 'Copy Trader Provider' or 'Signal Provider'. 'Copy Trader Provider' sends a percentage to manage. 'Signal Provider' sends a quote to manage. * (ZIG) Exchange: 'Binance' or 'Kucoin'. * (ZIG) Exchange Type {Spot}: 'Spot' or 'Futures'. * (ZIG) Leverage {1}. Set it to '1' when '(ZIG) Exchange Type' is set to 'Spot'. [/LIST] [B]__ SETTINGS - Strategy[/B] [LIST] * (STRAT) Strategy Type: 'Long and Short', 'Long Only' or 'Short Only'. * (STOPTAKE) Take Profit? {false}: Whether to enable Take Profit. * (STOPTAKE) Stop Loss? {True}: Whether to enable Stop Loss. * (TRAILING) Enable Trailing Take Profit (%) {True}: Whether to enable Trailing Take Profit. * (STOPTAKE) Take Profit % {3.0}: Take profit percentage. This setting is only used when '(STOPTAKE) Take Profit?' setting is set to true. * (STOPTAKE) Stop Loss % {2.0}: Stop loss percentage. This setting is only used when '(STOPTAKE) Stop Loss?' setting is set to true. * (TRAILING) Trailing Take Profit Trigger (%) {2.5}: Trailing Stop Trigger Percentage. This setting is only used when '(TRAILING) Enable Trailing Take Profit (%)' setting is set to true. * (TRAILING) Trailing Take Profit as a percentage of Trailing Take Profit Trigger (%) {25.0}: Trailing Stop Distance Percentage. This setting is only used when '(TRAILING) Enable Trailing Take Profit (%)' setting is set to true. * (RECENT) Number of minutes to wait to open a new order after the previous one has been opened {6}. [/LIST]
[B]DEFAULT SETTINGS[/B]
By default this strategy has been setup with these beginner settings: [LIST] * '(ZIG) Integration type' : TradingView only * '(ZIG) Provider type' : 'Copy Trader Provider' * '(ZIG) Exchange' : 'Binance' * '(ZIG) Exchange Type' : 'Spot' * '(STRAT) Strategy Type' : 'Long Only' * '(ZIG) Leverage' : '1' (Or no leverage) [/LIST] but you can change those settings if needed.
[B]FIRST STEP[/B] [LIST] * For both future of spot markets you should make sure to change '(ZIG) Zignaly Alert Type' to match either WebHook or Email. If you have a non paid account in TradingView as in October 2020 you would have to use Email which it's free to use. [/LIST]
[B]RECOMMENDED SETTINGS[/B] [B]__ RECOMMENDED SETTINGS - Spot markets[/B] [LIST] * '(ZIG) Exchange Type' setting should be set to 'Spot' * '(STRAT) Strategy Type' setting should be set to 'Long Only' * '(ZIG) Leverage' setting should be set to '1' [/LIST] [B]__ RECOMMENDED SETTINGS - Future markets[/B] [LIST] * '(ZIG) Exchange Type' setting should be set to 'Futures' * '(STRAT) Strategy Type' setting should be set to 'Long and Short' * '(ZIG) Leverage' setting might be changed if desired. [/LIST] [B]__ RECOMMENDED SETTINGS - Signal Providers[/B] [LIST] * '(ZIG) Provider type' setting should be set to 'Signal Provider' * '(CAPITAL) Capital quote invested per order in USDT units' setting might be changed if desired. [/LIST] [B]__ RECOMMENDED SETTINGS - Copy Trader Providers[/B] [LIST] * '(ZIG) Provider type' setting should be set to 'Copy Trader Provider' * '(CAPITAL) Capital percentage invested per order (%)' setting might be changed if desired. * Strategy Properties setting: 'Initial Capital' might be changed if desired. [/LIST]
[B]INTEGRATION TYPE EXPLANATION[/B] [LIST] * 'Hybrid': Both TradingView and Zignaly handle take profit, trailing stops and stop losses. Useful if you are scared about TradingView not firing an alert. It might arise problems if TradingView and Zignaly get out of sync. * 'TradingView only': TradingView sends entry and exit orders to Zignaly so that Zignaly only buys or sells. Zignaly won't handle stop loss or other settings on its own. [/LIST]
[B]HOW TO USE THIS STRATEGY[/B] [LIST] * Beginner: Copy and paste the strategy and change it to your needs. Turn off '(DEBUG) Enable debug on order comments' setting. * Medium: Reuse functions and inputs from this strategy into your own as if it was a library. * Advanced: Check Strategy Tester. List of trades. Copy and paste the different suggested 'alert_message' variable contents to your script. * Expert: I needed a way to pass data from TradingView script to the alert. Now I know it's the 'alert_message' variable. I can do this own my own. [/LIST]
[B] ALERTS SETUP[/B] This is the important piece of information that allows you to connect TradingView to Zignaly in a semi-automatic manner. [B] __ ALERTS SETUP - WebHook[/B] [LIST] * Webhook URL: https : // zignaly . com / api / signals.php?key=MYSECRETKEY * Message: { {{strategy.order.alert_message}} , "key" : "MYSECRETKEY" } [/LIST] [B] __ ALERTS SETUP - Email[/B] [LIST] * Setup a new Hotmail account * Add it as an 'SMS email' in TradingView Profile settings page. * Confirm your own the email address * Create a rule in your Hotmail account that 'Redirects' (not forwards) emails to 'signals @ zignaly . email' when (1): 'Subject' includes 'Alert', (2): 'Email body' contains string 'MYZIGNALYREDIRECTTRIGGER' and (3): 'From' contains 'noreply @ tradingview . com'. * In 'More Actions' check: Send Email-to-SMS * Message: ||{{strategy.order.alert_message}}||key=MYSECRETKEY|| MYZIGNALYREDIRECTTRIGGER [/LIST]
'(DEBUG) Enable debug on order comments' is turned on by default so that you can see in the Strategy Tester. List of Trades. The different orders alert_message that would have been sent to your alert. You might want to turn it off it some many letters in the screen is problem.
[B]STRATEGY ADVICE[/B] [LIST] * If you turn on 'Take Profit' then turn off 'Trailing Take Profit'. [/LIST]
[B]ZIGNALY SIDE ADVICE[/B] [LIST] * If you are a 'Signal Provider' make sure that 'Allow reusing the same signalId if there isn't any open position using it?' setting in the profile tab is set to true. * You can find your 'MYSECRETKEY' in your 'Copy Trader/Signal' provider Edit tab at 'Signal URL'. [/LIST]
[B]ADDITIONAL ZIGNALY DOCUMENTATION[/B] [LIST] * docs . zignaly . com / signals / how-to -- How to send signals to Zignaly * 3 Ways to send signals to Zignaly * SIGNALS [/LIST]
[B]FINAL REMARKS[/B] [LIST] * This strategy tries to match the Pine Script Coding Conventions as best as possible. [/LIST]
قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعدقوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.
هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.