TradingView
jason5480
Sep 6, 2023 10:25 PM

Signal Adapter 

Ethereum / TetherUSBinance

Description

This Signal Adapter script can compose a signal based on inputs from other simple (non-signal) indicators and can forwards it to the "Template Trailing Strategy".
It allows the user to combine up to eight external inputs and define the conditions that will trigger the start, end, cancel start and cancel end deals.
A signal will be composed from those user-defined conditions. The "indicator on indicator" feature is needed so you can forward the resulted signal to the "Template Trailing Strategy".
Thus you should be Plus or Premium user to get it's full potential. It is very convenient for those who want to create a strategy without coding their own signal indicator and for those
who want to fast prototype various ideas based on simple conditions.

Release Notes


  • Added the 'barssince' option for cancelation conditions. This option can be used when you use limit, stop, or stop limit orders on the "Template Trailing Strategy" side and you want to cancel e.g. the limit entry if a number of bars have been passed and your order wasn't triggered.
  • Simple alerts on each condition so the users that do not have the "indicator on indicator" feature to connect the produced signal to the "Template Trailing Strategy" can also benefit from this script and get a notification based on their custom logic


P.S. I want to thank user @upslidedown who reminded me how useful this script had been in general. This persuaded me to publish it even if I had created it several months ago.
Comments
RedKTrader
Valuable pieces of work.. thank you for sharing
jason5480
Thank you very much @RedKTrader! Means a lot for me to have the support of a valuable member of this community.
MXWLL-Capital-Trading
Nice work
jason5480
@MXWLL-Capital-Trading, Thank you very much for your contribution! I hope you find this script useful.
PineCoders
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
MasBart
Thanks. Could the script modified to include some AND conditions ? for example signal1 will be triggered if conditions 1,2,3 applies?
jason5480
Hello @MasBart, you can achieve what you want if you combine two instances of this script with the "Signal Composer" script. The concept is that you can create two signals using the "Signal Adapter" and then connect them both to the "Signal Composer" using the "any" condition. Then forward the composed signal from the "Signal Composer" script to the "Template Trailing Strategy" script and set the rest of the strategy settings to get your backtest results and alerts.
MasBart
@jason5480, got it, thanks. Just test it with 2 Signal Adapters, and will play with it more.
jason5480
@MasBart, I meant using the "all" -> AND condition not "any" -> OR in the "Signal Composer", but I am sure you got my point :D
erfaneini
Tnx
More