ADX in SQ, doesnt work well in MT4
3 replies
FXHelper
7 years ago #115470
anyone else notice that ADX index strategies fail in MT4 back test… not sure why but I had to stop using it as a result ( until we find a solution)
If you know of a solution please share
daveng
7 years ago #138934
So far i have not got any good strategies from SQ that are using ADX, so not sure how SQ uses ADX.
In MT4, usually ADX is used together with +DMI and -DMI for better accuracy in determining uptrend or downtrend. Would be interesting to have a look at the source code of an ADX strategy generated by SQ.
tomas262
7 years ago #138938
Hello,
SQ uses standard mql4 code for ADX. For example following code for ADX cross
bool LongEntryCondition = ((iADX(NULL, 0, 36, PRICE_CLOSE, MODE_MAIN, 2) iADX(NULL, 0, 12, PRICE_CLOSE, MODE_MAIN, 1)));
Differences can be caused by many other factors such as testing precision etc. Are you really sure you get differences only with ADX?
daveng
7 years ago #138940
Hello,
SQ uses standard mql4 code for ADX. For example following code for ADX cross
bool LongEntryCondition = ((iADX(NULL, 0, 36, PRICE_CLOSE, MODE_MAIN, 2) iADX(NULL, 0, 12, PRICE_CLOSE, MODE_MAIN, 1)));Differences can be caused by many other factors such as testing precision etc. Are you really sure you get differences only with ADX?
Thanks for the source code. So SQ doesn’t use DMI with ADX? From the source code, SQ uses only “MODE_MAIN” which is ADX, but it is not using “MODE_PLUSDI” and “MODE_MINUSDI” which are DMI+ and DMI- respectively.
And usually crossover is used with both DMI+ and DMI- to indicate uptrend or downtrend. But I have not used before ADX crossover between 2 different ADX periods. Perhaps if SQ uses DMI crossover with ADX it will improve the overall strategy? Just a thought…
Viewing 3 replies - 1 through 3 (of 3 total)