globad: I think there's plenty of ready-made stuff like this. A simple EA opens one deal at a given time...
The trouble is that for all the time the possibility of programming for MT4 has accumulated HUNDREDS of ready-made EAs in the free access to the Internet, that finding the right one is very problematic - you will have to search through a lot of junk, and it may even take more than one month. In addition, there's still no guarantee that the code you've found won't be written incorrectly. Code made to order not only saves time and effort, but can also be quickly corrected by the developer, if the customer sees that something is not working as ordered.
It returns zero anyway... So I asked the question without looking at the syntax.
Well, it's a template..... Damn, what can it be, I updated the build and EA started to part, moreover, the same EA on another old build, works, opens deals, etc.
if (b!=Bars){
b=Bars;
if (iCustom(NULL, 0, "1111",set,up,zukko1,7,1)!=0){
TotalOrders=OrdersTotal();
for (i=0; i<=TotalOrders; i++){
if (OrderSelect(0,SELECT_BY_POS)==true){
if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,Red);
if (OrderSelect(0,SELECT_BY_POS)==true){
if (OrderType()==OP_BUYSTOP) OrderDelete(OrderTicket(),Green);
}
}
}
// if (OrdersTotal()==0) OrderSend(Symbol(),OP_BUY,Lot,Ask,3,Bid-StopLoss*Point,Bid+TakeProfit*Point);
//OrderSend(Symbol(),OP_SELLSTOP,Lot,Bid-StopLoss*Point,3,Bid-StopLoss*Point+OPStopLoss*Point,Bid-StopLoss*Point-OPTakeProfit*Point);
}
if (iCustom(NULL, 0, "111111",set,up,zukko1,6,1)!=0){
TotalOrders=OrdersTotal();
for (i=0; i<=TotalOrders; i++){
if (OrderSelect(0,SELECT_BY_POS)==true){
if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,Red);
if (OrderSelect(0,SELECT_BY_POS)==true){
if (OrderType()==OP_SELLSTOP) OrderDelete(OrderTicket(),Green);
}
}
}
//if (OrdersTotal()==0) OrderSend(Symbol(),OP_SELL,Lot,Bid,3,Ask+StopLoss*Point,Ask-TakeProfit*Point);
// OrderSend(Symbol(),OP_BUYSTOP,Lot,Ask+StopLoss*Point,3,Ask+StopLoss*Point-OPStopLoss*Point,Ask+StopLoss*Point+OPTakeProfit*Point);
}
}
Can anyone help.... EA is supposed to work once per bar. And it's hitting it hard....
That's the trouble, for all the time the possibility of programming for MT4 has been accumulated in the free access to HUNDREDS of ready-made EAs in the Internet, that finding the right one is very problematic - you will have to search through a lot of junk, and it may even take more than one month. In addition, there's still no guarantee that the code you've found won't be written incorrectly. Code made to order not only saves time and effort, but can also be quickly corrected by the developer, if the customer sees that something is not working as ordered.
are displayed in the main window at a distance from High/Low by the Positiont value, which is defined in init()
Positiont*=Point;
The problem is this: for lower fractals the graphical objects (arrows) are displayed according to Positiont, while for higher ones they stick to the High/Low candlestick, i.e. they do not see Positiont.
splxgf: The position is counted from the top left corner, the bottom is fine, the top needs an extra margin.
OK. I understand and did it, but it didn't work with *2, but with *4 it's great. Thank you very much - I didn't know this nuance (although there's a lot more I don't know, but I'm learning it).
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.
I think there's plenty of ready-made stuff like this. A simple EA opens one deal at a given time...
The trouble is that for all the time the possibility of programming for MT4 has accumulated HUNDREDS of ready-made EAs in the free access to the Internet, that finding the right one is very problematic - you will have to search through a lot of junk, and it may even take more than one month. In addition, there's still no guarantee that the code you've found won't be written incorrectly. Code made to order not only saves time and effort, but can also be quickly corrected by the developer, if the customer sees that something is not working as ordered.
What does the function do anyway?
It returns zero anyway... So I asked the question without looking at the syntax.
Well, it's a template..... Damn, what can it be, I updated the build and EA started to part, moreover, the same EA on another old build, works, opens deals, etc.
Can anyone help.... EA is supposed to work once per bar. And it's hitting it hard....
That's the trouble, for all the time the possibility of programming for MT4 has been accumulated in the free access to HUNDREDS of ready-made EAs in the Internet, that finding the right one is very problematic - you will have to search through a lot of junk, and it may even take more than one month. In addition, there's still no guarantee that the code you've found won't be written incorrectly. Code made to order not only saves time and effort, but can also be quickly corrected by the developer, if the customer sees that something is not working as ordered.
Good afternoon!
Here is such a problem....
In the complex indicator, I have created a graphical display of fractals (so as not to apply the fractal indicator)
For top fractals (arrows)
For lower fractals (arrows)
Fractal arrowsare displayed in the main window at a distance from High/Low by the Positiont value, which is defined in init()
Positiont*=Point;The problem is this: for lower fractals the graphical objects (arrows) are displayed according to Positiont, while for higher ones they stick to the High/Low candlestick, i.e. they do not see Positiont.
Why? I don't understand....
Why? I don't understand....
Maybe add the height of the object as well.
How do you do this?
And, to be honest, I doubt it will help (although I'll give it a try if you tell me how).
Graphic objects are standard characters for both high and low.
The position is counted from the top left corner, the bottom is fine, the top needs an extra margin.
OK. I understand and did it, but it didn't work with *2, but with *4 it's great. Thank you very much - I didn't know this nuance (although there's a lot more I don't know, but I'm learning it).
See https://www.mql5.com/ru/forum/131859/page6#434260
GetExtremumZZZPrice() function
Thank you very much.