Conditional Stop Loss For Accounts
-
i want two types of stop losses for my account in my ea
- Equity is 10% below account balance closed all trades
- Current account equity is 10k (closed all trades if equity is 9k)
and i want these settings to adjust in mt4
Please help me thanks
-
Some one please help
-
@talalkhan This will do it, you should see enough to create both options you require.
-
@talalkhan In HERE is another example that should help you.
-
@jstap looks like all work done by you, i just need to copy and paste these blocks, am i right? Sorry for question because my math is not so good
So many blocks i am confused -
@talalkhan Yes, just ensure there doing as you like and make sure you have constants/variables named the same, or replace them with what you like.
-
@jstap i think i don't dit it right. Add same constants and variables but not working while back testing

-
@talalkhan Put a shared link, can't see enough from a picture to see what's happening.
-
@jstap i find how to set problem 2 but i want if all trades are closed ea will not trade again. is it possible?
i back test this, After closing of all trades on equity conditions EA is working again if conditions are matching for buy sell -
@talalkhan In your picture I don't see the stop trade condition for when equity is met, this TRADE true/false can be used for any reason to stop the EA, if your conditions to stop EA are met trading stop's by making bool false, then once per day or whenever you want trade is set to true and, trade continues.
-
@jstap Check this: https://fxdreema.com/shared/xzy8j5uYc
I try like this for equity met stop loss -
@jstap i want to complete this project today

-
@talalkhan You don't need a pink block, these are used to control other pink blocks, or a pink dot inside another block, you need to use the true/false condition before buy/sell, otherwise the other blocks are doing nothing.

-
@jstap sir can you please read my post again and add these two things in my EA. I tried but failed again.
https://fxdreema.com/shared/P0vzYefDb -
@talalkhan Looked at your post again, it still doesn't have the stop trade conditions like I showed in the above picture, add this, if it is still not working post again and ask about your specific problem.
-
ok let me try sir focus on problem no 2
-
@jstap Sir lets make it simple, i decide to leave percentage of equity because its looks tricky
Focus on customize equity SL to closed all trades of account
check my try: https://fxdreema.com/shared/36bpwkjOc
while backtestng ea is working fine and customize equity SL is also working but on real time if EA buy/sell conditions match and after that equity SL hit on same candle. EA closed trades and buy again continuously. Means stop trading after equity SL is still not working. Please check my EA and guide me regarding this. Thank you
How can i solved this?And one more simple question is can i close all accounts trades if EA is playing on one chart or i want to play ea on all traded charts
-
@talalkhan It's no trickier than what you have done, as is when EA put on chart TRADE is set to false, when condition met it's set to false, when is this set back to true? I see no condition for this. You can set terminal variables from 1 if all are using the same platform, not a simple thing and sort a single EA before trying to work with one controlling others.
-
@jstap leave all things i want to close trades when condition met for equity below or above. now check my EA is some thing needed for this condition? i used SL & TP for equity
https://fxdreema.com/shared/o43LX5jIbyou are saying And when it set back to true? If i closed & open terminal again it will again set for buying and selling. Am i right?
-
@jstap Please reply as soon as possible because its a last day of my subscription after that first i will learn dreema then join again, It's an amazing project but if you know how to use this on advance level