Hi, I am trying to test some system in the EUR/USD pair (5 min) and I want to set one stoploss order so that it would exit the trade if price goes against me in 15 pips.
I have tried:
CODE:
Please log in to see this code.
But it seems it just ignores the stop.
Any idea what am I doing wrong?
Thanks,
-Enrique
Size:
Color:
If you want Alerts, change the bar to bar+1.
If you need to exit a short trade, you need to change the "-" sign to "+".
Size:
Color:
I want to exit a long trade if the price goes against me, so I guess it should be "-", but it just ignores it.
Size:
Color:
Please be more specific with regard to your code, for now it's only guesswork.
Size:
Color:
This is the code...
CODE:
Please log in to see this code.
By the way, there is something wrong. Look at this image:
Size:
Color:
You need to set up your Forex symbols in the Symbol Info Manager and turn on Futures Mode. That way the significance behind the decimals will not be lost when rounding to the "Tick" value.
Doing that should make things work fine, but if you still intermittently see trades that don't execute when you expect, go to Preferences (F12) > Backtest Settings and "Turn off limit/stop order rounding entirely".
Size:
Color:
Ok, thanks! Now it seems better :)
Size:
Color: