PDA

View Full Version : DataSeries - but for vector of doubles


b1g3ar5
09-17-2009, 08:15 AM
Has anyone an example of how have custom data which is a vector (matrix?) of doubles - but still has all the stuff that comes with the DataSeries class?

Thanks.

B

NinjaTrader_Bertrand
09-17-2009, 08:23 AM
Welcome to our forums - if you're looking for a matrix, then please check out this thread and the snippets posted there - http://www.ninjatrader-support2.com/vb/showthread.php?t=7501

b1g3ar5
09-17-2009, 08:51 AM
Thanks - but I know how to do the matrix stuff - I don't know how to make it associate with the bar etc. ie. something like this:

myMatrixData = new MatrixDataSeries;

similar to:

mySMA = new DataSeries;

then:

myMatrixData[2] will be the values on the bar 2 periods ago like mySMA[2]

NinjaTrader_Bertrand
09-17-2009, 09:24 AM
For this you would need create a list collection in C#, unfortunately this is not supported by us.

b1g3ar5
09-17-2009, 10:03 AM
Is the code for the DataSeries Class available or is it secret? If I can see this I might be able to work out how to do it. Or do you mean that Ninja don't allow it?

Thanks.

B

NinjaTrader_Bertrand
09-17-2009, 10:09 AM
Unfortunately source code for the DataSeries class is not available (it's just a data structure used), but you can work with it of course in the C# list / collection methods.

http://www.ninjatrader-support.com/HelpGuideV6/DataSeriesObject.html