Which prevents the advisor from making money. - page 2

 

I think the aftar is here ---- > https://www.mql5.com/ru/forum/133408

 
Unfortunately, the author doesn't realise that the ONLY thing to look at is equity.
 

Well, why not? It's not harmful to look at anything, except the sun on a clear day, or an electric welder :)

 
Because the phrase "It looks like from the state that the EA is increasing the balance and the real depo is decreasing, although if the orders were opened on time, this would not happen. "It sounds epic when it comes to a low-speed EA. Here it is better not to pay attention to the balance at all.
 
Cmu4:
Unfortunately, the author doesn't realise that the ONLY thing to look at is equity.
A jack-in-the-box is not a jack-in-the-box. He knows everything. Quietly chuckles at you.
 
sanyooooook:
The World Consortium of Banks is an avalanche branch :-) Congratulations, you've reached a new level of trading, you start to feel that your account is being watched. Mine too, by the way )


Likewise. What do you want? To be with such a good fortune and not be supervised or what? :-)

"...you've moved on to the next level of trading..." - the next level will feel like it's not just watching, it's also RUNNING!!! :-)

The "World Consortium of Banks" - Avalanche branch is to blame for all the plums and failures of the owls. :-)

 
FAQ:
The code is enough for me and I've unfortunately seen it.


Everything flows, everything changes. I haven't been trading sunflower seeds all this time either.

Here are the order setting codes, works on NDD. Stops will be set on a different tick.

What's the mistake here?

//+-------
//+------------------------------------------------------------------+
//|   valenok2003@mail.ru                                05.07.2011
//+------------------------------------------------------------------+
//| open_order_buy() ОТКРЫТИЕ рыночного ордера OP_BUY
//| Требует:
//| - лот
//| - комментарии ордера                               
//| - магик                               
//| Возвращает тикет открытого ордера или -1
//+------------------------------------------------------------------+
int open_order_buy(double _Lot, string _Comment, int _Magic){  
   string _Function = "open_order_buy(): ";
   int _Ticket=-1, _ERROR=0;
//-----------------
   output_mov_string("покупка, Lot = " + DoubleToStr(_Lot, Digits_Lot)+" "+_Comment, Clr_Action);
   double _OrderOpenPrice = NormalizeDouble(Ask,Digits);
   _Ticket = OrderSend(Symbol(),OP_BUY,_Lot,_OrderOpenPrice,Slip,0,0,_Comment,_Magic,0,Color_Arrow_Buy);
   _ERROR = GetLastError();
   if(_ERROR == 0) _Ticket = check_open_order(_Ticket);
   else {
      string _Txt = " Price:"+_OrderOpenPrice + " Ask:" + DoubleToStr(Ask,Digits) + " Bid:" + DoubleToStr(Bid,Digits);
      error(_Function + order_type_in_txt(OP_BUY) + _Txt, _ERROR);
   }
//-----------------
   return(_Ticket);
}
//+-------------------------------------------------------------------
//+-------
//+-------
//+------------------------------------------------------------------+
//|   valenok2003@mail.ru                                05.07.2011
//+------------------------------------------------------------------+
//| open_order_sell() ОТКРЫТИЕ рыночного ордера OP_SELL
//| Требует:
//| - лот
//| - комментарии ордера                               
//| - магик                               
//| Возвращает тикет открытого ордера или -1
//+------------------------------------------------------------------+
int open_order_sell(double _Lot, string _Comment, int _Magic){  
   string _Function = "open_order_sell(): ";
   int _Ticket=-1, _ERROR=0;
//-----------------
   output_mov_string("продажа, Lot = " + DoubleToStr(_Lot, Digits_Lot)+" "+_Comment, Clr_Action);
   double _OrderOpenPrice = NormalizeDouble(Bid,Digits);
   _Ticket = OrderSend(Symbol(),OP_SELL,_Lot,_OrderOpenPrice,Slip,0,0,_Comment, _Magic,0,Color_Arrow_Sell);
   _ERROR = GetLastError();
   if(_ERROR == 0) _Ticket = check_open_order(_Ticket);
   else {
      string _Txt = " Price:"+_OrderOpenPrice + " Ask:" + DoubleToStr(Ask,Digits) + " Bid:" + DoubleToStr(Bid,Digits);   
      error(_Function + order_type_in_txt(OP_SELL) + _Txt, _ERROR);
   }
//-----------------
   return(_Ticket);
}
//+-------------------------------------------------------------------
//+-------

slippage is calculated using the formula

MathRound((MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID))/Point) 
 
Vladon:
Yeah, like look at the state and I won't give you an advisor on a programmers' forum, and ask me to check what's wrong without code? That's funny. You have no respect for us.
I have the code, it is open to everyone with comments. I'm not giving you a link to my site, they will remove it anyway. I don't want to get banned.
 
on an NDD type account there are peculiarities of order setting, first the order with SL,TP=0, then the modification. Or even with zero an order is not placed?
 
YOUNGA:
on an NDD account there are peculiarities of order placement, first an order with SL,TP=0, then a modification. Or even with zero an order is not placed?

I think everything is clear from the code, just in case the key lines again

_Ticket = OrderSend(Symbol(),OP_BUY,_Lot,_OrderOpenPrice,Slip,0,0,_Comment,_Magic,0,Color_Arrow_Buy);
_Ticket = OrderSend(Symbol(),OP_SELL,_Lot,_OrderOpenPrice,Slip,0,0,_Comment, _Magic,0,Color_Arrow_Sell);
Reason: