[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Series functions remembering variables?



PureBytes Links

Trading Reference Links

In the two statements running on daily bars:

  if DayOfWeek(Date) = 5 then Value1 = SeriesFunc(Close, B, C);
  if DayOfWeek(Date) = 5 then Value2 = SimpleFunc(Close, B, C);

SeriesFunc in the first statement will be executed on every bar so the variables within SeriesFunc will be updated on every bar. 

SimpleFunc in the second statement will be executed only on Fridays so the variables within SimpleFunc will be updated only on Fridays. 

Bob Fulks




At 09:48 AM 4/17/2007, Joel Reymont wrote:

>I understand that simple functions remember the values of their  
>variables from invocation to invocation. I also understand that  
>series functions remember their results.
>
>Do series functions remember variables as well?