Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing entry price bar by bar in ATM

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

    Changing entry price bar by bar in ATM

    I have a strategy which enters on a pullback to a moving average. I want to use it in conjunction with an ATM.

    "AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, EMA(20)[0] + 1 * TickSize, 0, TimeInForce.Day, orderId, "AtmStrategyTemplate", atmStrategyId);"

    The problem is that the entry price does not change bar by bar. It stays constant at the EMA price when entered. How do I get entry order to change bar by bar?

    #2
    ninjablanks, you would need to cancel the order if a new bar is seen and then resubmit at your updated price level for the EMA.

    Comment


      #3
      Do you have any code sample? Can you direct me to an example? I have done several searches with no luck.

      Comment


        #4
        I would unfortunately not have a dedicated sample for this case, however here 2 ways to achieve what you seek:

        1) Cancel the entry order and resubmit then on the new bar by calling AtmStrategyCreate() again -


        2) Or change the entry order with - http://www.ninjatrader.com/support/h...entryorder.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        72 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X