For each trade...check profit (unrealised) not working :(
-
Hi all, Do you know why my trade is not closing in actual, but in simulation it works perfectly. I deployed it on US30. I had to manually close out 2 trades when I saw that my trades were sitting on a total $28, when infact as per algo, they should have closed 2 hours ago when total reached $20. Just to be sure, I ran simulation on the same period and in simulation, algo did close those two trades exactly at the candle when total turned $20. I confirm there is not SL/TP in "Buy now" block. Please ask if you need any clarification or I have not elaborated to the extent I should have. Thanks in advance.

-
@eajurms Can you please share the link to your project instead?
-
Hi @l-andorrà , please see link
-
?? Anything anyone can help??
-
@eajurms by default, fxdreema EA only works with automated trades, it doesnt touch manual trades.
Change that from Filters -> Group mode -> any trade
-
@eajurms No project is visible. This is the way to upload a link:

-
Thanks. Here is the link
https://fxdreema.com/shared/NSPhMqYAb -
i think you need to change the check profit block.
Profit is the sum of Money (by position is probably the one you want?)
-
@jsauter86 sorry i dont understand. I want profit as the sum of money from all open trades from the EA1 in US30. I have another EA2 running on US30 on another tab of MT4. I don't want trades from EA2 to be considered when evaluating the sum of profit.
-
@roar I don't have any manual trades open. I just have a few trades open from this EA (lets call it EA1)and I have a few trades open from another EA (lets call it EA2) on US30. I only want to close trades that are opened by EA1 when the above condition is met
-
i dont think your logic is right for closing the trade.
I would start; for each trade, check conditions (2 conditions), close trade. no OR block needed. Just put both closing conditions coming from the same "for each trade" or perhaps "if trade" works better for you.
-
-
nice one rahim, I've never used bucket of trades before.
-
@rahim-1 awesome man. works great. thanks!!