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

Re:issue of EL and data2



PureBytes Links

Trading Reference Links

What a difference a day makes! 

 Barry Silberman has shown (24 Nov 2001 16:37:03 ) that adding “data2”
to the end of the “XAverage” function will give correct results in his
code (see below). Taking that lead, if the same thing is done to
“AveragFC” in my post of  23 Nov 2001 14:09 correct averages also
result. 

In additional, a correction needs to be made to my last post (25 Nov
2001 11:24) 

>From the post of 23 Nov 2001 14:09: 

> 
>DO NOT GIVE THE CORRECT AVERAGE OF DATA2 (Subgraph2)
> WHEN LOADED INTO DATA1 (Subgraph1). 

  {NOW ADDING DATA2 BELOW GIVES THE CORRECT AVERAGE } 
  {NOW ADDING DATA2 BELOW GIVES THE CORRECT AVERAGE } 
 
>{*} 
>Input: price(c data2); 
>Var: MA(0); 
>MA=AverageFC(price, len)   DATA2; {--HERE--}
> 
> {It is surprising this does not give correct results. 
>  It looks like the second example above. If Average
>  is substituted for AverageFC it does work.} 
>--------------------------------------- 
> 
>{**} 
>Var: price(0, data2), MA(0); 
>Price=Close; 
>MA=AverageFC(price, len)   DATA2; {--HERE--}


//////////////////////////////////////////////////////////// 
  

>From the post of 25 Nov 2001 11:24: 

> 
>The following code (taken from Barry Silberman, omega-list,
> 24 Nov 2001 11:25:48) when loaded into 1 minute data1,
>computes the average of 5 minute data2 bars. There are 
>two data streams in one window.  The TS2K simple function,
>Average, works in this code BUT NOT the TS2K Xaverage series 
>function. Since Bob Fulk's XAverage.V function is simple,
>one would expect it to work but it DOES NOT! 
> 

--------------------------- 


When DATA2 is added to Average or XAverage as below ( as Barry Silberman
showed in his post of 24 Nov 2001 16:37) then BOTH XAVERAGE.V AND
XAVERAGE GIVE CORRECT VALUES. I based the above previous conclusions
while not using the data2 referencing “Xaverage”. (Interesting, Slok(0)
does not need the data2 reference). 


--------------------------------------------- 

> 
>inputs:     len(13), len1(3); 
>variable: FstK(0 , data2 ),  SloK(0 {, data2 } ) ; 
> 
>value1  = Lowest(l data2, len) ; 
>value2  = Highest(h data2, len) - value1; 
>value3  = Close data2; 
> 
>If value2   > 0 Then 
>       FstK = (value3  - value1 ) / value2  * 100 
>Else 
>       FstK = 0; 
>SloK = XAverage(FstK ,len1)  DATA2; {--HERE--}
> 
>plot1(slok,"showme"); 
>