something like:
if (open position conditions meet)
{
if (! exists this direction AccountPosition) //if a position is not opened manually
EnterOrder;
}
if (exit conditions meet)
{
if (! this direction AccountPosition already exited) //if a position is not closed manually
ExitPosition;
}
There might be the same thing with stop loss and/or profit target orders, there should be a switch for using either Strategy generated position or Account position(which could be contributed by both ATS and manual)
Comment