Repainting: live vs offline charts
Results 1 to 6 of 36

Thread: Repainting: live vs offline charts

  1. #1
    Can anybody explain why indiors that repaint on a live chart, don't repaint on an offline chart?

    Thanks,

    PBB

  2. #2
    Quote Originally Posted by ;
    Likely that occurs because there are no ticks in offline charts so that the indior is not triggered in appropriate way
    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...

  3. #3
    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

  4. #4
    Quote Originally Posted by ;
    the first time you join an indior to a chart, it computes all bars. Then for each new tick it computes only the past two bars, considering that elderly bars are calculated, therefore saving resources and time.

    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 each new tick it equals the number of pubs minus one.

    Bad design indior eventually become repainting because the use of the...
    Due Sangmane!!

    Great explenation, always good to learn something new and also to better understand why and how things operate.

  5. #5
    Quote Originally Posted by ;
    Can anyone explain why indiors which repaint on a live chart, don't repaint on an offline chart?

    Thanks,

    PBB
    Likely that occurs because there are no ticks in offline charts so the indior Isn't triggered in appropriate way

  6. #6
    Quote Originally Posted by ;
    when you've got the origin (mq4 document ) of the repainting indior, substitute IndiorCounted() function with 0.
    Hello, Sangmane

    Does it mean that by doing so replacement we can solve repainting issue in some indiors? Just want to clarify. Thanks for your explanations!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.