Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ASM Strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ASM Strategy

    I am implementing an ASM strategy as follows:

    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?

    #2
    imported post

    We are going to release another beta update likely Monday that has revamped all of the ASM strategy methods so do not spend muchmore time debugging the current source code.

    If trading both manually and have a NinjaScript strategy execute an ASM Strategy in the same market, you have to be sensitive to what buttons you press manually.

    Pressing Flatten Everything, ClosePosition via Positions Tab or pressing the CLOSE button in the SuperDOM with your left mouse button will close the position, cancell all working orders and terminate any active strategies. This is likely what is happening. Instead, when closinga strategy in the SuperDOM, use your middle mouse button which internally closes the strategy and position associated to it, NOT the actual account position. This will leave your NinjaScript strategy running. More information on this with the new methods in the next udpate in the Help Guide.

    Ray
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    561 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    325 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X