ruckard

Zignaly Tutorial

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:
  • 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.

SETTINGS
__ SETTINGS - Capital
  • (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'.

__ SETTINGS - Misc
  • (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}.
__ SETTINGS - Zignaly
  • (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'.
__ SETTINGS - Strategy
  • (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}.

DEFAULT SETTINGS

By default this strategy has been setup with these beginner settings:
  • '(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)
but you can change those settings if needed.


FIRST STEP
  • 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.

RECOMMENDED SETTINGS
__ RECOMMENDED SETTINGS - Spot markets
  • '(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'
__ RECOMMENDED SETTINGS - Future markets
  • '(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.
__ RECOMMENDED SETTINGS - Signal Providers
  • '(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.
__ RECOMMENDED SETTINGS - Copy Trader Providers
  • '(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.

INTEGRATION TYPE EXPLANATION
  • '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.

HOW TO USE THIS STRATEGY
  • 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.


ALERTS SETUP
This is the important piece of information that allows you to connect TradingView to Zignaly in a semi-automatic manner.
__ ALERTS SETUP - WebHook
  • Webhook URL: https : // zignaly . com / api / signals.php?key=MYSECRETKEY
  • Message: { {{strategy.order.alert_message}} , "key" : "MYSECRETKEY" }
__ ALERTS SETUP - Email
  • 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


'(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.

STRATEGY ADVICE
  • If you turn on 'Take Profit' then turn off 'Trailing Take Profit'.

ZIGNALY SIDE ADVICE
  • 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'.

ADDITIONAL ZIGNALY DOCUMENTATION
  • docs . zignaly . com / signals / how-to -- How to send signals to Zignaly
  • 3 Ways to send signals to Zignaly
  • SIGNALS

FINAL REMARKS
  • This strategy tries to match the Pine Script Coding Conventions as best as possible.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?