I also found my mistake. The point is that the "Buy_close" condition, gives the program a task to execute the deal, and the check for the position is "Buy_opened".
The deal is closed and the "Buy_close" condition coincides, therefore an error is generated.
sandex: This string should be in a loop and indexed.
How do I index a string? Trying this, the error comes out
ArraySetAsSeries(ma1Val,true);
int bars=Bars(_Symbol,_Period);
for(int i=0;i<bars;i++)
{
CopyBuffer(ma1Handle,0,0,2,ma1Val[i]);
ExtMapBuffer2[i]=ma1Val[i] - ((ma1Val[i]/100)*0.3);//ЗДЕСЬ НЕ ПОЛУЧАЕТСЯ ПОЛУЧИТЬ ЛИНИЮ
}
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.
There is no "close order" event in the terminal. You should use a script or an Expert Advisor. As shown above.
Hmm. what is the event called when you press the "cross" to close an open order?
That's what you need to "assign" a sound to
Thank you very much!
I also found my mistake. The point is that the "Buy_close" condition, gives the program a task to execute the deal, and the check for the position is "Buy_opened".
The deal is closed and the "Buy_close" condition coincides, therefore an error is generated.
Made the condition as follows:
this is the action to "assign" the sound to
I can't get MA lines with an offset of -+0.30%.
There isno problem with calling the moving average from which the offset will occur. But, there is no way to get offset lines.
Basic code:
This string should be in a loop and indexed.
How do I index a string? Trying this, the error comes out
Indexing should be done like this:
This line should look like this:
Declare the array to be static, of size 1: