Migration took 50 minutes and app started right up without me having to do anything (didnt know I had .net3.5 who knew?)
That being said, I have a question regarding data migration.. what if there was orphan data sitting somewhere with no corresponding instrument in the list (back in the day, I might have naively deleted 12-07, 03-08 etc).. would that get migrated as well? if so, how do I know
a)that there is complete data for it and
b) how do I access it since instrument manager wont let me add those old instruments?
CPU gets a good work out. I can flip through windows while testing. Progress bar on backtest is a nice touch. My old laptop now seems stupid fast.
BTW, can I install beta on home computer? currently my laptop has it.
fwiw, a few things that I did manage to note down are as follows:
Disclaimer: Not necessarily the software but it could me using it in wrong way... experimenting with MT/MI (multi tf/inst)
Critical:
1. Job abended which is a polite way of saying that the application crashed.
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
The program '[3300] NinjaTrader.exe: Managed' has exited with code -532459699 (0xe0434f4d).
No clue what that exit code is.. and I didnt get a chance to examine whats in that memory pointer. Not that it would help anyways. Root cause could be me slowing things down - causing this.. dont know. Jury is out.
Today's only potential deal breaker / show stopper... Got it upon running a script using debugger on in replay mode. Perhaps some sort of mutex semaphore locking is needed. .. otherwise no stopping one thread to step on other thread's data.
High:
1. EnterShort/EnterLong chugs along fine and then suddenly stop working. Eventually it may start working again. not sure... need to look at it again. Noticed a few times, when positions were supposed to reverse but nothing happens.. zip zilch nada... code executes those commands and I see it stepping thru (its very puzzling).. B W mentioned something about sync'ing up.. not sure what that means.. Is this the argument SyncAccountPosition=FALSE? how do you set it to true? dbrepair/reset dont solve the issue. btw, this happens in nt6.5 as well so the problem (is perhaps) between the chair and keyboard ..
I am not advanced enough to use iOrder stuff and not at all interested in learning it now. market order will do fine for me.
But note that my experimental script is using multi timeframe and multi instrument strategy. Dont think I ever saw this type of inaction by enterxxx in my existing unidirectional script on single time frame/single instrument. At first I thought that script did not execute any after that last trade...
barsinprogress (bip) - 0 for primary instrument
bip - 1 (longer time frame for calculations) on primary instrument - no entries or exits here.. just plain calc.
bip - 2 (same timeframe as bip 0) but on secondary instrument)
positions[0].MarketPosition and Positions[2].MarketPosition were opposite and EnterShort and EnterLong were passed the following..
a) bip 0 or 2
b) lotsize of 1
c) "" for signal
in bip 0
trying to reverse both positions.
if (bip==0) {... entershort(0,1,"");enterlong(2,1,"");.. where Positions[0].MarketPosition is long and P[2].MarketPos is short}
exitlong/exitshort didnt have any problem though.
originally I tried
if (bip==0){enter position and mark a variable} followed by
if bip is 2 {if variable is set, then trigger position and reset variable}. note that both bip 0 and 2 are of same time interval but different instruments.
Problem with this approach was that it used to create a situation where after first few trades (they trigger at same time on two different charts), they dont work in lockstep anymore and entries will become one bar apart. Secondary instrument trade (kick off in bip2 after bip0 kicked off its own) will start trailing the first one by a bar (whose time interval is same - enterxxx occurs in bip 0 and 2 in same onbarupdate).. this eventual trailing by one bar in and of itself is a bit weird (whole another conversation). So, I took the approach of if (bip==0) {enter positions on both instruments by passing bip values 0/1 forexample: enterlong(0,1,"");entershort(2,1,"");
Note that I always set slippage to 1 (as in 1 tick not as in 1 bar).
Last but not the least, since this is order entry related, backtest has no issue. It shows later trades.
Medium:
1. I failed to set custom time (need to fiddle with session manager) and used default instrument settings for start and end times.. Trying to run replay gives me
"no market data available to drive the simulation engine" error.
2009-11-06 09:04:00:718 (Market Replay Connection) Cbi.Connection.ProcessEventArgs.OrderStatusEventAr gs: Order='8c99818fd1fe47789391d890af2d1a69/Replay101' Name='Sell short' New state=Rejected Instrument='FDAX 12-09' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=OrderRejected Native error='There is no market data available to drive the simulation engine.'
This is caused by a)empty space in the chart prior to opening or b)first one minute of the market open or c)end of the recording (perhaps)
moved the replay to 2:01 am and then on smooth sailing.
2. A first chance exception of type 'System.NullReferenceException' occurred in NinjaTrader.Core.dll
dont know where this came from (not from my script I hope..) Sounds like Trying to access something in memory which doesnt exist.
dereferencing a null is required with pointers. Checking for nulls prior to accessing values of pointers would fix it. (dont think this had any consequence atleast I think it didnt. If not, this oughta be a high i.e assuming its not coming from me)
3. Failed to execute DB job 'StrategyUpdateJob': A foreign key value cannot be inserted because a corresponding primary key value does not exist.[ Foreign key constraint name = FK__nt_strategy2execution__000000000000028B ]
StrategyUpdateJob2 in 6.5 for some reason I cant recall.. and now this 'StrategyUpdateJob' in 7 - they dont like me at all.. harmless stuff I hope.
4. Cbi.Globals.ProcessEventArgsInThreadContext, exception caught: Object reference not set to an instance of an object.: MarketDataEventArgs: Instrument='FESX 12-09 Eurex' Type=Last Price=2780 Volume=2175 Time=11/6/2009 2:00:08 AM
this probably could be a low.
Low:
1. A first chance exception of type 'System.FormatException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
what file? is this from NT or Microsoft?
2. A first chance exception of type 'System.NotSupportedException' occurred in System.dll
Additional information: StringConverter cannot convert from System.Double
this comes from EnterXXX commands IIRC. dont think this is from args I am passing (int, int, string). somewhere from inside.
3. There are a fair amount of the following I see:
A first chance exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The remote name could not be resolved: 'feeds.dailyfx.com'
A first chance exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The operation has timed out
A first chance exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The remote name could not be resolved: 'www.economicnews.ca'
I had internet connection turned off at that time which explains the above? Even if it is on, no offence to anybody, but I dont think I want any feed from forex or canadian news or any others on my beleagured retail internet connection. If I want to see news/entertainment, I will go to bloomberg/MarketWatch/CNBC etc..
I dont have any news related window open (didnt know that it existed). I dont do forex or TSX etc.. but I can see how this could be useful for others. Shouldnt there be a switch to turn this off?
4. Multi instrument Strategy PnL (Unrealized) ignores secondary instrument and shows pnl of just primary instrument... even though the position on secondary was triggered by same script. Just have to toggle between positions tab and strategy tab (to view realized). No biggie as this is just an experimental script. This is almost a non issue but highlights the limitations of using SampleMACrossOver for all sanity checks.
5. Upon setting a start date for chart, system calculates the # of days and keeps it as constant. When connecting to another day's replay chart, I need to go back into the chart setting and reset the start date which would have moved to that many days. I forget what BW suggested for this...
6. Template concept needs to be applied (nice to have atleast) to backtest window. Tired of having to set all the arguments everytime you want to run a test. Turnaround time for strat analyzer is improved only to be set back by having to manually type in all the values frequently... its the little things that matter in the end.. the last 5% that makes the difference to the end user.
7. assuming that wilsonORmapper belongs to nt...
2009-11-06 09:09:23:968 Strategy.StrategyBase.Sync2Live: nextExitOnClose=11/6/2009 3:59:30 PM
A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in WilsonORMapper.dll
8. Calender for Replay is a bit jumpy wumpy.. click on the left or right arrow too fast and it will keep flipping until all you see is just the calender itself. maybe an ok button would do the trick.
BTW, where is montecarlo engine? cant find it. Also, can someone expose the Performance class? Placing the cursor on it reveals a lot of stuff in it... and each in turn has a lot more that we could use.. I havent tried SendMail yet... does it work now? it didnt work in 6.5 with gmail.
Overall.. a fabulous job!!





Comment