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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X