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

Re: Arrays



PureBytes Links

Trading Reference Links

Why use an array? Try:

Var: Diff(0), Sum(0);

Diff = close - close[1];

If CurrentBar >= 3 then
   Sum = Diff[0] + Diff[1] + Diff[2];



Bob Fulks



At 11:48 AM 12/14/2006, Chris Evans wrote:

>OK so I want to add up the last 3 up close
>Differences using an array:
>  
>Array:Diff[3],(0);
>
>If close>close[1] then
>Diff[1]=close-close[1];
>
>Sum=Diff[1]+Diff[2]+Diff[3];
>
>But I don't think this works.. I thought that 
>an array value would slide over each time a new 
>value was put in the first array location ..- 
>obviously not
> 
>Help(?)...
>
>  
>
> 


  • References: