My scenario is:
have 2 strategies (called ST_A and ST_B working simultaneously on the same instrument).
For timimg reason, ST_A is excuted first and probably I have a position in the market when ST_B wants to fire another order. I don't want 2 positions at the market, just want the second strategy to avoid entering the market again
Briefly, I just need to read from ST_B if the account position is NOT flat to avoid the EnterLong()
Something like
if (Account_is_flat())
{
EnterLong();
}
Will (Position.MarketPosition == MarketPosition.Flat) do the trick? As far as I tested it, it seems to be startegy position, not account position.
Thanks!
Comment