Are you really thinking someone can help you without seeing your code ?
Its my first time to post so noob mistake. Thanks for reminding me Alain.
I found the problem. I failed to re-initialize the variables used so the codes don't work after a few iterations. I've fixed it already. Thanks.
Alain Verleyen:
Are you really thinking someone can help you without seeing your code ?
Are you really thinking someone can help you without seeing your code ?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So, i'm writing an EA that paints rectangles into the chart. Yes, this should be done as an indicator but I want to use these rectangles in my back testing thus I want it drawn in the chart using an EA.
My EA codes are run 1 time and is re-run every time a candle is closed. It works well on the first few candles but after the code is re-run a couple of times, the rectangles fails to appear. my codes are run and the values of the rectangles are churned out by the EA. the logs tells me the values are churned out but the rectangles are never drawn anymore.
I am at a loss and have no idea what is going on and how to fix this. For those who wrote an EA before, I'm sure you encountered this problem before. Please please help.
Thanks.