Buy Script:
INPUTS: @periods(10), @strength(1),@price(close), @regression(21)
SET A = SuperTrend(@periods, @strength)
SET PLOTCOLOR1 = IF(A > CLOSE, COLOR_LIGHT_RED, COLOR_LIGHT_GREEN)
set Reg = Forecast(@price, @regression)
CROSSOVER(CLOSE, A)
CROSSOVER(Reg, A)
Sell Script:
SET A = SuperTrend(@periods, @strength)
SET PLOTCOLOR1 = IF(A > CLOSE, COLOR_LIGHT_RED, COLOR_LIGHT_GREEN)
set Reg = Forecast(@price, @regression)
CROSSOVER(A, CLOSE)
CROSSOVER(A,Reg)