Open a position in reverse position of previous trade (closed with stop-loss) with take-profit of same amount of loss in pips (to breakeven my previous loss)
-
When my position (BUY) is closed in stop loss level, I want to open (SELL) position at that level and take profit level of this new position must be equal to my previously closed position s loss (in pips)
For example, My BUY position is closed due to stop-loss with 50 or 124 or 243 pip. I will open immediately SELL position after closing my BUY positon and take-profit level of this SELL positon will be 50 or 124 or 243 pip (whatever the loss of my previous position. It varies not a constant value)I appreciate if you help me
-
That's a martingale:

-
Thank you for the answer but this is for lot size. I do not want to change lot size. I want to adjust TP (or SL) level according to previous trade. The logic is that; if I loose in the trade, I want to compansate my loose in next order (to get breakeven), I want to be in breakeven state at the end of second trade
-
I see. Can you plase share your project to take a look on it? That wil be easier to do.
-
https://fxdreema.com/shared/SROTAjZlc
Variables are not working. Buy order and pending order is executing but TP in pending order is not working.
In this version I have created pending order at the time of open buy order with TP (loss of buy order) of courseI know that I have to cancel this pending order if buy order is closed with TP
In another version I may wait until buy order is closed with SL and than immediately open sell order with TP ( loss of buy order) -
Ok. Here you have some things to do:
-
Disconnect all blocks below 'buy now'. It is not recemmended to connect ANY block immediately below buy/sell now unless it is inevitable. You will have to create a separate tree of blocks from there.
-
Move 'For each trade' block on top of the new tree of blocks. Pink block need to be headed by that 'For each trade'.
-
Terminal Variables in fxDreema are used to communicate your MT4 with a different MT4 platform. Unless this is exactly what you want, don't use then. You will have to use conventional variables.
Do this changes and let me know.
-
-
https://fxdreema.com/shared/M63AAaIbc
Pending order is not executing. I did not understand the problem
-
Do you want to create the sell pending order at the same time the buy trade is open? If so then connect block 41 below block 2. That way both blocks 3 and 41 will be executed one after the other.