if (AsmStrategyMarketPosition == MarketPosition.Flat && !AsmStrategyActive)
{
if (BuySignal == true)
{
AsmStrategyCreate(Action.Buy, OrderType.Market, 0, 0, TimeInForce.Day, "Test");
}
else if (SellSignal == true)
{
AsmStrategyCreate(Action.Sell, OrderType.Market, 0, 0, TimeInForce.Day, "Test");
}
}
I set this strategy up to run against Sim101, but found that, if I manually trade against another account, the strategy does not run. I assume this is because manually trading with an ASM makes AsmStrategyActive = True and AsmStrategyMarketPosition not flat, even though I'm using a different ASM for manual and the strategy. Is this correct? Is there any way to determine which ASM strategy (i.e. "Test" versus "Production") is active from within the script?
Also, do AsmStrategyActive etc. functions span all instruments or do they only look for active strategies in the current instrument?
Comment