the concept is as follows:
Add(PeriodType.Day, 1); // Add day Bars object (default), index = 1
CalculateOnBarClose = false;
BarsRequired = 2;
double oneMinPercChange = ((Closes[0][0]-Closes[0][1]) /
Closes[1][0]) * 100;
I am using prior close as my reference price so that I can tell if a stock went from -5 to -7 relative to previous 4:00 PM (as opposed to what it may have done based on today's news or earnings stories).
The " * 100 " is just for visuals when I am looking at charts etc.
So there you have it, one minute price change, simple enough. Only it will sometimes, for what i can tell is no good reason, drop the actual % price change and instead return the last price.
Example: for AAPL it will return 325.35, which of course did not happen.
Any ideas or tips here?
Thanks in advance.
Andrew
Comment