Stop Trading After Profit Reached For The Day (or Loss)
-
This should be easy and I've tried many. many, methods that O have read here in the forum and I can't get any of them to work consistently.
I am using MT4 and Strategy Tester and possibly the tester is the issue.
During a trading session by the EA many trades might be taken.
If the TOTAL profit (or LOSS) from all these trades is $100 I would like the EA to stop trading.
Should be easy but not using the built-in Blocks that I can see.
The first likely candidate is "Check Profit (average)" as it gives the option of "Running Trades Only" OR "Running & HISTORY trades".
Perhaps I misunderstand what "HISTORY" means but I can't get that to work. I assume it means all trades in this trading session with the EA but maybe not.
If just use the "Running Trades Only"... no problem but that doesn't help at all and all of the examples I found in the Forum were NOT using the "Running & HISTORY trades" selection.
I also tried the pink block "check profit" but that also appears to be for running trades.
I also tried using a "Condition" and the "Account" and "Value" selections also to no avail.
I'm sure this can be done using variables and if somebody has nice reliable code block I would appreciate some guidance but (unless I misunderstand its purpose) the code block "Check Profit (average)" should work.
Maybe not in MT4 Strategy Tester?
Thanks for any help.... love fxDreema... it really is revolutionary.
-
Probably your MT4 platfom is configured to show ALL closed trades since your account it was opened. That way your EA will never calculate profit correctly. You need to configure your MT4 to show your daily results only. That way tomorrow the platform results box will be empty and ready for a new run of trades.
-
@isp00rt Thank You. But we are talking about the Strategy Tester. It should reset the balance on each new run. In fact, I can display the balance on the chart and it starts at $10,000 each time.
-
Anybody? Would appreciate any solutions that work in Strategy Tester MT4
-
Hi!
This is how I would go about it:

https://fxdreema.com/shared/Hmmb4zOfbUses 1 variable that keeps track of your daily equity, and 2 constants to set the targets for daily profit and loss
-
Check profit (period of time)
-
Please check---- Have been trying simne past few weeks : https://fxdreema.com/shared/Kc2S2Ueob
-
@wadz91 I replied to your thread with this same question.