Hello. I have written an EA, it shows good results in the tester. Compiles without errors. It is attached to the euro dollar.
In real trade trades do not open, when conditions to open a trade appear it gives a message:
2015.02.11 14:03:03.656'1435109': order buy 0.01 EURUSD opening at market sl: 1.12697 tp: 1.13747 failed [Invalid S/L or T/P]
As I understand it means that this is not a valid stop or take. An order with given stops and takes is placed manually. There is a distance between the price and the stop
There is several times more distance between the price and the point. All calculations of the stop and the current are normalized. What may be the reason, I do not understand, please help me to understand.
Hello. I have written an EA, it shows good results in the tester. Compiles without errors. It is attached to the euro dollar.
In real trade trades do not open, when conditions to open a trade appear it gives a message:
2015.02.11 14:03:03.656'1435109': order buy 0.01 EURUSD opening at market sl: 1.12697 tp: 1.13747 failed [Invalid S/L or T/P]
As I understand it means that this is not a valid stop or take. An order with given stops and takes is placed manually. There is a distance between the price and the stop
There is several times more distance between the price and the point. All calculations of the stop and the current are normalized. What may be the reason, I do not understand, please help me to understand.
Here is the program:
int start()
{
//------------------------------------------------------------------------------------------------if (OrdersTotal()>0)
return;
double monymax8=High[ArrayMaximum(High,3,0)];
if (само условие я убрал так как не в нём причина, раз программа доходит до функции OrderSend)
{ double stop_sell8=monymax8+Point;
double STOP_S8=NormalizeDouble(stop_sell8,Digits);
double profit_sell8=Bid-(stop_sell8-Bid)*4-(Ask-Bid);
double PROFIT_S8=NormalizeDouble(profit_sell8,Digits);
double my_lot8=AccountBalance()/100/((stop_sell8-Bid)*MarketInfo(Symbol(),MODE_TICKVALUE))/100000;
double LOT8=NormalizeDouble(my_lot8,2);
OrderSend(Symbol(),OP_SELL,LOT8,Bid,2,STOP_S8,PROFIT_S8);
}
//------------------------------------------------------------------------------------------------return;
}
Format your code like this. There is an SRC button for this.
It does not open because on these account types, orders without stops are opened first, and then OrderModify()
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 can i prescribe in the codes of my EAs that they work with each of my currency pairs? I've got a different symbol but it doesn't work.
Format your code like this. There is an SRC button for this.
It does not open because on these account types, orders without stops are opened first, and then OrderModify()
The magik is only needed if there are several "traders" on the same symbol, but that's enough to check the symbol.
Format your code like this. There is the SRC button for this purpose.
It doesn't open because in these account types, orders without stops are opened first, and then OrderModify()
So I get it. Now my question is how to make the EA multi-currency ???
Generally, I'm really stumped on something and can't figure out how to do it.
I have variables line1,line2,line3 etc. I want to count the value for each variable through the for loop statement.
How to make a correct enumeration of variables line? I tried to do it as "line "+"i", but it turns out nonsense, of course.
Why is it displaying the wrong object? It should bea triangle pointing lefthttps://docs.mql4.com/ru/constants/objectconstants/arrows code 3, but an arrow pointing upwards Wingdings code 241appears.
Program code (I haveObjectSet(objName, OBJPROP_ARROWCODE, 3);)
Why is it displaying the wrong object? It should bea triangle pointing lefthttps://docs.mql4.com/ru/constants/objectconstants/arrows code 3, but an arrow pointing upwards Wingdings code 241appears.
Program code (I haveObjectSet(objName, OBJPROP_ARROWCODE, 3);)
Read it more carefully. I don't remember in detail, but code 3 is not part of Wingdings.
ps; Here's what's in the note.
Special arrow codes cannot be used in custom indicators when setting the arrow value for lineswith DRAW_ARROW style.