Hello, everyone.
I’ve made my indicator to draw randomize data with historical bars.
I used “lastbarupdated” and indicator draw each time when the price update.
How can I fix this problem. I’ve been trying to solve this problem, but yet not. I’ve tried like this.
if lastbarupdated and open <> tag then
… ….
tag = open
end if
Please help me. Thanks.
Do not append unrelated posts to existing topics. Create s new one, instead, using a clear and relevant title.
Thank you 🙂
It’s islastbarupdate, not lastbarupdated.
A classic variable reset to 0 (null value) on each tick received. You have to use an array variable to store the past value contained in the same bar in live, such as :
if islastbarupdate and open <> $tag[0] then
$tag[0] = open
end if