High[], Low[] only work for the chart symbol and timeframe. You need to use iHigh and iLow instead.
Thanks nicholishen it worked well !!!
Now I am facing another issue when trying to backtest my indicator,
The Bid and the Ask of the other currency pair are not working
Check the image that I shared.
Any idea how to get the Bid and Ask of another currency pair ?
Many Thanks,
Thanks nicholishen it worked well !!!
Now I am facing another issue when trying to backtest my indicator,
The Bid and the Ask of the other currency pair are not working
Check the image that I shared.
Any idea how to get the Bid and Ask of another currency pair ?
Many Thanks,
You cannot backtest other pairs in MT4, you must use MT5 for that.
You cannot backtest other pairs in MT4, you must use MT5 for that.
Thanks nicholishen it worked well !!!
Now I am facing another issue when trying to backtest my indicator,
The Bid and the Ask of the other currency pair are not working
Check the image that I shared.
Any idea how to get the Bid and Ask of another currency pair ?
Many Thanks,
You cannot backtest other pairs in MT4, you must use MT5 for that.
Thanks nicholishen for the tip,
I moved to MT5 and it is working very well,
I am trying now to execute all type of orders, but in the backtesting it is giving me an [unknown retcode 0] not sure why
Any idea ?
==========================
#include <Trade\Trade.mqh>
CTrade trade;
double ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
if(!trade.Buy(1, NULL, ask, 0, 0, "")) {
Print("Buy() method failed. Return code=",trade.ResultRetcode()," Code description: ",trade.ResultRetcodeDescription());
} else {
Print("Buy() method executed successfully. Return code=",trade.ResultRetcode()," (",trade.ResultRetcodeDescription(),")");
}
==========================
Error code: 2018.04.01 16:06:56.445 2018.01.02 10:36:00 Buy() method failed. Return code=0 Code description: unknown retcode 0
Show your code if you need coding help.
Thanks Alain,
I actually re-coded my stuff in MT5, and it is working well,
I am facing now another issue when trying to execute an order, it is giving me an unknown retcode 0 in the backtesting
==========================
#include <Trade\Trade.mqh>
CTrade trade;
double ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
if(!trade.Buy(1, NULL, ask, 0, 0, "")) {
Print("Buy() method failed. Return code=",trade.ResultRetcode()," Code description: ",trade.ResultRetcodeDescription());
} else {
Print("Buy() method executed successfully. Return code=",trade.ResultRetcode()," (",trade.ResultRetcodeDescription(),")");
}
==========================
Error code: 2018.04.01 16:06:56.445 2018.01.02 10:36:00 Buy() method failed. Return code=0 Code description: unknown retcode 0
Any idea why ?
Thanks
Thanks Alain,
I actually re-coded my stuff in MT5, and it is working well,
I am facing now another issue when trying to execute an order, it is giving me an unknown retcode 0 in the backtesting
==========================
#include <Trade\Trade.mqh>
CTrade trade;
double ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
if(!trade.Buy(1, NULL, ask, 0, 0, "")) {
Print("Buy() method failed. Return code=",trade.ResultRetcode()," Code description: ",trade.ResultRetcodeDescription());
} else {
Print("Buy() method executed successfully. Return code=",trade.ResultRetcode()," (",trade.ResultRetcodeDescription(),")");
}
==========================
Error code: 2018.04.01 16:06:56.445 2018.01.02 10:36:00 Buy() method failed. Return code=0 Code description: unknown retcode 0
Any idea why ?
Thanks

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Metatraders
I am trying to develop an indicator that show me the highest high and the lowest low of the last 100 bars of all Major currency pairs,
This is part of my codes:
For some reason what I am getting is the following:
If I placed this indicator on the EURUSD chart, the high and low of the EURNZD are incorrect,however
If I placed this indicator on the EURNZD chart, the high and low of the EURNZD are correct
Same thing for the high and low of the EURUSD currency pair
Check the image that I shared
Does anyone know what seems the problem ?
Many thanks