since then when I start NT and load one of my strategies to a chart, I get an error in the Log related to another of my strategies which is not even loaded/running in any chart....in fact I have not used it for more than a year.
corrupt workspace? not likely as this is a new install with no saved workspaces and at no time have I loaded the old strategy to a chart
to test that theory, I closed all workspaces, closed NT, opened NT in empty/blank default workspace....opened new chart...connected to MarketReplay....right click in the chart and select Strategies....instantaneously with the opening of the Strategies dialog, I get the error in the Log....i.e. without even getting to the point of selecting any strategy to load to the chart
corrupt chart template? no...because I opened a chart with 'none' for template and same error to log on opening Strategies dialog
the error is ''....strategy has called the Add() method with an invalid instrument....''
so I edit the old strategy and change the 'YM 06-08' instrument to 'YM 12-08' and the error goes away.
I am assuming this is similar to compiling one cs and getting errors detected in another cs....i.e. NT checks all cs code when compiling
NT must also check all code when preparing to load a strategy....thorough, however is this really necessary if the cs is not going to be used? ...or is this a bug?
I do not want to manually update the Add() method in the old strategy so is there code I can use to check automatically if the instrument is valid before adding?
thanks.
Comment