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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    89 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    92 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    70 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    87 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    64 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X