Hello,
I have been stuck on this for a while. I am writing a code with the counter of the days in the trade and want to plot the value of the highest value of the close during the trading days. My code consist of
Def TradingDays = if getaverageprice() != 0 then TradingDays[1] +1 else 0; <--- Counter
Plot H = Highest(Close, TradingDays); <---- This however doesn't work because the highest function only takes integers I think. Is there a way to convert the variable to integer? or maybe a better way?
Thanks in advance
I have been stuck on this for a while. I am writing a code with the counter of the days in the trade and want to plot the value of the highest value of the close during the trading days. My code consist of
Def TradingDays = if getaverageprice() != 0 then TradingDays[1] +1 else 0; <--- Counter
Plot H = Highest(Close, TradingDays); <---- This however doesn't work because the highest function only takes integers I think. Is there a way to convert the variable to integer? or maybe a better way?
Thanks in advance