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

[EquisMetaStock Group] How to do it in Metastock's coding??



PureBytes Links

Trading Reference Links



Does anyone know how to do coding to meet following condition?

Start from any day, and count backward (CB) to find when the number 
of occurrence for C1 equal to 3 times, and save the number of days 
into a variable "CB".
C1:=L>Ref(L,-1);

Such as if the current day is 30 Dec, 2004, Starting on any day, for 
example, 20 Dec, 2004, and count backward to find number of 
occurrence for C1, it occurred on
15 Dec, 2004
13 Dec, 2004 and
10 Dec, 2004, then on 10 Dec, 2004, the number of occurrence for C1 
is equal to 3 times, therefore, the number of days is 10, 10 Dec, 
2004 to 20 Dec, 2004, and save 10 into CB variable for 20 Dec, 2004, 
so CB variable will be different on different periods, such as on 29 
Dec, 2004, and count backward to find number of occurrence for C1, it 
occurred on 
27 Dec, 2004
26 Dec, 2004 and 
22 Dec, 2004, the on 22 Dec, 2004, the number of occurrence for C1 is 
equal to 3 times, therefore, the number of days is 7, 22 Dec, 2004 to 
29 Dec, 2004, and save 7 into CB variable for 29 Dec, 2004, 

Does anyone have any suggestion on coding it in Metastock? 
Thank you for any suggestion
Eric








------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/