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

Re: [EquisMetaStock Group] A Barssince() problem (corrected)



PureBytes Links

Trading Reference Links

Hi Safdar
 
 
The first problem to address when using BarsSince() in an exploration is that you MUST set the number of records to explore, not leave it up to MS to decide from the "Minimum Records" setting. Using the "Minimum Records" setting will not force MS to include the necessary number of bars, and the result will quite probably be N/A. A simple moving average, for example, forces MetaStock to use the required number of bars, but BarsSince() does not.
 
In general terms, a function with a "Periods" parameter forces MetaStock to use the largest "periods" parameter to decide the number of bars to include in an exploration. However, any function without a "Periods" parameter or WITH an "Nth" parameter does not force the exploration to do the same thing. Essentially a BarsSince() or ValueWhen() type function  will only call 1 or 2 bars when the number of records is set to "Minimum Bars". Obviously this is not enough records to give a valid result in most cases.
 
When you address that problem the code should be as easy as BarsSince("peak definition");
 
 
Regards
 
Roy
 
 
----- Original Message -----
From: safdar keb
Sent: Sunday, October 30, 2005 7:58 AM
Subject: [EquisMetaStock Group] A Barssince() problem (corrected)

sorry col a got wrongly pasted the correck query is
this


The formula ,
cola ::       Peak(1,CLOSE,10)
colb ::         close
colc  ::         A:=Peak(1,CLOSE,10)-C;
(A/C)*100
calculates % change in price from recent peak to
current close in col c.
Now in col d I want to find out number of days that
have passed since the peak closing value.
It seems to me that barssince() would be applied, but
I am not been able to figure it out.

Can any one help.

Safdar.


           
__________________________________________________________
Enjoy this Diwali with Y! India Click here http://in.promos.yahoo.com/fabmall/index.html




YAHOO! GROUPS LINKS