MQL5 MARKET IS WRONG?

To add comments, please log in or register
Stuard CR
908
Stuard CR  
Hi

I have an EA but when i want to add my product to the MQL5 market i receive this error:

test on NZDUSD,H1
 2016.03.30 19:00:00  Tester: not enough money for sell 0.20 NZDUSD at 0.69096 sl: 0.79096 tp: 0.69046 [2016.03.30 19:00]
 2016.03.30 19:00:00  Tester: PrevBalance: 1.00, PrevPL: 0.00, PrevEquity 1.00, PrevMargin: 0.00, NewMargin: 138, FreeMargin: -137.19
 2016.03.30 19:00:00  EA_V2 NZDUSD,H1: OrderSend error 134
 2016.04.14 11:00:00  Tester: not enough money for buy 0.20 NZDUSD at 0.68571 sl: 0.58571 tp: 0.68621 [2016.04.14 11:00]
 2016.04.14 11:00:00  Tester: PrevBalance: 1.00, PrevPL: 0.00, PrevEquity 1.00, PrevMargin: 0.00, NewMargin: 137, FreeMargin: -136.14
 2016.04.14 11:00:00  EA_V2 NZDUSD,H1: OrderSend error 134
there are no trading operations

It's impossible to solve this problem? Because 1 USD balance MQL5 is using to test the EA lol?
Stanislav Korotky
31681
Stanislav Korotky  
James CR:
Hi

I have an EA but when i want to add my product to the MQL5 market i receive this error:

test on NZDUSD,H1
 2016.03.30 19:00:00  Tester: not enough money for sell 0.20 NZDUSD at 0.69096 sl: 0.79096 tp: 0.69046 [2016.03.30 19:00]
 2016.03.30 19:00:00  Tester: PrevBalance: 1.00, PrevPL: 0.00, PrevEquity 1.00, PrevMargin: 0.00, NewMargin: 138, FreeMargin: -137.19
 2016.03.30 19:00:00  EA_V2 NZDUSD,H1: OrderSend error 134
 2016.04.14 11:00:00  Tester: not enough money for buy 0.20 NZDUSD at 0.68571 sl: 0.58571 tp: 0.68621 [2016.04.14 11:00]
 2016.04.14 11:00:00  Tester: PrevBalance: 1.00, PrevPL: 0.00, PrevEquity 1.00, PrevMargin: 0.00, NewMargin: 137, FreeMargin: -136.14
 2016.04.14 11:00:00  EA_V2 NZDUSD,H1: OrderSend error 134
there are no trading operations

It's impossible to solve this problem? Because 1 USD balance MQL5 is using to test the EA lol?

Yes, this is not a joke, this is one of standard tests performed by autotester in the market. You can fix the error something like this:

void OnTick()
{
  if(IsTesting())
  {
    if(AccountFreeMarginCheck(_Symbol, OP_BUY, SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN)) <= 0.0) return;
  }
  ...
}
Alain Verleyen
39043
Alain Verleyen  
https://www.mql5.com/en/articles/2555
The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • 2016.08.01
  • MetaQuotes Software Corp.
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
William Roeder
19852
William Roeder  
James CR 2016.03.30 19:00:00  Tester: not enough money for sell
  • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
  • Do NOT use TickValue by itself - DeltaPerLot
  • You must normalize lots properly and check against min and max.
  • You must also check FreeMargin to avoid stop out
To add comments, please log in or register