and positions will be closed when StopLoss TakeProfit reaches exactly that specified
not much more
To avoid opening more than one order, this can be inserted at the beginning of the start function:
int Total=0; // Кол-во наших ордеров обнулено for(int i=1; i<=OrdersTotal(); i++)
{
if (OrderSelect(i-1,SELECT_BY_POS)==true) // Если есть следующий
{ // if (OrderMagicNumber()!=magic)continue; // Ордера не нашего эксперта
Total++; // Подсчет кол-ва всех наших ордеров
}
}
if (Total>=1) return; // не более одного ордера
As for StopLoss TakeProfit, I have not yet encountered slippage on set orders. Although I only worked with two brokerage companies, maybe it exists.
Hello Hello, does anybody know if a broker can shut down an EA in your terminal and if so, how to deal with it))) I have an EA working, then it starts tapping error 0. I got suspicious.
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.
how do I write to include the "and" first?
Place brackets
symbol=Symbol();
Can you tell me why the array is not filling with values? It outputs zero.
1. Insert the code with the SRC button
2. double mas[];
Can you tell me why the array is not filling with values? It outputs zero.
extern int n=15; // Number of bars
int Total; // No. of accesses to the start function
int start()
{
if (Total>=1) return; // we need 1 time
Total++;
double mas[];
for (int i=1; i<=n; i++)
{
mas[n]=iOsMA(NULL,0,9,21,5,PRICE_CLOSE,i);
Print ("OsMA = ",iOsMA(NULL,0,9,21,5,PRICE_CLOSE,i));
}
Print ("Array = ", mas[2];
Print ("Array = ", mas[10]);
return;
}
I don't know what you want, but maybe that's what you want. :
Where is the list of organizations that support automated trading on mql4 and mql5?
Logically, such a list should be on the website of the mql developer.
I don't know what you want, but maybe you need to. :
Thank you, artmedia70. That's exactly what I needed. Just getting to grips with arrays.
As for StopLoss TakeProfit, I have not yet encountered slippage on set orders. Although I only worked with two brokerage companies, maybe it exists.