Much refreshing for sharing. Celebrity endorsement examples. Picture allows you to add dates, titles, and idm 5. Smart.
MultiCharts only initializes Bars (Instrument #1) by default, BarsOfData(x) will only get initialized after it is encountered in the code and trips an application exception. Once the application exception is thrown, it starts the StartCalc() operation all over again. It will do this process for each instrument. So if you are referencing two instrument bars, you will run the StartCalc() process twice. If you are referencing three instrument bars, you will run the StartCalc() process three times, etc. By placing the instrument references at the beginning of the StartCalc() method you will get this init process out of the way and you will not find your variables and classes in unexpected states. As a side note, if the first time MultiCharts (find out here) runs into your BarsOfData(x) reference is in CalcBar(), it will do the same thing and restart StartCalc(). This could be very bad if you have objects or variables already initialized from the StartCalc() process. So keep your instrument references at the beginning of StartCalc() and you will save yourself much grief.