This is a point I can't put together, help me create:
I need to define a profit point zero for two or more orders opened in one direction, e.g. buy.
and add take profit to this point and assign it to all open buy orders.
And take profit should be shown on the chart, i.e. it should be visible.
For example, at the price of 1500 we open the first Buy order
at 1600 we open the second buy order.
their zero point is at 1550 + (Take Profit = 20)
and here the first and the second order are given a take profit of 1570, when the price reaches this level, both orders will be closed,
and if the price passes (jumps) this level, it will follow and close the orders.
It is very important to keep records of buy and sell orders simultaneously and not to interfere with each other. You should set take profit separately for buy and take profit separately for sell, and only when two or more orders are opened in one direction at the same time.
This is a point I can't put together, help me create:
I need to define a profit point zero for two or more orders opened in one direction, e.g. buy.
and add take profit to this point and assign it to all open buy orders.
And take profit should be shown on the chart, i.e. it should be visible.
For example, at the price of 1500 we open the first Buy order
at 1600 we open the second buy order.
their zero point is at 1550 + (Take Profit = 20)
and here the first and the second order are given a take profit of 1570, when the price reaches this level, both orders will be closed,
and if the price passes (jumps) this level, it will follow and close the orders.
It is very important to keep records of buy and sell orders simultaneously and not to interfere with each other. You should set take profit separately for buy and take profit separately for sell, and only when two or more orders are opened in one direction at the same time.
For a position open at 1500, a Take at 1570 would be fine (if you don't take StopLevel into account), but for a position open at 1600, a Take at 1570 would cause an Error 130 - wrong stops. After all, a Take cannot be lower than the opening price for a Buy. This is already a StopLoss. For two positions you have defined your breakeven point, but for three-four-five? You should first define the breakeven formula for unidirectional positions, and then you can create a logic.
artmedia70: For a position open at 1500, a take at 1570 would be fine (if you don't take StopLevel into account), but for a position open at 1600, a take at 1570 would cause a 130 error - wrong stops. After all, a Take cannot be lower than the opening price for a Buy. This is already a StopLoss. For two positions you have defined your breakeven point, but for three-four-five? You should first define the Breakeven formula for unidirectional positions, and then you can work out the logic.
It all depends on when we set or change Take Profit. It is based on the current price.
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.
This is a point I can't put together, help me create:
I need to define a profit point zero for two or more orders opened in one direction, e.g. buy.
and add take profit to this point and assign it to all open buy orders.
And take profit should be shown on the chart, i.e. it should be visible.
For example, at the price of 1500 we open the first Buy order
at 1600 we open the second buy order.
their zero point is at 1550 + (Take Profit = 20)
and here the first and the second order are given a take profit of 1570, when the price reaches this level, both orders will be closed,
and if the price passes (jumps) this level, it will follow and close the orders.
It is very important to keep records of buy and sell orders simultaneously and not to interfere with each other. You should set take profit separately for buy and take profit separately for sell, and only when two or more orders are opened in one direction at the same time.
please advise why transactions do not open.... The code seems to make sense, but it just won't open.
Thanks, good point.... corrected... but the trades still won't open.... what to do?
Probably correct the signal_MACD() function.
Well, that she'd still be giving something back.
Hello.
Can you please tell me if I have written the conditions correctly? ( Fractal_point_up_buy and Fractal_point_down_buy parameters are normalized.)
Thank you in advance.
This is a point I can't put together, help me create:
I need to define a profit point zero for two or more orders opened in one direction, e.g. buy.
and add take profit to this point and assign it to all open buy orders.
And take profit should be shown on the chart, i.e. it should be visible.
For example, at the price of 1500 we open the first Buy order
at 1600 we open the second buy order.
their zero point is at 1550 + (Take Profit = 20)
and here the first and the second order are given a take profit of 1570, when the price reaches this level, both orders will be closed,
and if the price passes (jumps) this level, it will follow and close the orders.
It is very important to keep records of buy and sell orders simultaneously and not to interfere with each other. You should set take profit separately for buy and take profit separately for sell, and only when two or more orders are opened in one direction at the same time.
For two positions you have defined your breakeven point, but for three-four-five?
You should first define the breakeven formula for unidirectional positions, and then you can create a logic.
Hello.
Can you please tell me if I have written the conditions correctly? (Fractal_point_up_buy and Fractal_point_down_buy parameters are normalized.)
Thank you in advance.
Hello.
If all variables are declared, I don't see errors in MQL4 syntax...
What's the problem?
For a position open at 1500, a take at 1570 would be fine (if you don't take StopLevel into account), but for a position open at 1600, a take at 1570 would cause a 130 error - wrong stops. After all, a Take cannot be lower than the opening price for a Buy. This is already a StopLoss.
For two positions you have defined your breakeven point, but for three-four-five?
You should first define the Breakeven formula for unidirectional positions, and then you can work out the logic.
It all depends on when we set or change Take Profit. It is based on the current price.