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 fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X