Assume I have a strategy that is daytrading a single day's information based on tick price and tick volume.
I want to add some "constants" to my strategy.
For example, I use a Pivot Point number or two, certain medium term highs/lows, and a couple of moving averages.
Is there a simple way, at the beginning of each trading session, for me to calculate a 10 day, 30 day, 60 day and 90 day SMA Volume? Whenever I load my day bars (index 1) as follows:
Volumes[1][0] or Volumes [1] [1] etc...
into the following:
double avgVolume = SMA (Volumes[1][0], 30) [0];
I generate the error that my IData series can not be forced into a double in this manner (is more or less what it says).
Also, I am not sure that I have enough day bars loaded to support these calcs, and I am not sure that I want to for performance reasons.
Thanks in advance for any advice,
Andrew
Comment