Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivot indicator can cause crash in B8 (and other pivot issues)

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

    Pivot indicator can cause crash in B8 (and other pivot issues)

    Hi guys,

    There are a few issues going on with the standard pivots indicator:
    1. The values seem incorrect in Beta 8 (but I think this may have been reported in B7).
    2. The pivot/S/R values can be different on different interval charts. See the attached screenshot - the 3 min chart has different values to the 5 min, and they both have different values to 240 min (and none of the values are correct).
    3. I have only tested this on forex, so it is a possibility the calculations are incorrect due to there being 5.5 days the market is open.
    4. If we have a minute-based chart with the pivot indicator attached and have the settings as ‘calculate from intraday data’, the indicator will still request daily data from the server anyway (see Pivot indicator’s State.Configure “AddDataSeries(BarsPeriodType.Day, 1);”). This seems strange because the indicator uses the minute bars for the calculation (which can be verified by having insufficient minute bars loaded – the pivot indicator doesn’t work). This can cause an issue because:


    There seems to be a bug that can sometimes cause a crash if both minute and daily data are being loaded simultaneously for the same symbol. I had eliminated this particular crash from my system by changing all my charts to minute charts only (my daily charts became 1440 minutes). So it was a surprise when I added the pivots indicator (calculating from intraday data) and NT crashed twice in quick succession with the same error I had been getting when I mixed minute and daily charts. The error message is below, but please note that this does not always happen immediately. It can occur straight away or I can click through symbols for 5-10 minutes and not experience it. I tested this on 3 PC’s when trying to replicate and I was able to do so on two of them.

    2016-01-20 03:36:58:906 *************** unhandled exception trapped ***************
    2016-01-20 03:36:58:906 The process cannot access the file 'C:\Users\Administrator\Documents\NinjaTrader 8\db\day\NZDCAD\2013.Last.ncd' because it is being used by another process.
    2016-01-20 03:36:58:923 System.IO.IOException: The process cannot access the file 'C:\Users\Administrator\Documents\NinjaTrader 8\db\day\NZDCAD\2013.Last.ncd' because it is being used by another process.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalDelete(String path, Boolean checkHost)
    at NinjaTrader.Data.BarsSeries.Save()
    at NinjaTrader.Cbi.Instrument.<>c__DisplayClass189_0. <RequestBars>b__1(Object o)
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()


    I do not believe this error is being caused by another program other than Ninjatrader accessing the file, as I have turned off the anti-virus for testing and excluded the NT folders from everything (including windows indexing) and also replicated the crash on a Windows Server 2012 install which had no other software on it except Ninjatrader.

    Steps to replicate:
    1. Create new 5 min chart with red instrument link (loading 800 bars)
    2. Right click in its tab and duplicate this into a new window.
    3. Repeat that 4 times so you have 5 charts each with the identical 1 tab
    4. Change the intervals of the 5 charts so they are (minutes): 3,5,15,60,240
    5. Right click on each tab and ‘Duplicate in new Tab’ for twice in each window, so you have a total of 3 charts in each window (15 charts total). You can replicate this just using 1 tab/chart in each window but it takes longer so I suggest this way.
    6. Create a new Market Analyser with red instrument link and add some Forex symbols. In my testing I used: EURUSD, EURGBP, EURJPY, EURCHF, EURCAD, EURAUD, AUDUSD, GBPUSD, NZDUSD, USDCHF, USDCAD, USDJPY, CHFJPY, AUDJPY, CADJPY, NZDJPY, GBPJPY, AUDCHF, CADCHF, GBPCHF, GBPCAD, GBPAUD, AUDCAD, AUDNZD, NZDCAD, GBPNZD, EURNZD, NZDCHF
    7. Click through the list and change a few symbols for maybe 5 minutes.
    8. Hopefully you won’t have a crash. If you do have a crash, the error message will be different to the one mentioned in this post.
    9. Check tracefile, you will see it is only calling ‘minute data’.
    10. Compare the Pivot values of the different charts against each other (as per the attached screenshot they show different for me)
    11. Search online for a forex pivot calculator and compare the figures against those figures (being a pip or 2 out would be ok because thats probably just a difference in the forex data)... But they appear to be much more than that.
    12. -------
    13. Now add the Pivots indicator to all charts (ensure the pivots are 'daily' and it is set to ‘calculate from intra-day data’)
    14. Click through a few symbols and then check the tracefile. You will see even though we only have minute charts it is now calling daily data also.
    15. Click through the charts until you get the above mentioned crash (if you get a different crash then please repeat until you get this crash error, as there is another known crash which can happen by clicking through the symbol list that is not related to the pivots).


    Cheers,
    Shane
    Attached Files
    Last edited by ShaneAU; 01-20-2016, 02:18 PM. Reason: Added steps to replicate the different values (in addition to the crash)

    #2
    I'm the one who reported the problem with the Pivots indicator against earlier versions. The problem I had has been fixed. But I only ever use the DailyBars calculation mode (which I gather isn't the best option for Forex,) so I didn't even check the other modes. The intraday mode had been working in B7, so it's likely that the fix for the DailyBars mode broke the intraday bars mode.

    Comment


      #3
      Hi Strategist,

      Using the daily data would make sense in many cases - but because it creates a high chance of a crash when mixed with minute data on the same symbol I can't use that route unfortunately. I had removed all my daily data from my charts and was only using minute charts, which is what had made my system (relatively) more stable before adding the pivot indicator - but that's when NT started crashing again and I saw in the tracefile it was requesting daily data regardless of the 'calculate using intraday) settings.

      I also recall testing the intra-day pivots in previous versions and I was getting accurate figures (at least on the days I checked), so that part does look like a change in B8. The crashing error is found in my tracefiles from much older Beta's though.

      Cheers,
      Shane

      Comment


        #4
        Hello ShaneAU,

        Thank you for writing in.

        I will be testing this on my end and will return with my findings.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Hello ShaneAU,

          I wanted to note that in the trace file, a period stating "1 Minute" does not mean that the charts are displaying a 1 minute chart. Rather, that is the name of the type of bar. A 5 minute bar, for example, would be made of 5, 1 minute bars.

          The behavior of how this is noted is true to the NinjaTrader 7 trace files as well.

          I will be investigating further into the Pivots indicator values. In regards to the crashing that you are experiencing, can you please provide me a copy of your workspace? I just want to make sure I have everything set up exactly as you do to see if I am able to reproduce the crashing on my end.
          Zachary G.NinjaTrader Customer Service

          Comment


            #6
            Hi Zachary,

            Thanks for your reply.

            Yes, I was using the term minute data in the tracefile with the knowledge it was for all minute intervals - not just 1 minute charts. My system was relatively stable when I only used minute based charts (i.e. 3, 5, 15,60,240,1440min), adding the Pivot indicator made the system start calling 'daily' data every time I changed the symbol (as I use the instrument link), which meant I began receiving the same crash & error I had been receiving before I removed the daily data charts from my workspace. I had intentionally removed the daily charts (changed them to 1440min) to try and get around that particular crash error - which had been successful. It seems NT can (occasionally) trip over itself accessing the cache file when loading multiple data types simultaneously of the same symbol.

            Attached is a copy of the workspace. This is a workspace which I created to replicate the Pivots problem so there are no other indicators on the charts, however I originally identified the issues in a different workspace so the issue is not workspace specific. Please note there are 3 tabs in each window, I can replicate everything the same with just 1 tab but it takes longer, so I've done it this way for ease (and is actually closer to how I use the layout in my normal workspace anyway).

            Thanks Zachary & cheers,
            Shane
            Attached Files
            Last edited by ShaneAU; 01-21-2016, 04:08 PM.

            Comment


              #7
              Hi Zachary,

              Sorry I forgot to mention - when testing the Pivots values please ensure NT is set to Eastern Time.

              Cheers,
              Shane

              Comment


                #8
                Hi Zachary,

                Have you had any luck replicating the discussed Pivots issues on NT's side?

                Cheers,
                Shane

                Comment


                  #9
                  I am also having a problem with the pivots using futures. For example, using ES 03-16 and the exact same settings from NT7, the pivots are completely different in NT8.

                  Comment


                    #10
                    Hello ShaneAU and mauigeek,

                    Thank you for your patience.

                    Testing on my end, I can see that the NT8 Pivots indicator does not match NT7's values. I will be submitting this as a bug report. Thank you for catching this!

                    ShaneAU,

                    I am still unable to replicate the crashing issue on my end; would you be able to provide a video demonstrating the crash occurring and the exact steps you have gone through to reproduce the crashing?

                    If you do not already have software to record your screen, you can utilize something like Jing for free: https://www.techsmith.com/jing.html
                    Zachary G.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Zachary,

                      Sorry for the delay responding to your request... I had taken a break from NT8 for several weeks due to the ongoing stability issues. As B9 is pretty close to coming out I will wait until then, and if the issue is persisting I will post a couple of videos showing how to replicate on different PC's.

                      Cheers,
                      Shane

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by trilliantrader, Yesterday, 03:01 PM
                      3 responses
                      30 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Started by cmtjoancolmenero, Yesterday, 03:58 PM
                      4 responses
                      26 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by Brevo, Today, 01:45 AM
                      1 response
                      14 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by rjbtrade1, 11-30-2023, 04:38 PM
                      2 responses
                      74 views
                      0 likes
                      Last Post DavidHP
                      by DavidHP
                       
                      Started by suroot, 04-10-2017, 02:18 AM
                      5 responses
                      3,022 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Working...
                      X