Modifying Virtual Stops
-
Hi,
After hours of battling, I have decided to give up and simply ask:
How do I modify a virtual stop loss when price reaches a certain percentage of TP? I know how to do this normally if using hard stops (by using "Modify Stops"), however since virtual SLs and TPs are not stored in the trade's statistics, there is nothing for the EA to base its calculations on.
An example is I want to move SL from break even to 10% in profit when prices reaches 50% of TP.
-
Virtual stops are just one setting - use them or not. Then in the EA everything what works for hard stops should work with virtual stops, so there is no difference in the EA. Only if there is some bug somewhere, who knows. Give me some simple project where everything works with hard stops, but as soon as you enable virtual stops they don't work the same?
-
Hi,
You are right. I have just scaled everything down and tested with a simple EA and it works both ways. So it must be something else in my original EA that's the issue.
Sorry for the bother.
-
I was just looking at your latest EA and I noticed that there is no "For each..." blocks. This is something that I repeat over and over again, this block is a MUST when pink blocks are involved - https://fxdreema.com/demo/mt4-loop-how-it-works
-
Thanks. I had achieved the same result using counters. But it was way more long-winded.
Thanks for pointing that out. Will amend my EA