I'd like to have a void which analyzes at the data from two bars. Instead of having 12 inputs (Date, Open, High, Low, Close and Volume for each bar), I was hoping to be able to create a class for the bar data and only have two inputs.
CODE:
Please log in to see this code.
When I compile this, I get error CS0021: Cannot apply indexing with [] to an expression of type 'WealthLab.Bars'. Is there a way to do this?
Size:
Color:
"Bars[0], Bars[1]..." imply that you have an array named "Bars" (a collection of Bars objects) which you do not as "Bars" is a Wealth-Lab type.
Size:
Color:
You were probably looking to have something like this (w/o any error handling):
CODE:
Please log in to see this code.
Size:
Color:
I was really trying to do it the hard way. I thought I had to bring the Bars object into the void. All I needed to do is:
CODE:
Please log in to see this code.
Size:
Color: