The entry signal on mt4 is
// init signals only on bar open
LongEntrySignal = ((((sqGetValue("NULL",0,
PRICE_OPEN, 1) > sqBands(NULL,0,
BBBarOpensPeriod, 2, 0,
PRICE_CLOSE, 1, 1))&&(sqGetValue("NULL",0,
PRICE_OPEN, 0) < sqBands(NULL,0,
BBBarOpensPeriod, 2, 0,
PRICE_CLOSE, 1, 1)))
&& (sqCCI(NULL,0, CCIPeriod,
PRICE_CLOSE, 2)>-55))
&& (sqKeltnerChannel(Subchart1Symbol, Subchart1Timeframe,
KCerPeriod, 2, 1,
4+1)>sqKeltnerChannel(Subchart1Symbol,
Subchart1Timeframe, KCerPeriod, 2, 1,
4)));
On mt5, it is
// init signals only on bar open
LongEntrySignal = (((sqOpen("NULL",0,
1) >
sqGetIndicatorValue(BOLLINGERBANDS_1, 2,
1, true)
&& sqOpen("NULL",0,
0) <
sqGetIndicatorValue(BOLLINGERBANDS_1, 2,
1, true))
&&
(sqGetIndicatorValue(CCI_1, 2)>-55.0))
&&
sqIsFalling(KELTNERCHANNEL_1, 2,
false, 4,
1));
I am a complete beginner, so help would be appreciated.
Thanks
Description changed:
The entry signal on mt4 is
// init signals only on bar open
LongEntrySignal = ((((sqGetValue("NULL",0,
PRICE_OPEN, 1) > sqBands(NULL,0,
BBBarOpensPeriod, 2, 0,
PRICE_CLOSE, 1, 1))&&(sqGetValue("NULL",0,
PRICE_OPEN, 0) < sqBands(NULL,0,
BBBarOpensPeriod, 2, 0,
PRICE_CLOSE, 1, 1)))
&& (sqCCI(NULL,0, CCIPeriod,
PRICE_CLOSE, 2)>-55))
&& (sqKeltnerChannel(Subchart1Symbol, Subchart1Timeframe,
KCerPeriod, 2, 1,
4+1)>sqKeltnerChannel(Subchart1Symbol,
Subchart1Timeframe, KCerPeriod, 2, 1,
4)));
On mt5, it is
// init signals only on bar open
LongEntrySignal = (((sqOpen("NULL",0,
1) >
sqGetIndicatorValue(BOLLINGERBANDS_1, 2,
1, true)
&& sqOpen("NULL",0,
0) <
sqGetIndicatorValue(BOLLINGERBANDS_1, 2,
1, true))
&&
(sqGetIndicatorValue(CCI_1, 2)>-55.0))
&&
sqIsFalling(KELTNERCHANNEL_1, 2,
false, 4,
1));
I am a complete beginner, so help would be appreciated.
Thanks
I managed to get this to export mql5 properly on another computer running strategyquant. I think the problem is that I installed SQ as a non-administrator on my windows server. I have had problems doing this before, and it works now that I have installed it as Administrator. I'm not sure why that should be, but there it is.
Thank you for your help.
Gary
&& sqIsFalling(KELTNERCHANNEL_1, 2, false, 4, 1));
Attachment MQL5 Code.txt added
Attachment MQL4 Code.txt added
Attachment Pseudo Code.txt added
Attachment Strategy 416375.sqx added
The MQL 4 code includes the subchart ok, the MQL 5 does not.
Here's another example attached.
Working now
You can take a look into initIndicators() function in MQL to see how the indicators are set up during EA initialization.
during export from SQ to MQL code, the subchart symbols are filled as they are in SQ.
When running multi-chart or multi-timeframe EAs in your terminal, you must set up the correct symbols in your EA parameters.
See the attached screenshot. If you set the correct symbol, the EA should run normally.
Hope this helps
Best regards,
Tomas