Sorry, that should of course be myDay = 12;
Assuming that Jan 12 was a valid trading day. Mike --- In [email protected], "Mike" <sfclimb...@...> wrote: > > myYear = 2005 - 1900; > myMonth = 1; > myDay = 5; > myDateNum = (10000 * myYear) + (100 * myMonth) + myDay; > myDateBar = LastValue(ValueWhen(myDateNum == DateNum(), BarIndex())); > > for (i = myDateBar; i < BarCount; i++) { > _TRACE("Index " + i); > } > > Make sure that your chosen date is in fact an actual trading day. You might > run into trouble if you are using Quick AFL. > > Mike > > --- In [email protected], "levibreidenbach" <levib1@> wrote: > > > > Is there a way to find the bar number of a certain date? > > > > Take Jan 12, 2005. Is there a way to reference that bar, and then loop > > forward through array to current date? > > > > Thanks > > Levi > > >
