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

Live trades not executed - Time filter???

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

    Live trades not executed - Time filter???

    Hello Ninja gang,

    One of my strategies does not execute trades that are shown in backtest, and in the historic performance tab when I restart the strategy. I know that there can be discrepancies and read through the help guide section without success.

    I think that my issue might be related to a time filter I use that is pretty similar to the one here.

    My OS has Paris time, and i'm connected to IB live data with KinetickRT for historical data. My guss is that there is something wrong with the timestamps in the live feed, since my system is coded with Time values for Paris. Can someone please clarify how the timesatmps work, and is there anything I should know when using the time filter?

    Thanks in advance,

    Marco

    #2
    Hi Marco, sorry to hear about that issue. Generally the time zone used by NT would be your local one, here it would not matter which feed provided the data. What would be different is the timestamping of your bars, Kinetick would natively stamp the data where as the IB connection would rely on your PC clock. So it would be good to ensure a regular sync to an accurate source is done. To further isolate would definitely add print statements in to help you debug exactly when your filter conditons would allow for an entry on live data, potentially also data differences could come into play as you run on two different feed sources (filtered vs unfiltered) comparing historical to live.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      Can you please tell me what exactly you mean by "regular sync to an accurate source"?

      I'll try print statements and re-post here when I can provide more details.

      Although: I would prefer relying only on Kinetick unfilitered data, but unfortunately there are some markets they do not provide (if my memory is correct it was ICE).

      Comment


        #4
        You're correct on the ICE considerations here.

        For the sync, there's tools like Dimension, Atomic Clock or Network Time Sync that could do that for you or you would use the Windows inbuilt Internet Time tab in your clock, just right click on the OS clock and select to Adjust Date/Time. The rightmost tab would allow you to sync the clock to an external server time source like nist.gov
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Ah ok I didn't understant, I am already syncing my system time every morning.

          When I enable the strategy (sim01) with traceOrders and print(), the output reads "Entered internal PlaceOrder() method..." for the trade that was not executed in live trading. I also looked at the log an trace files, but there were no related issues.

          I'm curious about what is going on, but it might be faster to simply create a session template for the strategy.

          Comment


            #6
            Thanks, could be a data issue or how your conditions are evaluated realtime vs historical. Are you familiar with our Market Replay? Then you could rerun / debug the scenario further with intrabar formation in the bar's present.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Yes I know the market replay feature. I even have recorded data for the trade in question, but since i have other strategies running I'll have to wait to try that.

              Since the strategy is on 10 min data and I have CalculateOnBar = true, I guess it's not the code eval in RT vs Hist.

              I just tried the session template approach, but now some data I use for calculations in the entry conditions are take from the previous session...

              Comment


                #8
                Correct, the session template would influence all data available to your script, whereas the time filter just limits when action could be taken by your condition, however items not filtered would have access to all data your chart could provide.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by truepenny, Today, 03:45 AM
                4 responses
                20 views
                0 likes
                Last Post truepenny  
                Started by nightstalker, 05-04-2024, 02:05 PM
                4 responses
                45 views
                1 like
                Last Post Leeroy_Jenkins  
                Started by Drone360x, Today, 10:27 AM
                0 responses
                3 views
                0 likes
                Last Post Drone360x  
                Started by NUVERSA, Today, 10:08 AM
                2 responses
                12 views
                0 likes
                Last Post NUVERSA
                by NUVERSA
                 
                Started by truepenny, Today, 03:59 AM
                5 responses
                22 views
                0 likes
                Last Post truepenny  
                Working...
                X