Hi- I tried zeroline.assignvaluecolor etc and even assign assignpricecolor etc. for this zeroline script below, and all I get is a green line whether the candle is above or below the zeroline (which should be green or red depending on the location of candle close. Also is there a way to code the zeroline to not require checking the left axis box. Thanks for any help. :
TOS stock script requires checking the left axis box :
plot Zero = 0;
Zero.setPaintingStrategy(paintingStrategy.LINE);
zero.setdefaultColor(color.light_gray);
My attempt :
zeroline.assignvaluecolor( if close > zeroline then color.green else color.red);
assignPriceColor( if close > zeroline then color.green else color.red);
I don't know how to code to use the right axis instead of requiring checking left axis box
Thanks,
TOS stock script requires checking the left axis box :
plot Zero = 0;
Zero.setPaintingStrategy(paintingStrategy.LINE);
zero.setdefaultColor(color.light_gray);
My attempt :
zeroline.assignvaluecolor( if close > zeroline then color.green else color.red);
assignPriceColor( if close > zeroline then color.green else color.red);
I don't know how to code to use the right axis instead of requiring checking left axis box
Thanks,