bars, high,low
Created at 26 Nov 2012, 14:17
bars, high,low
26 Nov 2012, 14:17
Hello,
can someone post how to get the high and low values from the previous bar?
I was using something like this but it is not working:
Print("close="+MarketSeries.Close[MarketSeries.Close.Count-1]);
many thanks
admin
26 Nov 2012, 17:55
Just correct it to this: Print("close=", MarketSeries.Close[MarketSeries.Close.Count-2]);
int index = MarketSeries.Close.Count-1;
int prevIndex = index - 1;
open: MarketSeries.Open[prevIndex]
high: MarketSeries.High[prevIndex]
low: MarketSeries.Low[prevIndex]
close:MarketSeries.Close[prevIndex]
@admin