Close trades when they reach X pips loss
-
I want to make a very simple EA which is closing all trades (for that magic number) when they reach X pips negative. I did the blocks shown in the image, but it doesn't seem to work. What have I done wrong here?

-
there is block "Check profit (unrealized)" - try use it ...
-
Thank you. I tried this, but get an error when compiling it.
It says 'TradesTotal - function not defined' and also 'TradeSelectByIndex - function not defined'.This is what I did.

-
it is bug, admin @fxDreema should repair it

