The attached strategy example includes a simplified snip of NT7 code capable of helping me manage the complexities of combining my strategies into one per instrument. A re-write would be an extensive amount of work.
I have not yet found a solution to convert the included DataSeries arrays. I was tempted to replace them with 'Dictionaries of Arrays' but hen the data will have lost it's linkage to the Dataseries used to create them.
I am asking for help on how to replicate this NT7 example of DataSeries 2D array of arrays, DataSeries[] using a bar-aligned Series<T> solution in NT8?
I replaced the declaration of 'DataSeries[]' with 'Series<double>[]', seems to compile fine
// data series creation in NT7 private DataSeries[] entryMarketValueByOrder; // replacement data series creation in NT8 - replaced 'DataSeries[]' with 'Series<double>[]', seems to complie fine private Series<double>[] entryMarketValueByOrder;
Key question #1 -- What is the correct syntax for the 'New' statement in OnStateChange() to create the ISeries<T> array?
/// Key question #1 - [B]What is the correct syntax within OnStateChange() to create the ISeries<T> array?[/B] /// The following statement produces a complie error "Method name expected" code CS0149 /// Testing alternative designs and a search of NT and external resources failed to surface solutions orderStopLoss = new Series<double>[500](this, MaximumBarsLookBack.Infinite);
Key question #2 -- What is the correct syntax to set values within the ISeries<T> array?
/// Key question #2 - What is the correct syntax to set values within the ISeries<T> array? // NT7 syntax > positionStopLossByOrder[positionNumber] = (DataSeries)entryMarketValueByOrder; // Syntax proposed for NT8 > positionStopLossByOrder[positionNumber] = (Series<double>)entryMarketValueByOrder; // Example of the NT7 DataSeries[] in use in the lines just below entryMarketValueByOrder[m_pos][barOffset[planNumber]];. positionStopLossByOrder = entryMarketValueByPlan[positionNumber][barOffset[planNumber]] + ticksOffset[planNumber] * TickSize; //
Key question #3 -- Is there a 'better, faster, cheaper, more reliable, ... recommended alternative solution?
Thanks for your help!
HedgePlay
Comment