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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        85 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 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
        67 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X