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 aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    383 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    4 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X