After some tests i found some strategies, where i see very big difference between backtests, and mostly this strategies has some OHLC values - i am afraid, that with these buidling blocks we have a major problem
for example these strategies has in the logic entry on OPEN WEEKLY, HIGH DAILY, CLOSE DAILY
second question: is intention, that OPEN (OHLC) buidling block is negated to the OPEN again, shouldnt be CLOSE on sell side? buidling blocks OPEN and CLOSE (candle, +daily, +weekly, +monthly) arent negated at all
Attachment EJ_30_203025158_S_OW_CF_SQX-MM.sqx added
Attachment EJ_30_203025158_S_OW_CF_SQX-MM_EQ___BTvsBT.png added
Attachment EJ_H1_200113126_S_HD_CF_SQX-MM.sqx added
Attachment EJ_H1_200113126_S_HD_CF_SQX-MM_EQ___BTvsBT.png added
Attachment EJ_H4_200412188_S_CD_CF_SQX-MM_EQ___BTvsBT.png added
Attachment EJ_H4_200412188_S_CD_CF_SQX-MM.sqx added
i think there is some problem with OHLC building blocks - MQL4 and MQL5 code is the same
Attachment slippage.jpg added
Attachment slippage.jpg deleted
Attachment spread.jpg added
Attachment EJ_30_203025158_S_OW_CF_SQX-MM_EQ___BTvsBT.png added
Attachment EJ_H1_200113126_S_HD_CF_SQX-MM_EQ___BTvsBT.png added
Attachment EJ_H4_200412188_S_CD_CF_SQX-MM_EQ___BTvsBT.png added
in the MQL code, there is MISSING "MIN. DISTANCE" at all - because in my strategies i have set the min. distance to 5 pips
if i remove the min. distance setting, the backtest is similar
PLEASE RESOLVE ASAP - our trading is DIFFERENT on real accounts :(
I remember I had this very same discussion on the Forum with someone who disagreed me. Indeed SOME strats don't fit backtest vs reality. That's a fact.
I never found out where was the problem, but there's some bug somewhere. I thought it was about any indicator, anyway I didn't invest too much time on that. I follow each and everyone of the strats I have live. Those ones that don't match with backtest I discard them immediatly.
Hopefully, if this is a bug. It was the root of the problem and gets fixed. I left behind very nice strats because of that.
Voted!
Status changed from New to Refused
the min. distance setting is there to match the settings and behaviour of a given symbol in real trading platforms.
You should set it in a way that it reflects the settings you have on your broker's symbol. It was not intended to use it as some filtering option that eliminates orders too close to current price in MQL code.
If you think it would be useful to use it the way that it doesn't execute orders too close to current price even if the real symbol's settings in MT would allow the orders, please add a feature request for this.
Regarding the negations - Yes it was inteded that Open is negated as Open instead of Close. We will check the negation settings of the other price blocks.
Best regards,
Tomas
v SQX je nějaké nastavení, v MQL kodu to není implementované
tudíž, když ho použiju v SQX, tak očekávám že moje obchodování to bude reflektovat a je jedno, jestli jsem to nastavení použil kvůli omezení brokera, nebo kvůli nějaké moji idee, aby vstup do obchodu nebyl moc blízko aktuální ceny a tudíž fakticky nemám STOP příkaz, ale spíše MARKET a že takové strategie jsou snad nemusím vysvětlovat, nebo tady nikdo fakticky neobchoduje?
rozdíly ve strategiích nejsou malé a co teď s tím mám dělat, všechny strategie vymazat a začít generovat znovu a vyhodit tak třeba půl roku práce?
Come on! We have a field that eliminates orders from Backtest, but on live does nothing. That's insane
In our MQL code there is no implementation of min. distance, because it is already there. It is a symbol's property in MT.
Even in SQ3 the min. distance was not meant to be limiting order execution. It is there so you could make a reliable backtest with the settings matching your trading platform.
If you export strategy from SQ3 and make a backtest in MT, an info message will be logged into journal in case of different min. distance between SQ and MT's chart.
It is there just to inform you that you have used other min. distance value than the MT's symbol has preset and the result may differ because of that.
We have preserved this functionality in SQX just as it was in old SQ.
I don't think your half year work is useless if you used different min distance setting in your generation process. You should just try to make a reliable retest with the right settings matching the settings in your target platform if you want to get the most reliable results in SQ.
int MinDistanceOfStopFromPrice = 5.0;
Status changed from Refused to In progress
I was going through SQ3's MQL code finding the occurences of MinDistanceOfStopFromPrice, but haven't noticed this value is then carried into eaStopDifferenceNumber variable which actually limits the orders.
If I take a closer look at the code, I can see it's actually really filtering the orders. I suppose we should make this work the same way in SQX.
I will discuss this with Mark and I think we will implement this kind of logic in release 130.
I will let you know the final decision.
Thank you both for your input.
Best regards,
Tomas
Attachment UJ_15_171589173_S_As_CF_SQX-MM_EQ___BTvsBT.png added
1 extreme comparation - RED line - min. distance 5, BLUE line - min. distance 0
i make comparation of all my new 500 strats using min. distance 5 and must tell that difference is almost in every strategy, mostly slight, but sometimes not little high
Attachment UJ_15_171589173_S_As_CF_SQX-MM.sqx added
min. distance 5 - number of trades 279
min. distance 0 - number of trades 5318
yes, the strategy is placing pending orders to the ASK/BID buidling block, so this should be very near the current price, but still i am not getting how only 5 pips for pending order distance could make this huge diff
am i missing something? or there is something strange with SQX backtester?
i would assume that 5 pip diff in pending order distance will now have impact for almost every strategy - because our pedning orders are mostly not so near the current price...
please check the logic of min. distance in SQX backtester, my head doesnt get it...
Status changed from In progress to Fixed
You will be able to make a retest of your strategies and export new MQL codes which will respect the min distance setting.
The huge difference is only for USDJPY, for EURUSD it doesn't make difference. I think it is symbol related a depends on a ticksize and the structure of the market.
Best regards,
Tomas
OK, we will see in the upcoming fix what we will get
THX
When will this be implemented in is not in 129 Dev 4
Attachment FixedTemplates.zip added
I attached a zip file containing updated templates, you should replace the files inside extend/Code directory.
I hope it will work for you, I'm not 100% sure. It should add this line into the MQL code:
double sqMinDistance = 0.0; //Stop orders min distance from current price
You can manually change the value inside strategy's MQL code to test it.
The full fix will be available in the next dev build
because in the dev4 this fix is not there
i need to make very quick changes in the real accounts
We plan to release the new version during next week