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

NT autoplot misaligned

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

    #31
    Originally posted by NinjaTrader_Josh View Post
    One thing to note is that you do SetTrailStop() and explicit ExitLongStop() orders. Please bear in mind that you cannot use both at the same time due to Internal Order Handling Rules.
    Using both in the same code does not make sense i agree. I did not change the code for the test cs. In my actual cs I use them separately...i.e. I have a switch that gives the user the option to use settrailstop or the exitlongstop code...never both.

    Originally posted by NinjaTrader_Josh View Post
    Also, the simulator algorithm can fill you anywhere it doesnt matter what is shown. It really depends on the data you are receiving in terms of bid and ask.
    this would appear to me to be a failing of the simulator algorithm (which up until this event I thought was great). It makes no sense at all to me that you can get a fill outside the range of the bar. This is not possible in real trading and therefore should not be possible in sim I would think.

    Comment


      #32
      ATI user,

      Let us scale it back a few steps. Strip everything out of the strategy and just use very basic EnterLong() and EnterShort()s. Nothing fancy. Or even just try with SampleMACrossOver.
      Josh P.NinjaTrader Customer Service

      Comment


        #33
        ok...here is samplemacrossover
        Attached Files

        Comment


          #34
          The simulator engine takes into consideration a number of factors. For the fills generated it considers bid/ask volume, trade volume, time and also a random time delay as well. All of which are used to determine a probability for filling at various prices. If it fills outside of the bar it has run through its algorithm and calculated out that the filled price may be a feasible price if this were a real order placed to the market. Obviously in sim mode your order would not move the bar, but in real life your order would have enlarged the bar to encapsulate the price it just traded at.

          Consider this example:
          bid = 1000
          ask = 1001
          You submit a market order in simulation. You will get filled at 1001 in simulation because that is what you would expect to be filled at in real life. Now if the real exchange just never trades there then your charts will not show any ticks up there. There is no correlation between the simulated exchange and the real exchange.
          Josh P.NinjaTrader Customer Service

          Comment


            #35
            ok Josh...good explanation....makes sense....thanks for your efforts

            it would appear then that I am moving the market often in sim

            will disregard further plots outside of bar range

            Comment


              #36
              sorry Josh....I think that explanation is not the answer...ie. that the fill could have been at that price in live trading

              it would appear that the problem relates to the bar time...i.e. NT is plotting on the wrong bar

              from the Executions tab, the exit was at the exact same second (9:40:09) as the bar time...and the plot was on the last tick (in the last second) of the wrong bar which had a low of 8300 ...4 ticks above the exit price

              NT needs to plot on the next bar...which actually did trade at the exit price

              even though this is a 30 tick chart, NT should still plot on the correct bar

              I would still argue that this is a plotting bug and not simulator algorithm related
              Attached Files
              Last edited by ATI user; 12-03-2008, 03:33 PM.

              Comment


                #37
                ATI user,

                Try resyncing your PC clock. I just worked with someone else and had the same behavior you are stating here. Syncing PC clocks resolved it.
                Josh P.NinjaTrader Customer Service

                Comment


                  #38
                  checking the bad plots, they all occur when the entry/exit occurs at the time of the bar

                  will try clock resync

                  Comment


                    #39
                    no change after clock resync

                    this is of course in Market Replay....does the resync affect that ?

                    I think the problem is that a 30 tick chart has so many bars that often an execution takes place at the exact time of the bar...and NT does not check to see if the bar traded at the execution price before plotting...NT needs to wait 1 second and plot on the correct bar

                    maybe related to bar construction?

                    guessing of course
                    Attached Files

                    Comment


                      #40
                      ATI user,

                      NT does not check. Try it on Simulated Data Feed or on a live data feed. SampleMACrossOver.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #41
                        5 tick euro on sim feed

                        plots exit below bar range
                        Attached Files

                        Comment


                          #42
                          5 tick euro live feed....after internet time sync
                          Attached Files
                          Last edited by ATI user; 12-04-2008, 12:56 AM.

                          Comment


                            #43
                            Hi ATI user,

                            Please tell me which live feed you were using and all your settings on the SampleMACrossover strategy.

                            Does you see this on any strategy trade?

                            Thanks!
                            BertrandNinjaTrader Customer Service

                            Comment


                              #44
                              zenfire

                              settings are in charts: 10 25 (defaults) and 3 6

                              happens on all strategies I run

                              Comment


                                #45
                                ATI user,

                                I am going to have to suggest you get a clean reinstall of NT and .NET.
                                1. Uninstall NT
                                2. Uninstall .NET
                                3. Delete My Documents\NinjaTrader 6.5 (BACKUP EVERYTHING YOU WANT FIRST. NINJASCRIPT, WORKSPACE, REPLAY, ETC.)
                                4. Clear internet browser cache
                                5. Reinstall .NET 2.0
                                6. Reinstall NT
                                7. Resync PC clock
                                8. Retest with live data
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Seneca, 08-25-2020, 08:31 AM
                                3 responses
                                5,946 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by Tradereh2020, Today, 06:29 AM
                                0 responses
                                2 views
                                0 likes
                                Last Post Tradereh2020  
                                Started by slightly, Today, 12:49 AM
                                1 response
                                9 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by casabella, Today, 04:12 AM
                                1 response
                                17 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by ETFVoyageur, Today, 05:50 AM
                                0 responses
                                6 views
                                0 likes
                                Last Post ETFVoyageur  
                                Working...
                                X