Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy executing an order at price change

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

    Strategy executing an order at price change

    Hi
    was wondering if you could help me out to understand why in this case the strategy is correctly drawing on the chart a background color when condition are met but execute the order at bar close (at the following bar).

    I'd like the trade to happen as soon as conditions are met. To be specific as soon as the 'actual' Bollinger band break above/below.

    attaching here the text of the code.

    for the Bollinger I see that (using the strategy builder) there is 1 period look back...but still the background color is correct and set up is at price change.

    many thanks

    m
    Attached Files

    #2
    Hello percma,

    Thank you for writing in.

    Are you seeing this in real time or historically?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      historically
      Attached Files

      Comment


        #4
        Hello percma,

        This would be expected without a secondary tick series added.

        See under Running a Strategy at the Close of a Bar or Tick by Tick,


        If you add a secondary tick series you should see the trade taken on the bar the condition first became true,
        You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by


        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Not sure I know how to do it.

          But do you confirm that this is a behaviour only for the historical backtest or also live if I don't add a secondary data series?

          Would I need a tick data series or just another data serie like minutes?

          Not sure Intercative Brokers provides tick data.

          Comment


            #6
            Hello percma,

            I would not expect this behavior running in real time as long as the strategy has calculate set to OnEachTick. You would not need a secondary tick series in real time.

            IB does not supply historical tick data however at the following link you’ll see which providers do,


            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by alifarahani, Today, 09:40 AM
            4 responses
            19 views
            0 likes
            Last Post alifarahani  
            Started by gentlebenthebear, Today, 01:30 AM
            3 responses
            16 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by PhillT, Today, 02:16 PM
            2 responses
            7 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Started by Kaledus, Today, 01:29 PM
            3 responses
            11 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frankthearm, Yesterday, 09:08 AM
            14 responses
            47 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Working...
            X