It works.
User Error. Forgot to set
ArraySetAsSeries(rates,true);
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is it possible to use offline data in an EA. Range bars and similar are often created as offline charts.
To develop multicurrency EA:s using rangebars I would have to use offline charts as the primary input since range bar creators all seem to use offline charts.
MT4.
i got a suggestion that it should work if the offline chart is open.
Here is what I did:
- Created a range bar chart for EURUSD and called it "M3" Worked OK
- I kept it open
Is started a test EA on USDJPY. I used iRSI, iBands and iMACD explicity specifying "EURUSD" and PERIOD_M3 to obtain values from these indicators and printed them for the last closed bar.
Voila! Correct values for the indicators. Matched values I got by applying these indicators to the range bar chart.
I also made a CopyRates to obtain the last close specifying symbol and timeframe. Not correct. The close value I got was not from "1" (last close) I found that value 7 bars earlier. Hm.That might just be coincidence
Strange.
So it works. Almost.