Whatever strategy I follow repainting is my big issue. I used ref(close , -1) also. Still I am facing the issue ... I heard somewhere that actionindicator followed by static variable inclusion will resolve this ... can anyone give me an AFL for the same.. or any other solution for the repainting issue is also welcome... please help me in this ...
similar problem: i am trying to use previous candle open close or high low in python. for current candle it is record["open"] etc but can someone tell me how i can use previous candle in my code?
Repainting is when buy or sell signal appears on the chart but it disappears or vanishes before closing of the candle because of variation in the price which has changed the math of the indicator. This happens in very volatile markets where fluctuations of prices are very high.
No need Ref Close.
Instead Use like this
After Your Last Buy Declaration
Buy = Ref(Buy,-1);
Same way for Sell.
The above will not Repaint.
Whats Repainting?
never came across the word before
If you are using amibroker afl, refer to below link
https://www.marketcalls.in/amibroker/convert-repainting-code-non-repainting.html
Courtesy : https://www.marketcalls.in/
Understand the logic before applying it to the code. Do not copy paste.