Hi Cone,
Within the same context:
* assume that I need to create a sort of a synthetic index - just one the like you mentioned in this thread.
* On one hand, yes, whatever you suggest here (i.e. creating a series of DataSeries instead of creating and working with a Bars object) might work in a lot of cases.
*But, Cone, assume that I would like to calculate the ADX indicator of this synthetic index. In that case, I need this syntheticIndex not in the form of a bunch of DataSeries (of OHLC/V), but instead in the form of a Bars object, as this indicator accepts Bars as input, not the DataSeries.
i.e."DataSeries ADXOfMySyntheticIndex = ADX.Series(mySyntheticAsBar, 9);"
So, my question is, how is a Bars object created?
I tried the following but frankly I could not think of a decent way to add bars to that Bars object:
CODE:
Please log in to see this code.
So, in contrast with what you suggest at #2, I need to create a Bars object in order to be more flexible while using this synthetic information within the strategy.
Anyhelp is appreciated.