- Changing time on charts
- Experts: OpenTime
- SimpleDailyRangeBreakExpert
Use each bar's open time on the current chart to synchronise with the open time of the source symbol.
In the OnCalculate(), use the time of time[] parameter array elements, as a reference for the iBarShift() function, to look up the correct and exact shift for the source symbol's data.
And when no rates data is available for that time index, then leave the buffer element empty.
You can also simply iterate over both symbol's time-series data at the same time, and synchronise them comparing the timestamp as you sequentially proceed with each data element. This in my opinion is much faster and more efficient.
Use each bar's open time on the current chart to synchronise with the open time of the source symbol.
In the OnCalculate(), use the time of time[] parameter array elements, as a reference for the iBarShift() function, to look up the correct and exact shift for the source symbol's data.
And when no rates data is available for that time index, then leave the buffer element empty.
You can also simply iterate over both symbol's time-series data at the same time, and synchronise them comparing the timestamp as you sequentially proceed with each data element. This in my opinion is much faster and more efficient.
thank you Mr Fernando, let me try your suggestion
Greetings fellas, I created an indicator that calculate the specific symbol, for example XAUUSD. I want to attach this indicator to XAGUSD but then I found the indicator timeshift is not quite right since XAU open at 01.00 server time and XAG open at 00.00 server time. How to correct the indicator data so that it is similar to the chart timeshift?
You can find some info on multicurrency indicators in the book: IndSubChartSimple example
- www.mql5.com
You can find some info on multicurrency indicators in the book: IndSubChartSimple example
Hello Mr. Stanislav. Thanks for the reference you gave me
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use