Assistant as close all if profit
-
Hello
I need an assistant that close all positions If It reach determined profit in MT5.
THanks -
Is simple create a project, paste shared link here if not working.
-
@jstap
I tried but Unfortunately It didn't work
https://fxdreema.com/shared/tN6KMR38d -
@jstap
In Event section instead of "on Tick" I even "on Trade" arranged these block But It didn't work -
Looks like it should work, how are the trades being placed?
-
@jstap
manually placed and I need an assistant when I'm scalping and It quickly check profits and If It was positive close all positions. -
It is because in most blocks you have a manually open setting, change all these and should work:

-
@jstap
I've done It But didn't work!! -
Set tis up to place random trade on back test, that way you can see what happens in quick time
-
@jstap
I have tested in live trade But It didn't work . -
Test on back test
-
@firooz You said that the calls are placed manually but in your blocks you didn't select "Manual calls". So in ALL BLOCKS select the group mode to manual calls or both manual and automated.

-
@karthiiy
I've done every selections but It didn't work . Even I moved all blocks in "on Trade" event sections But It didn't work. and I tested in live trade to close my all positions if My profit got positive . unfortunately It didn't work. -
@firooz Im not sure how to want to close the calls but below is the simple step that when the desired profit reaches as per the input, it will close all positions.
-
@karthiiy
Thank you very much Karthiiy It worked.
I think I just complicated the process by Loop blocks and They were unnecessary .
You Know I want to put a stop-loss in my trade from my open order just to prevent about events like disconnect with Internet . and I'm trying
Its link:https://fxdreema.com/shared/owpAXdY5 -
@firooz I think you are again complicating with the blocks. Check profit (unrealized) can be used for SL also. If you give negative value it will take as stop loss. I never tried this but this is as per my knowledge. You can try and say what happens.
-
@karthiiy
The problem is Loss is negative figure and the Block couldn't recognize minus figures and It didn't work -
@karthiiy
I 've made these blocks But It didn't work for stop-loss but in taking profit It works.https://fxdreema.com/shared/XlMWeMfW -
@firooz I had sent you the link in my previous reply but you made it wrongly in your EA.
Connect the SL block to "If Position" block in orange.
-
@karthiiy
I didn't get you what you mean . your link was just for taking profit but for stop-loss I tried many blocks even in orange output .
by any way Thanks for your help