Hello there,
plot OI_NetChg =(open_interest()/open_interest()[1])*100;
OI_NetChg.SetDefaultColor(color.black);
AssignBackgroundColor(if OI_NetChg > 100 then color.GREEN else if OI_NetChg < 100 then color.RED else color.GRAY);
This is my code, and I want to add a condition, If OI_NetChg < 100 then OI_NetChg=100-OI_NetChg, else OI_NetChg=OI_NetChg
But I don't know how to add it ?
plot OI_NetChg =(open_interest()/open_interest()[1])*100;
OI_NetChg.SetDefaultColor(color.black);
AssignBackgroundColor(if OI_NetChg > 100 then color.GREEN else if OI_NetChg < 100 then color.RED else color.GRAY);
This is my code, and I want to add a condition, If OI_NetChg < 100 then OI_NetChg=100-OI_NetChg, else OI_NetChg=OI_NetChg
But I don't know how to add it ?