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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, Today, 10:57 PM
        0 responses
        2 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        7 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Working...
        X