OPEN-SOURCE SCRIPT

polynomic_stop

2451
A strategy with a trailing stop in the form of a polynomial function. The entry is made at the intersection of a simple sliding closing candle. At the moment of entering the position, it is fixed by the value of the Minimum for the period. After entering the position, a trailing stop of the form is activated: Min + D * N^a, where Min is the minimum for the period fixed at the time of entering the position, D is the decrement, N is the number of bars in the position and a is the degree of the polynomial. At the moment when the trailing stop crosses the candle closing from the bottom up , the transaction is closed. The degree of a polynomial can be taken as integers and fractional numbers

Disclaimer

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.