Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programming ATM Strategies

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

    Programming ATM Strategies

    I was programming and atm strategy using

    AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, Close[1], 0, TimeInForce.Day, orderId,"AtmStrategyTemplate", atmStrategyId);

    what I found out in a strategy

    if(Position.MarketPosition == MarketPosition.Flat )
    {
    }
    does not work.

    if (GetAtmStrategyMarketPosition(atmStrategyId) != MarketPosition.Flat)

    {}

    DOES WORK


    my questions are

    1. how do one track ATM order when flat, pending, filled. or closed.
    Iorder does not work on atms.
    2. if i have this strategy working on 2 instruments, how do i seperate the orders
    example if gc is flat and gc is long place a pending order in gc

    Most of my methodologies for my trades work on calculatebaronclose = true; but 2 of my trading methodologies need to be a false state. I am using

    if(FirstTickOfBar)

    for most of my trades.

    thanks

    #2
    Hello ballboy11,

    You are correct. When placing orders using AtmStrategy methods, the strategy is not able to see these orders or positions as this is all handled by the NinjaTrader core.

    All information and modifications must be through AtmStrategy methods.


    Included with NinjaTrader is an example strategy called SampleAtmStrategy. This shows the basics of working with AtmStrategy methods.

    Also, I've posted an example of an AtmStrategy with a breakout on another forum thread.


    To check the entry order status use GetAtmStrategyEntryOrderStatus().
    Separate the orders and Atms by using different IDs for the orders and Atms.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    74 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    26 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    62 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X