I have 4 Questions,
I use this code to exit all 3 minutes before the close
ExitOnClose = true;
ExitOnCloseSeconds = 180;
When I run Market reply and reach the end of the day I still see unrelized PL = 324 for example , and positions = 1L , which means the position not closed when market close , how to solve that,
2nd Q
I noticed that when I use SetStopLoss ,SetProfitTarget ,SetTrailStop ,
I get more positions ( I want only to have one opened position i.e one contract ) but I get many contracts short or long .
3rd
How to check how many opened positons I have and if they are hort or long
4th
How to exit all positions at once , You have ExitShort(); and
ExitLong(); but I want something like
ExitAll();
Thanks

Comment