Errors, bugs, questions - page 802

 
Rosh:


Would you be so kind as to direct the experts to look at my question from the previous page... Started on this one: 814.

Getting ready for the championship, can't have a ready expert on my laptop to test and populate.

Thanks.

 
AlexCul:

Would you be so kind as to direct the experts to look at my question from the previous page... Started on this one: 814.

Getting ready for the championship, can't have a ready-made expert on my laptop.

Better write to servicedesk. You can have a long correspondence here
Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
 
fyords:

Why not try using

try it. At the same time I'm priming as Karlson advised

The text of the test program:

#include <Trade\SymbolInfo.mqh>
#include <Trade\Trade.mqh>

CSymbolInfo       m_sym;
CTrade            m_trade;

double bar_info[2];
bool a;

int OnInit()
{
   SymbolSelect("EURUSD", true);
   SymbolSelect("GBPUSD", true);
   m_sym.Name("EURUSD");
   a = false;
   return(0);
}

void OnTick()
{
   if (a) return;
   a = true;
   m_sym.Refresh();
   m_sym.RefreshRates();
   CopyHigh("EURUSD", PERIOD_D1, 0, 2, bar_info);
   Print("Текущая цена:" + DoubleToString(m_sym.Ask()));
   Print("Цена открытия:" + DoubleToString(bar_info[1] + 500*_Point));
   m_trade.BuyStop(1, bar_info[1] + 5000*_Point, "EURUSD", 0, 0);
}

Result when tested on EURUSD:

GI 0 test (EURUSD,H1) 10:58:50 2012.01.02 09:00:00 Current price:1.29241000
MN 0 test (EURUSD,H1) 10:58:50 2012.01.02 09:00:00 Opening price:1.29720000

QS 0 Trade 10:58:50 2012.01.02 09:00:00 buy stop 1.00 EURUSD at 1.29720 (1.29220 / 1.29241 / 1.29220)


Result when tested on GBPUSD:

LO 0 test (GBPUSD,H1) 10:58:43 2012.01.02 09:00:00 Current price:1.29241000
JE 0 test (GBPUSD,H1) 10:58:43 2012.01.02 09:00:00 Opening price:1.29720000
KS 2 Trades 10:58:43 2012.01.02 09:00:00 failed buy stop 1.00 EURUSD at 1.29720 [Invalid stops]


 
AlexCul:

I downloaded the build recently, very recent - 687. Agents only use local, remote and cloud - disconnected. Although with remote and cloud connected and local disconnected, it doesn't work either!

Don't know what to do. Sov is written, testing and optimization is not possible...

Can you advise how to possibly solve this problem - screenshots attached.

Give an application to servicedesk with ALL the details (installation paths, axis, UAC, terminal logs, agents, tester).
 
Rosh:

What do you mean by "how can there be an error 10016 if there are no stops". Are there zero values specified for them or just no line where they are prescribed?

Try it this way

MqlTradeRequest request={0};

Is ZeroMemory(request); not enough?

I added it as you've told me, but it didn't change the result


P.S. sl and tp are written equal in request:

a) 0 and high of the daily bar + 50 pips (respectively)

b) both specified equal to zero


then variant "c" (a little further on) - using CTrade. The result is the same

 

Clear all structures.

Then bluntly try to query with the data clearly specified.

   MqlTradeRequest request;
   MqlTradeResult result;

   ZeroMemory(request);
   ZeroMemory(result);

   request.action = TRADE_ACTION_PENDING;
   request.magic  = 0;
   request.symbol = "EURUSD";
   request.volume = 1.0;
   request.price  = SymbolInfoDouble(Symbol(),SYMBOL_BID)+500*SymbolInfoDouble(Symbol(),SYMBOL_POINT); // или сразу цену 1.3000
   request.sl     = 0;
   request.tp     = 0;
   request.deviation = 10;
   request.type   = ORDER_TYPE_BUY_STOP; 
   request.type_filling = ORDER_FILLING_FOK;
   
   OrderSend(request,result);
 
ilunga:

... The result is the same

Strange. Took your code and got a tester response

PN      0       ss (GBPUSD,H1)  10:17:04        2012.01.02 00:00:00   Текущая цена:1.29479000
DK      0       ss (GBPUSD,H1)  10:17:04        2012.01.02 00:00:00   Цена открытия:1.29943000
CN      0       Trade   10:17:04        2012.01.02 00:00:00   buy stop 1.00 EURUSD at 1.34443 (1.29565 / 1.29654)
FL      0       ss (GBPUSD,H1)  10:17:04        2012.01.02 00:00:00   CTrade::OrderSend: buy stop 1.00 EURUSD at 1.34443 [done]
EF      0       ss (EURUSD,H1)  10:20:04        2012.01.02 00:00:00   Текущая цена:1.29479000
QL      0       ss (EURUSD,H1)  10:20:04        2012.01.02 00:00:00   Цена открытия:1.29943000
KE      0       Trade   10:20:04        2012.01.02 00:00:00   buy stop 1.00 EURUSD at 1.34443 (1.29443 / 1.29479 / 1.29443)
KG      0       ss (EURUSD,H1)  10:20:04        2012.01.02 00:00:00   CTrade::OrderSend: buy stop 1.00 EURUSD at 1.34443 [done]

It's working.

What build do you have?

Only I have a question: why is the pendulum visible only in "Operations" but not in "Trade" (I mean the visualizer)?

 
fyords:

Strange. Took your code and got a tester response

It's working.

What's your build?

Build 674.

Everything works for you, but there's a BUT. Look at the price in brackets:

CN      0       Trade   10:17:04        2012.01.02 00:00:00   buy stop 1.00 EURUSD at 1.34443 (1.29565 / 1.29654)
KE      0       Trade   10:20:04        2012.01.02 00:00:00   buy stop 1.00 EURUSD at 1.34443 (1.29443 / 1.29479 / 1.29443)

There's a 10-point difference. Although the time is the same.

 
Different servers, different 500 pp.
 
ilunga:

build 674.

Everything works for you, but there is one BUT. Look at the price in brackets:

The difference is 10 points. Although the time is the same.

I got it right, server demo MK.