Can you tell me how to write this code 2 errors ! 1-unexpected end program 2- Unbalanced parentheses What is wrong in the sense of unbalanced parentheses?
externdouble Lot =1;
//-------------------------------------//----------------------------------void start()
{
Lot=OrderLots();
void RefreshRates();
CurAskPriceOne = MarketInfo("EURUSD", MODE_ASK);
CurAskPriceTwo = MarketInfo("USDCHF", MODE_ASK);
//----------//--Открытие ордера1
Ticket=OrderSend("EURUSD",OP_BUY,Lot,CurAskPriceOne,2,0,0);
if (Ticket > 0)
{
if(OrderSelect(Ticket,SELECT_BY_POS,MODE_TRADES)) Print (" One order opene : " , OrderOpenPrice());
{
elsePrint ("Eror opening BUY EURUSD order : ",GetLastError();
//-------------//--Ордер 2
Ticket=OrderSend("USDCHF",OP_BUY,Lot,CurAskPriceTwo,2,0,0);
if (Ticket > 0)
{
if(OrderSelect(Ticket,SELECT_BY_POS,MODE_TRADES)) Print (" One order opene : " , OrderOpenPrice());
{
elsePrint ("Eror opening BUY USDCHF order : ",GetLastError());
//---------------------------Закрытие стартreturn;
}
On several occasions I have seen minute quotations disappear retrospectively. For example, last night (12.02) several hundred records for the 10th-11th day disappeared. Sometimes it is treated by simply pressing "refresh" on M1 chart, yesterday it did not work and I had to manuallyimport quotes from another terminal. The broker on the server is fine, as the same account opened in another copy of the terminal gives a normal chart without the hole. What could be the problem?
Импорт (Imports) отражает объем товаров и услуг из-за рубежа, которые сразу же входят в сети потребления, склады и зоны внешней торговли. При составлении индикатора обычно используется стоимость
I can't figure out how to open orders, how to close them, how to take them by type, I can't figure out how to make the bot open one fucking order and that's it :) Let's take the simplest code, what do I need to put in the beginning or end to make this bastard open the order once.
externdouble lot =1;
int start()
{
int Ticket;
Ticket=OrderSend("USDCHF",OP_BUY,Lot,Ask,2,0,0);
return(1);
}
Tenimagalon: I can't figure out how to open orders, how to close them, how to take them by type, I can't figure out how to make the bot open one fucking order and that's it :) Let's take the simplest code, what do I need to put in the beginning or end to make this bastard open the order once.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
OK, I see, thank you. Thought I'd try it out on an expert. But here I got 5203. In MT5, the same code works fine...
I think I figured it out. I set timeout 5000 (it worked on MT5, but not on MT4). I put 500 - it worked on MT4 as well.
Can you please advise how to transfer a function from an indicator to an EA to calculate directly in it?
)?
Can you tell me how to write this code 2 errors ! 1-unexpected end program 2- Unbalanced parentheses What is wrong in the sense of unbalanced parentheses?
Can you tell me how to write this code 2 errors ! 1-unexpected end program 2- Unbalanced parentheses What's wrong?
Errors with parentheses fixed - you need to look for paired, or better - first put the brackets, and then inside the code to write:
... But there is no logic in your code...
I'll add,
this:
won't work, OrderLots() function work, read the help.
variables:
CurAskPriceOne and CurAskPriceTwo
are not declared anywhere,
you need to do it roughly.
like this
not announced and it worked. :)
I can't figure out how to open orders, how to close them, how to take them by type, I can't figure out how to make the bot open one fucking order and that's it :) Let's take the simplest code, what do I need to put in the beginning or end to make this bastard open the order once.