There are a few issues going on with the standard pivots indicator:
- The values seem incorrect in Beta 8 (but I think this may have been reported in B7).
- 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).
- 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.
- 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:
- Create new 5 min chart with red instrument link (loading 800 bars)
- Right click in its tab and duplicate this into a new window.
- Repeat that 4 times so you have 5 charts each with the identical 1 tab
- Change the intervals of the 5 charts so they are (minutes): 3,5,15,60,240
- 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.
- 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
- Click through the list and change a few symbols for maybe 5 minutes.
- 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.
- Check tracefile, you will see it is only calling ‘minute data’.
- Compare the Pivot values of the different charts against each other (as per the attached screenshot they show different for me)
- 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.
- -------
- Now add the Pivots indicator to all charts (ensure the pivots are 'daily' and it is set to ‘calculate from intra-day data’)
- 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.
- 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
Comment