I am new to TOS and would appreciate some help.
Basically I would like to plot a variable only if the variable is getting greater than the previous high, If it is less than the previous high then do not print it. Let’s use sma simple moving average for the variable. Thanks for your help.
if "sma" > "sma[-1]" then plot sma else 0;
or
plot sma if “sma” > “sma[-1]” else 0;
Basically I would like to plot a variable only if the variable is getting greater than the previous high, If it is less than the previous high then do not print it. Let’s use sma simple moving average for the variable. Thanks for your help.
if "sma" > "sma[-1]" then plot sma else 0;
or
plot sma if “sma” > “sma[-1]” else 0;
Last edited: