Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry Price Question

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

    Entry Price Question

    I've noticed this before and figured it must be a result of the simulated order entry algorithm but not sure. In the attached picture notice the area inside the elipse. There is a short that was entered at 486.1 but the low of that bar only got to 486.3. This happens relatively frequently in simulation when running my strategy. Can you please explain why this happens?

    Thanks,
    Mike
    Attached Files

    #2
    Hi Mike,

    I assume you are using limit orders in your strategy.

    Indeed this is a result of the underlying simulation environment in NinjaTrader.

    You see this display because you use limit orders in backtesting and this always creates fill assumptions. Since the signal bar has already closed you can only submit your order on the next bar, but also since you are using Limit orders it is possible to get fills outside of the bar. If this behavior is not what you expect options for you would be to try changing your fill algorithm to 'Liberal'.

    The two system fill algorithms are:


    Default
    An algorithm that takes a conservative and more realistic approach to filling limit and stop limit orders.
    • Limit orders only fill if the limit price was penetrated
    • Limit orders are always filled at the limit price specified never better (for example, if a limit order is submitted on bar n, NT will check if the order is filled on bar n+1, if this bar gaps down and the limit order was a buy, the order would be filled at the limit price and NOT the high of bar n+1)
    Liberal
    An algorithm that takes a liberal approach to filling limit and stop limit orders.
    • Limit orders fill if the limit price was touched
    • On gap down bars, buy limit orders will fill at the high of the gap down bar
    • On gap up bars, sell limit orders will fill at the low of the gap up bar
    As an alternative, you can code your own fill algorithm, please review this link for that purpose - http://www.ninjatrader-support.com/H...FillTypes.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand,

      I figured that was it and now that I know what it is I can deal with it.

      However, I'm using EnterLong() and EnterShort() for the time being and so based on the documentation that says I'm entering with a market order. So, does this change your answer any?

      Comment


        #4
        Realtime? Backtesting? Connectivity provider?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          oh gee...there's never enough information it seems.

          yes to realtime but sim account
          no to backtesting
          zenfire is my datafeed

          backtesting in strategy analyzer doesn't exhibit this behavior.

          Comment


            #6
            Zen-Fire data is timestamped by them. Executions is timestamped by your PC clock. If you see such discrepancies on market orders it is likely due to out of sync PC clock. Please try resyncing your PC clock.

            There is no guarantee this can resolve the issue for you though because as long as Zen-Fire timestamps do not match your PC clock exactly there is no way to make this sync. Executions will always be shown on the chart based on what it was timestamped by your local PC clock even if the data was ahead as timestamped by Zen-Fire.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              thanks and that makes sense...I have a program running all the time that synchronizes my pc clock and i also restart NT to make sure it has the right time in the event the PC clock has been reset by the resync.

              I've never seen that discrepancy when trading my real money account so when I saw it with my strat on sim then I wondered.

              Thanks again,
              Mike

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bmartz, 03-12-2024, 06:12 AM
              5 responses
              32 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by Aviram Y, Today, 05:29 AM
              4 responses
              13 views
              0 likes
              Last Post Aviram Y  
              Started by algospoke, 04-17-2024, 06:40 PM
              3 responses
              28 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by gentlebenthebear, Today, 01:30 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by cls71, Today, 04:45 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X