I have a large strategy, which has been loading 3 additional timeframes. It has been months in development and is working fine.
This week I had to add another timeframe, a Day bar series of the same instrument as the chart. I'm doing it like this:
if (aTR_Filter_Enabled)
{
Add(PeriodType.Day,1);
}
The trouble is, when this is activated (when the user-input 'aTR_Filter_Enabled' is true, and the Day timeframe is added, OnBarUpdate() never executes.
* There are no errors in the Log tab of the Control Centre.
* I have print statements in the OnStartUp() showing me what bars series I have, the output is this (which proves OnStartUp() is being executed:
0: ES 03-12 3Renko, count is 302
1: ES 03-12 2Minute, count is 1262
2: YM ##-## 4Renko, count is 470
3: ES 03-12 5Renko, count is 119
4: ES 03-12 1Day, count is 3
I've had a look in the Trace file. Here is a large slab, but there is an Exception down the bottom hopefully you can help me with.
2012-03-01 21:29:10:650 (Unknown) Cbi.Connection.Connect0 Disconnected assembly=7.0.1000.9 date=1/03/2012
2012-03-01 21:29:10:650 (Unknown) Cbi.Connection.Connect1
2012-03-01 21:29:10:650 (Kinetick REALTIME) Cbi.Connection.Connect9
2012-03-01 21:29:10:712 (Kinetick REALTIME) Cbi.Connection.ProcessEventArgs.ConnectionStatusEv entArgs Connecting Connecting NoError
2012-03-01 21:29:10:728 (Kinetick REALTIME) Cbi.Connection.ConnectNow1: DataConnection=False
2012-03-01 21:29:10:728 (Kinetick REALTIME) Cbi.Connection.ConnectNow2
2012-03-01 21:29:10:728 (Kinetick REALTIME) Cbi.Connection.ConnectNow.CreateLoader
2012-03-01 21:29:10:728 Server.Client.Connect
2012-03-01 21:29:10:744 Server.Client.Loop0-0: 64.202.118.179/31654
2012-03-01 21:29:12:538 Server.Client.Loop1-0
2012-03-01 21:29:12:538 (Kinetick REALTIME) Cbi.Connection.ConnectNow.Connect
2012-03-01 21:29:12:538 (Kinetick REALTIME) Cbi.Connection.ConnectNow9 ok
2012-03-01 21:29:12:553 (Kinetick REALTIME) Cbi.ConnectionStatusEventArgs.Process: Connecting Connecting
2012-03-01 21:29:12:553 (Kinetick REALTIME) Kinetick.Adapter.Connect: login=405398 newsDaysBack=1
2012-03-01 21:29:12:662 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: retrieving server info
2012-03-01 21:29:16:453 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow.AccountLogin: '66.112.148.212:60000'
2012-03-01 21:29:16:453 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow.HistoryLookup: '66.112.148.210:60050'
2012-03-01 21:29:16:453 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow.MarketDepthLogin: '66.112.148.211:60001'
2012-03-01 21:29:16:453 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow.News: '66.112.148.209:60018'
2012-03-01 21:29:17:171 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: NINJATRADER
2012-03-01 21:29:18:107 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: LOGIN
2012-03-01 21:29:18:419 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: PASSWORD
2012-03-01 21:29:19:620 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: READY
2012-03-01 21:29:19:636 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow.Auth: 'NYMEX_GBX DME_GBX COMEX_GBX CME_GBX CBOT_GBX'
2012-03-01 21:29:19:636 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: starting L1 thread...
2012-03-01 21:29:19:636 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: starting L2 thread...
2012-03-01 21:29:19:636 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: starting historical data thread...
2012-03-01 21:29:19:651 (Kinetick REALTIME) Kinetick.Adapter.ConnectNow: starting news thread...
2012-03-01 21:29:19:667 (Kinetick REALTIME) Kinetick.Adapter.BarsWorker: started historical data thread
2012-03-01 21:29:19:667 (Kinetick REALTIME) Kinetick.Adapter.NewsWorker: started news thread
2012-03-01 21:29:19:979 (Kinetick REALTIME) Kinetick.Adapter.L1Worker: started L1 thread
2012-03-01 21:29:20:104 (Kinetick REALTIME) Cbi.Connection.ProcessEventArgs.ConnectionStatusEv entArgs Connected Connected NoError
2012-03-01 21:29:20:135 (Kinetick REALTIME) Cbi.Connection.ProcessEventArgs.AccountEventArgs: name='Sim101'
2012-03-01 21:29:20:135 (Kinetick REALTIME) Cbi.AccountEventArgs.Process: Sim101
2012-03-01 21:29:20:150 (Db) Db.Globals.Recover1: 'Sim101'
2012-03-01 21:29:20:603 (Db) Db.Globals.Recover2: 'Sim101'
2012-03-01 21:29:20:618 (Kinetick REALTIME) Cbi.Account.RestorePositionExecutions1: account='Sim101'
2012-03-01 21:29:20:618 (Kinetick REALTIME) Cbi.Account.RestorePositionExecutions9: account='Sim101'
2012-03-01 21:29:20:618 (Kinetick REALTIME) Cbi.AccountUpdateEventArgs.Process: Account='Sim101' ItemType='BuyingPower' Currency='Unknown' Value=1000000
2012-03-01 21:29:20:634 (Kinetick REALTIME) Cbi.AccountUpdateEventArgs.Process: Account='Sim101' ItemType='CashValue' Currency='Unknown' Value=500000
2012-03-01 21:29:20:634 (Kinetick REALTIME) Cbi.AccountUpdateEventArgs.Process: Account='Sim101' ItemType='ExcessEquity' Currency='Unknown' Value=1000000
2012-03-01 21:29:20:634 (Kinetick REALTIME) Cbi.AccountUpdateEventArgs.Process: Account='Sim101' ItemType='InitialMargin' Currency='Unknown' Value=0
2012-03-01 21:29:20:634 (Kinetick REALTIME) Cbi.AccountUpdateEventArgs.Process: Account='Sim101' ItemType='RealizedProfitLoss' Currency='Unknown' Value=0
2012-03-01 21:29:20:650 (Kinetick REALTIME) Cbi.ConnectionStatusEventArgs.Process: Connected Connected
2012-03-01 21:29:20:650 (Kinetick REALTIME) defaultTimeToClose=15/02/2011 12:00:00 AM flattenAll=False
2012-03-01 21:29:21:648 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='YM ##-##' from='2012-03-01 19:00:00' to='2012-03-01 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Default 24/7'
2012-03-01 21:29:24:239 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES ##-##' from='2012-03-01 19:00:00' to='2012-03-01 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Default 24/7'
2012-03-01 21:29:30:245 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='$CADCHF' from='2012-03-01' to='2012-03-01' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0 session='Default 24/7'
2012-03-01 21:29:33:583 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES 03-12' from='2012-03-01 19:00:00' to='2012-03-01 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='US Equities ETH'
2012-03-01 21:29:40:821 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES ##-##' from='2012-03-01' to='2012-03-01' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0 session='Default 24/7'
2012-03-01 21:29:45:221 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES 03-12' from='2012-03-01' to='2012-03-01' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0 session='CME US Index Futures ETH'
2012-03-01 21:31:14:404 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES 03-12' from='2012-03-01' to='2012-03-01' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0 session='US Equities ETH'
2012-03-01 21:31:16:697 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='YM ##-##' from='2012-03-01 21:00:00' to='2012-03-01 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='US Equities ETH'
2012-03-01 21:31:19:255 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES 03-12' from='2012-02-29' to='2012-02-29' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='US Equities ETH'
2012-03-01 21:31:20:191 (Kinetick REALTIME) Data.Bars.GetBarsNow: instrument='ES 03-12' from='2012-03-01' to='2012-03-01' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='US Equities ETH'
2012-03-01 21:34:04:076 Code.Editor.OnLoad: Failed to reference 'NinjaTrader.Custom, Version=7.0.1000.9, Culture=neutral, PublicKeyToken=null': System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at NinjaTrader.Code.Editor.OnLoad(Object sender, EventArgs e)
Thanks in advance,
saltminer
Comment