Analysis of test results and optimisation in the MetaTrader 5 strategy tester - page 17

 
Hi, I’ve coded an EA for MetaTrader 5. I’m trying to trade with it on [redacted] paid challenge. I would trade US30 and US100 cash. However, with those symbols, the EA doesn’t take trades — neither live nor in backtesting. It does take trades with forex pairs though, like EURUSD. The EA’s settings shouldn’t have any effect on this. Can anyone tell what might be causing this?
 
matias Liespuu #Hi, I’ve coded an EA for MetaTrader 5. I’m trying to trade with it on [redacted] paid challenge. I would trade US30 and US100 cash. However, with those symbols, the EA doesn’t take trades — neither live nor in backtesting. It does take trades with forex pairs though, like EURUSD. The EA’s settings shouldn’t have any effect on this. Can anyone tell what might be causing this?
Stock/equity derivatives generally have unique tick and point sizes/values. Make sure that you're sending your orders at the appropriate incremental prices. Without showing your code nor logs, this is merely a guess regarding the usual culprit.
 
matias Liespuu #Can anyone tell me what could be the cause?
In the "Experts" tab of the terminal or "Log" tab of the tester, are there any inscriptions indicating the cause of this behaviour?
 
matias Liespuu #:
Hi, I’ve coded an EA for MetaTrader 5. I’m trying to trade with it on FundedNext’s paid challenge. I would trade US30 and US100 cash. However, with those symbols, the EA doesn’t take trades — neither live nor in backtesting. It does take trades with forex pairs though, like EURUSD. The EA’s settings shouldn’t have any effect on this. Can anyone tell what might be causing this?
this is a common issue with eas. an ea almost always requires different coding of points and lots when trading fx or commodities and indices -- just like ryan described.
 
Ilya Malev #:
In the "Experts" tab of the terminal or "Log" tab of the tester, are there any inscriptions indicating the cause of this behaviour?

Check your Experts log and your Journal log. Depending on how noncompliant your code is, your orders may or may not be triggered. If they trigger but fail to execute on the trade server, you should have a log of it. If your implemented trading conditions don't even trigger, you'll likely won't have a log of it:

Michael Charles Schefe #:h
[A]n ea almost always requires different coding of points and lots when trading fx or commodities and indices... (emphasis added),
 
Ryan L Johnson #:

...

Depending on the entries in the log depends on the probable answer to the question you asked about the causes. If there is no information, it is impossible to answer the question without analysing the code.
 
Who can tell the solution: broker RoboForex (server Pro), since this Monday, changed the value of XAUUSD quotes from 3 to 2.
In the history the spread values of the bars remained as they were in 3 digits (as on the screen 130). On new bars (after Monday), the values became in the new format (13)

However, the Expert Advisor in the tester, working on these (old) bars, both in the "only opening prices" mode and in the "Real ticks" mode, sees the spread and makes trades as if the spread on these bars was recorded in the "new" 2-digit format. How do they do it? :)


 

Same experiment with bars in a new format


 
Ilya Malev #:
Who can tell the solution: broker RoboForex (server Pro), since this Monday, changed the value of XAUUSD quotes from 3 to 2.
In the history the spread values of the bars remained as they were in 3 digits (as on the screen 130). On new bars (after Monday), the values became in the new format (13)

However, the Expert Advisor in the tester, working on these (old) bars, both in the "only opening prices" mode and in the "Real ticks" mode, sees the spread and makes trades as if the spread on these bars was recorded in the "new" 3-digit format. How do they do it? :)

I think your only resort is to build a custom symbol with adjusted historic spreads. Or contact the broker and ask them to edit the history of quotes - though I doubt they'll do it.
 
Stanislav Korotky #:
I think the only remedy is to create a custom symbol with customised historical spreads. Or contact the broker and ask him to edit the quotes history - although I doubt he will do that.
You have not understood, I asked a question, why in the history of quotes M1 and older, the spread is specified in the old format (like 130), but trades in the tester are executed as if it was already specified there in the new format (like 13).