Perfect...it works...thanks for the reply; i knew there had to be a simple solution (I'd never heard of the function until now).
Hugh --- In [email protected], "gp_sydney" <[EMAIL PROTECTED]> wrote: > > Will the Hold function do what you want? > > GP > > > --- In [email protected], "huandy631" <hugh.andersen@> wrote: > > > > hello > > I am running a code in 5 min time frame which gets a signal on the > > first bar of the day, and if there has been a gap the signal is > > latched on "true" for the day. I've tried most ways to programme this, > > but am stumped. Staticvarset seems the most logical, but won't accept > > arrays. Options are: 1) expand signal using timeframeexpand 2) use a > > function or 3)use staticvarset > > > > Gapped=open>ref(high,-1) > > now "lock" Gapped as true for all 5 min bars in the day, and reset > > to "false" on the last bar..... > > > > If anyone has a suggestion please let me know? > > Hugh > > >
