Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding size to an existing ATM Strategy

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

    Adding size to an existing ATM Strategy

    Hi There,

    I have a strategy that enters the market with an atm strategy (just 1 target, 1 stop) as follows:
    Code:
    AtmStrategyCreate(OrderAction.Buy, EntryPrice >= GetCurrentAsk() ? OrderType.StopMarket : OrderType.Limit, EntryPrice, EntryPrice, TimeInForce.Day, orderId, "ToffyLadder", atmStrategyId, (atmCallbackErrorCode, atmCallBackId) => {
    //check that the atm strategy create did not result in error, and that the requested atm strategy matches the id in callback
    if (atmCallbackErrorCode == ErrorCode.NoError && atmCallBackId == atmStrategyId){
    isAtmStrategyCreated = true;
    stratRunAttempts++;
    }
    });
    I subsequently adjust the target price and the stop price.
    Now I would like to add to this position so that the target and stop orders pick up the additional quantities for the exit. (Which works just like that when manually entering trades as long as the same ATM strategy is selected.)

    I ensure programmatically the same ATM Strategy is selected in Chart Trader and then simply enter via
    Code:
    EnterLongStopMarket(0, true, qty, stopPrice, "Entry_" + n);
    The orders are executed fine, but not added to the ATM strategy.

    Two questions:
    1) How do I need to create the entries to be added? Each as a separate AtmStrategyCreate?
    2) Once the ATM Strategy is active, how can I obtain the current price level or TARGET1 and STOP1?

    Thanks in advance!

    #2
    Hello Adfra,

    With AtmStrategy methods there would not be a way to scale in to an existing Atm. A new one would have to be created with AtmStrategyCreate().

    Through the Addon approach the order quantities could be modified.

    Below is a link to a forum post that discusses.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X