Different results on use multicurrency indicator

 

If you try to use a multicurrency indicator like this one: Free download of the 'DXYvsEXY for MT4' indicator by '3rjfx' for MetaTrader 4 in the MQL5 Code Base, 2020.08.20

The results are distorted over time, as you can see from the images here attached.

It is not possible to correctly verify the history of the indicators, so what is the multicurrency on MT4 for?

DXYvsEXY for MT4
DXYvsEXY for MT4
  • www.mql5.com
Indicator DXYvsEXY is the USDX vs EURX with Awesome Oscillator Indicator for MT4.
 

And when I say "It is not possible to correctly verify the history of the indicators" I mean any.

I tried with something simple as:

int start() {

  for (int i = 0; i < MaxBars; i++) {
    MA_1[i] = 0;
    MA_2[i] = 0;
    MA_1[i] = iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);
    MA_2[i] = iMA("GBPUSD",0,13,8,MODE_SMMA,PRICE_MEDIAN,i);
  }
  
  return (0);
}

Of course the first buffer gives correct results, but the second, on different date for the same candle gives completely different results.

Can you confirm that it is a Metatrader4 problem?

 
  1. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20

  2. Do not assume that a bar index for one pair equals that of other pairs. Always use iBarShift.

  3. You should stop using the old event handlers and IndicatorCounted() and start using new event handlers.
              Event Handling Functions - MQL4 Reference
              How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 2016.05.11

 
William Roeder:
  1. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20

  2. Do not assume that a bar index for one pair equals that of other pairs. Always use iBarShift.

  3. You should stop using the old event handlers and IndicatorCounted() and start using new event handlers.
              Event Handling Functions - MQL4 Reference
              How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 2016.05.11

Thanks for support me.

However I never found a multi pair indicator as you described

I mean, in a decade around the web, especially where Mladen Rakic posted, eg. here: 

Multi pair indicators - Indices - Technical Indicators - MQL5 programming forum - Page 50

I NEVER found (for multi pair indicators) a single one that was using the OnCalculate() function.


Do you have a single example of multi pair indicator made it as you suggested? It would be very helpful.

Multi pair indicators
Multi pair indicators
  • 2015.08.27
  • www.mql5.com
Something I have been working some time ago. Multi pair MACD Multi pair CoeffOfLine...
 
William Roeder:
  1. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20

  2. Do not assume that a bar index for one pair equals that of other pairs. Always use iBarShift.

  3. You should stop using the old event handlers and IndicatorCounted() and start using new event handlers.
              Event Handling Functions - MQL4 Reference
              How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 2016.05.11


I mean, if the most valuable coder don't code a single multicurrency indicator as you suggested is a bit strange.

  1. Why none has done yet?
  2. How is it possible that ALL multicurrency indicators are wrongly calculated?
  3. Why nobody cares about this issue? When a coder release a repaint indicator, typically he mention it...

I understand that these are uncomfortable topics, since MT4 has different bugs, but I would like some moderators to enlighten me with some answers.

Thanks.

 
supersimon7583:


I mean, if the most valuable coder don't code a single multicurrency indicator as you suggested is a bit strange.

  1. Why none has done yet?
  2. How is it possible that ALL multicurrency indicators are wrongly calculated?
  3. Why nobody cares about this issue? When a coder release a repaint indicator, typically he mention it...

I understand that these are uncomfortable topics, since MT4 has different bugs, but I would like some moderators to enlighten me with some answers.

Thanks.

Where do you get the idea that nobody has coded any multicurrency indicators?

I have coded many dashboards/scanners that are multi-currency and multi-timeframe for MT4 and MT5.

William has already pointed out the checks needed to make sure that it works correctly.

 
Keith Watford:

Where do you get the idea that nobody has coded any multicurrency indicators?

I have coded many dashboards/scanners that are multi-currency and multi-timeframe for MT4 and MT5.

William has already pointed out the checks needed to make sure that it works correctly.

As I said all multicurrency indicators are wrongly calculated.

Please read the first post.

The results are distorted over time, as you can see from the images here attached. It is not possible to correctly verify the history of the indicators, so what is the multicurrency on MT4 for?
 
supersimon7583:

As I said all multicurrency indicators are wrongly calculated.

Please read the first post.

By wrongly calculated do you mean that they are coded badly so the code calculates incorrectly ?

I don't know what you mean.

I have read your first post and looked at your attached images.

supersimon7583:

If you try to use a multicurrency indicator like this one: Free download of the 'DXYvsEXY for MT4' indicator by '3rjfx' for MetaTrader 4 in the MQL5 Code Base, 2020.08.20

The results are distorted over time, as you can see from the images here attached.

It is not possible to correctly verify the history of the indicators, so what is the multicurrency on MT4 for?

I can't see anything apart from some images of an indicator. What are they supposed to prove? How are they distorted?


Your posts are vague and I, for one, have no idea what you are talking about.

 
Keith Watford:

...

I have coded many dashboards/scanners that are multi-currency and multi-timeframe for MT4 and MT5.

...

And from this it is clear that you did not understand my speech.

Try any multicurrency indicator (line, not dashboard/scanner that are almost impossible to backtest) like this one Free download of the 'DXYvsEXY for MT4' indicator by '3rjfx' for MetaTrader 4 in the MQL5 Code Base, 2020.08.20

And launch 2 backtests:

Eg.

  • EUR/USD M1 from  Date: 2020.03.29 - 2020.05.01
  • Another one same symbol and timeframe but from  Date: 2020.03.29 - 2020.04.30

Then add to both the indicator and check the result (for example one of any candle on day 2020.04.29).


Compliments, you finally get my point.

DXYvsEXY for MT4
DXYvsEXY for MT4
  • www.mql5.com
Indicator DXYvsEXY is the USDX vs EURX with Awesome Oscillator Indicator for MT4.
 
supersimon7583:

And from this it is clear that you did not understand my speech.

Try any multicurrency indicator (line, not dashboard/scanner that are almost impossible to backtest) like this one Free download of the 'DXYvsEXY for MT4' indicator by '3rjfx' for MetaTrader 4 in the MQL5 Code Base, 2020.08.20

And launch 2 backtests:

Eg.

  • EUR/USD M1 from  Date: 2020.03.29 - 2020.05.01
  • Another one same symbol and timeframe but from  Date: 2020.03.29 - 2020.04.30

Then add to both the indicator and check the result (for example one of any candle on day 2020.04.29).


Compliments, you finally get my point.

Well, this is the first time that you have mentioned about backtests.

Don't you think that is a very important detail to leave out?

MT4 tester does not support multiple currencies. 

It is not a failing due to any indicator, it is just that the MT4 tester is only set up to working with the selected symbol.

Any testing of multi-currency indicators can only be done on live charts.

 
Keith Watford:

Well, this is the first time that you have mentioned about backtests.

Don't you think that is a very important detail to leave out?

The backtest itself doesn't mean anything, I told you that to make you understand the problem faster.

The calculation problem it also affects real time charts, that's the reason for me to say in the 1st post "The results are distorted over time".

If you try to close and reopen MT4 after sometime, past results are different.

MT4 tester does not support multiple currencies. It is not a failing due to any indicator, it is just that the MT4 tester is only set up to working with the selected symbol. Any testing of multi-currency indicators can only be done on live charts.

OK, so since MT4 shows us some data of a different symbol during a backtest, what does it refer to? Does this make sense to you?

And again, multiple currencies indicators fail also on live charts.


No offense but what amazes me is that a moderator of this site did not know the existence of this problem, even more that this bug has not already been ascertained in the past (since it has always existed).

Reason: