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 NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X