MT4 Chart Drawing Problem

 
Hi There,
I am using MT4 from last month only. I got this strange problem; In my marketwatch, if i open some stock, it opens in squeezed way(image 1) .But when i hit left arrow key chart restores to its normal state(Image 2). Its happening with 100+ Symbols but not with all the Symbols. The real problem its causing me is the calculation 200 days Moving Average on all available symbol of market watch. By default, it considers first chart(image1) & gives me incorrect result of 200 days average. Can it be from brokers end or some config needed to be change? I had tried to change default template, but same results. Please guide any possible solution
Squeezed chartCorrect Chart
 
It should unsqueeze when first tick (after opening the chart) arrives.
 
kypa:
It should unsqueeze when first tick (after opening the chart) arrives.
Actually i don't need to open charts, since i am calculating Moving Average on entire marketwatch in function init(), but due to that squeezed chart. its not giving right moving average value. Though, it didn't unsqueezed
 

OnInit() (you shouldn't even use init() anymore) isn't really the best place for a MA, let alone multy-symbol one. Mostly because calculating indicators requires copying rates, which doesn't happen immediately.

 
ashatrisk since i am calculating Moving Average on entire marketwatch in function init(),
  1. You can't do that. Don't try to use any price or server related functions in OnInit (or on load,) as there may be no connection/chart yet:
    1. Terminal starts.
    2. Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
    3. OnInit is called.
    4. For indicators OnCalculate is called with any existing history.
    5. Human may have to enter password, connection to server begins.
    6. New history is received, OnCalculate called again.
    7. New tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.

  2. On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors before accessing prices.
              Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum

 
I tried to do that using oncalculate function to run it only once using boolean variable but no help. I found it has to do something with the market. I am dealing with NSEFO( Nation Stock Exchange of India for Future & Options), i found that there is no such problem with forex charts, i looked for 40-50 symbols it loaded in charts without squeezing( all settings same), but for NSEFO many of the charts first load into squeezed way, once i hit left arrow charts load in normal way. Does it has do something with MT4 broker/provider? or it something in MT4 has while loading some specific country Stock exchange?
Reason: