Bar and Time isMonthLastTradingDay doesn’t generate MT5 EA
3 replies
Julian Santos
2 years ago #287289
Hi,
when creating an EA using isMonthLastTradingDay (SQX 137), MT5’s strategy code is missing the SQ.getMonth function.
This function is included in the MT4 when the strategy is generated for this platform. It’s possible to make it compile and be executed by adding some modified code lines to the EA.
int getMonth(datetime time) {
MqlDateTime strTime;
TimeToStruct(time, strTime);
return strTime.mon;
}
Is there any way to make SQ to add these code lines by itself, as it does for MT4?
Thank you in advance!
Julián S.
0
Tomas Matejka
2 years ago #287304
Can you please attach the SQX strategy file? I will test
0
Julian Santos
2 years ago #287360
Hi Thomas,
thank you for your answer. Here are the files: the sqx strategy and the mq5 file obtained from it that generates the compiling errors in the attached jpg file.
Thank you in advance!
0
Tomas Matejka
2 years ago #287500
The strategy code compiles correctly for me when exported from the version 140. Which SQX build do you run?
0
Viewing 3 replies - 1 through 3 (of 3 total)