Can anybody explain why indiors that repaint on a live chart, don't repaint on an offline chart?
Thanks,
PBB
Can anybody explain why indiors that repaint on a live chart, don't repaint on an offline chart?
Thanks,
PBB
Ok, but an offline chart will not get upgraded forming the bar/candle. I am not an indior man and not a coder, but I think it's weird that I have seen indiors repaint in dwell charts which did not do exactly the same in offline charts, even if I closed and re-opened mt4. Perhaps I'm a clueless noob in the eyes of a coder, but I really don't get it...Originally Posted by ;
The very first time you join an indior to a chart, it calculates all bars. Then for every new tick it calculates only the past two bars, considering that elderly bars are calculated, therefore saving time and resources.
This is accomplished by using IndiorCounted() function. This function tells indior how much pubs are calculated.
In dwell chart, IndiorCounted() equals zero when called initially, and on every new tick it equals the number of pubs minus one.
Bad layout indior become repainting because the usage of this purpose.
In offline chart IndiorCounted always equal zero so indior always compute all pubs onto eah new tick. While it can eliminate repainting, it frees computer tools, especially in large volatility
when you have the origin (mq4 document ) of that repainting indior, replace IndiorCounted() work with 0.
Inserted Code int counted_bars=IndiorCounted(); modify the code to:
Inserted Code int counted_bars=0; see if it helps.
more on IndiorCounted():
http://docs.mql4.com/customind/indiorcounted
Due Sangmane!!Originally Posted by ;
Great explenation, always good to learn something new and also to better understand why and how things operate.
Likely that occurs because there are no ticks in offline charts so the indior Isn't triggered in appropriate wayOriginally Posted by ;
Hello, SangmaneOriginally Posted by ;
Does it mean that by doing so replacement we can solve repainting issue in some indiors? Just want to clarify. Thanks for your explanations!