Custom Indicator Not Refreshing
Volcom: can anyone tell me what code I can add to fix this?
int limit=Bars-2; if(ExtCountedBars>100) limit=Bars-ExtCountedBars-100;
Bogus. After the first time counted = Bars so limit is negative and nothing is drawn. Try int limit = Bars -1 -ExtCountedBars;- You should stop using the old IndicatorCounted and start using the new Event Handling Functions - Functions - Language Basics - MQL4 Reference
- See also How to do your lookbacks correctly.
whroeder1:
Thanks a lot @whroeder1 ! That worked, appreciate it.
- Bogus. After the first time counted = Bars so limit is negative and nothing is drawn. Try int limit = Bars 1 -ExtCountedBars;
- You should stop using the old IndicatorCounted and start using the new Event Handling Functions - Functions - Language Basics - MQL4 Reference
- See also How to do your lookbacks correctly.
Hi All,
I have a custom indicator that paints arrows on my chart when specific criteria is aligned. The problem is that it only re-paints when I refresh it, it should just do this automatically. The source code is below, can anyone tell me what code I can add to fix this?