Variables
for (int i=iLow;i<=iHigh;i++)
where int ilow is 0 index tick bar and iHigh is 10 index tick bar
--------------------------------------------------
Initialize
spread = new DataSeries(this);
--------------------------------------------------
OnBarUpdate
(again, these all using tick bars)
for (int i=iLow;i<=iHigh;i++)
spread.Set(GetCurrentAsk(i) - GetCurrentBid(i));
maSpread = SMA(spread, 20)[0];
Print("maSpread is " + maSpread + " " + Instruments[i].FullName);
________________________________________________________________________
Question: My security names are updating according to int i; however the maSpread value seems to always be that of the zero bar....
Any thoughts?
Kind Regards
Andrew

Comment