I am having trouble when I try to flat a trade and open another right after.
I´m using my inside strategy:
CalculateOnBarClose = true;
protected override void OnBarUpdate()
{
...
if( ............)
{
ExitLong(Position.Quantity);
EnterShort(QT);
}
The trade is never seems to open the correct QT .
I think with the problem is that I am closing the trade and opening the other in the same bar, do you think that is whats causing the error? If it is, how I do to close and open correctly ?
Kind regards
Comment