mt5 - how to limit number of bars on chart below 1000 ?

To add comments, please log in or register
fxcommentary
1357
fxcommentary  

Just trying to limit CPU consumption and i assume that the number of bars on chart is relevant (even more relevant that in case of mt4).


Best, M.

William Roeder
20217
William Roeder  
  1. If your indicators are coded properly, your assumption is wrong. I have 30 (MT4) charts with 5+indicators, running 6% (4 core,) working set of 115 MB.
    1. EAs : Don't do per tick that you can do per bar, or on open.
      If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts and you recalculate.)
      If you are waiting for an order to open or close, only look when OrdersTotal (or MT5 equivalent) has changed.
                How to get backtesting faster ? - MT4 - MQL4 programming forum

    2. Indicators: Code it properly so it only recomputes bar zero (after the initial run.)
                How to do your lookbacks correctly.
      Or, reduce Tools → Options (control-O) → Charts → Max bars in chart to something reasonable (like 1K.)
    3. Set Bars on chart. MT4: Tools → Options (control-O) → Charts → change Max bars in chart.
    fxcommentary
    1357
    fxcommentary  
    William Roeder:
    1. If your indicators are coded properly, your assumption is wrong. I have 30 (MT4) charts with 5+indicators, running 6% (4 core,) working set of 115 MB.
    2. Set Bars on chart. MT4: Tools → Options (control-O) → Charts → change Max bars in chart.

    Thank you great insight.

    Just to make sure - i ask about mt5.

    To add comments, please log in or register