What's wrong with that?

 

I'm just starting to learn programming, and I'm poking at something in the editor. Can you tell me what's wrong with this code?


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
extern int stop = 50;
extern int profit = 75;

int start()
  {
  double mafast = iMA(Symbol(),0,13,0,MODE_EMA,PRICE_CLOSE,0);
  double maslow = iMA(Symbol(),0,26,0,MODE_EMA,PRICE_CLOSE,0);
//----
   if(OrdersTotal()== 0  && mafast > maslow)
      {
      OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Ask+stop*Point,Ask-profit*Point,"comment",);
      }
//----
   return(0);
  }
//+------------------------------------------------------------------+
When compiling, there is an error ')' parameter expected in the bold line
 
sss2019:

I'm just starting to learn programming, and I'm poking at something in the editor. Can you tell me what's wrong with this code?

When compiling, there is an error ')' parameter expected in the bold line

It seems that in Ordersand the last comma gets in the way.
 

Error in the parameter list.

https://docs.mql4.com/ru/trading/OrderSend

 
Exactly a comma, thank you. Tell me, how is it implemented to open a trade only at the close of the current bar and not at every tick?
 
google: one transaction on the bar site:mql4.com
 
And what does error 2011.11.16 15:31:30 '91017530' mean: order sell 0.10 EURUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Common error] why is the order not opening?
 
 
sss2019:
What does the error 2011.11.16 15:31:30 '91017530' mean: order sell 0.10 EURUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Common error] why is my order not opening?
I did not open an order either. But I failed. I would have opened and closed it by a stopout.
 

Oh, I see, but what if I want my Expert Advisor to open at this price? ))

And everything seems to be correct in the code.

OrderSend(Symbol(),OP_SELL,0.1,Bid,500,0,0,"ffff",123,Red);
 

Oh you beauty, what do you think I'm doing now?
 

Good people, and more importantly, smart people, explain to a self-taught person what kind of error I get when compiling this code?

\end_of_program' - ending bracket '}' expected