I wanna first paint bars green if sma is moving up, vice versa red, i think below sytax works
SMA.AssignValueColor(if sma < sma[1] then COLOR.RED else if sma > sma[1] then COLOR.GREEN else COLOR.gray);
Then i wanna define if current close>highest(high[1],10), then paint green, if current close<lowest(low[1],10), then paint red, no matter what corlors it is ALREADY painted. In other words, if SMA is moving down, the bars should be painted red, but as long as the current close >(high[1],10), then i need the bar to paint green. If current close NEITHER meet close>highest(high[1],1) OR current close<lowest(low[1],10), then just keep the current color wihch follow s the SMA.
May i know if it is possible to write this script?
SMA.AssignValueColor(if sma < sma[1] then COLOR.RED else if sma > sma[1] then COLOR.GREEN else COLOR.gray);
Then i wanna define if current close>highest(high[1],10), then paint green, if current close<lowest(low[1],10), then paint red, no matter what corlors it is ALREADY painted. In other words, if SMA is moving down, the bars should be painted red, but as long as the current close >(high[1],10), then i need the bar to paint green. If current close NEITHER meet close>highest(high[1],1) OR current close<lowest(low[1],10), then just keep the current color wihch follow s the SMA.
May i know if it is possible to write this script?