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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X