I have just started trading an ea on my live mt4 account through ic markets. In the demo account and strategy tester the ea worked as expected with stop loss taking effect as soon as the position moves in my favour, rather than waiting for the position to become profitable. I have read in several places that by design Mt4 does not activate trailing stops until the position moves in your favour by the number of pips of your trailing stop. I wanted to have a trailing stop that activated as soon as my position moved in my direction so as to minimise loss on losing trades as well as allow winning trades to run their course.
I thought i had achieved what i wanted simply by commenting out the relavant line of code as shown below:
// if(Bid-OrderOpenPrice()>MyPoint*TrailingStop) //This line commented out in ea
Can anyone explain why this works in demo but not live account?
It worked well in about a month of forward testing via my demo account and also worked as expected in the strategy tester.
Now that i have activated the ea in my live account the modify of the stop loss does not appear to be working as it did in the demo account. Is there indeed any way to have trailing stops activate as soon as a position moves in you favour or is this a limitation of MT4?
I am also confused as to why the strategy tester gives me different results for different optimization runs of trailing stop. On the US500 i am using a SL of 550 and a trailing stop of 640. To my mind this should make the trailing stop irrelevant, as the SL will always trigger first as it is constantly modified by the ea in the same way a trailing stop should work?? Have i got the functioning of SL and TS in Mt4 wrong?
Thanks in advance for your responses,
To add comments, please log in or register