- In general, I have no problems now loading or working with 60 or more instruments in a Strategy. These instruments can be used in calculations and plots in any combination (although I haven't yet tried to plot custom bars like those in the Heiken Ashi indicator).
- Loading of the 60+ symbols is a bit clumsy-looking given the way that NT keeps opening and closing an alert window. This should probably be replaced by messages in the Control Center window. (Also, I'm puzzled that loading is often accompanied by a "cannot be cancelled" message, since it seems that NT already has to deal with missing data, so why does it care if the user cancels a data (re)load? The user should be able to freely cancel (re)loads, and manually reload when necessary.)
- The most important "trick" for me to working with multiple instruments was to realize the value of the "Time" stamp of each bar. This is the only way to tell if bars from different instruments belong together, both in real time and with historical data. For example, even in the simple case of just 2 instruments (as in some of NT's own examples), one shouldn't be combining them in a calculation or comparison without doing a check such as,
If (Times[0][0] == Times[1][0]) ...
That's because OnBarUpdate doesn't wait for instruments to get time-synchonized in any way, either with historical or realtime data, so you never know what the status of data is without examining bar times (i.e., a "[0]" bar might be the current minute for one instrument, but be pointing to the previous minute for another, or an even earlier minute if no trade has occurred for more than a minute). However, examination of bar "Time" (via the "Times" array) always gives you enough information to see what the status is of each instrument.
- With respect to the problem I had with not wanting to wait for the first trade to occur in a new minute before seeing the close of the previous minute (a long wait in a slow market!), the solution was to set CalculateOnBarClose = false, use some other criteria to determine when the bar was closed (such as clock time), and then grab whatever data for each instrument was available at that time from bars stamped with the appropriate time. This requires searching recent bars for each instrument to find the proper bar, and dealing with any missing bars, but at least it's doable and fast.
- Within respect to CPU time (performance), the only hit I see (other than initial load time) is with complex chart drawing. Routines that simply process data from large numbers of instruments in the background do not appear to be a problem.


Comment