Cipher_B (Finandy support)

In this version of the script you can force to cancel your position after some amount of time indepedently on price action. For example, your bot open a short position with SL=1% and TP=2.4% but price did not reach any of this level over the course of to say 8 hours. In this case, position will be closed regardless of the price.
Other interesting features are volume and slope filters. Slope is essentially a derivative of price action. If you don't like to buy your instrument under high volatility, for example, if a trend goes down too fast then you can filter long position which could be opened according to the strategy. Same thing for volume filter. If the volume is too high/too low, you might want to escape such setup in your trading strategy.
Moreover, you can tune price shift for opening position. To say, if you believe that the signal for opening position comes too early everytime, you can force the strategy to buy at 1% lower price than the current price when the signal comes. Similar logic for short: open position price will be always higher than the price of the signal. If the price did not reach such level then position will be automatically cancel with a new signal arrival. Check the backtesting results to understand better the logic.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?