- Katılım
- 23 Eki 2020
- Mesajlar
- 1,823
Re: Date Functions * To: <metastock@xxxxxxxxxxxxx> * Subject: Re: DATE FUNCTIONS * From: "Roy Larsen" <rlarsen@xxxxxxxxxxxxx> * Date: Sat, 29 Sep 2001 08:27:13 +1200 * References: <20010928151616.62494.qmail@xxxxxxxxxxxxxxxxxxxxxx> * Reply-To: metastock@xxxxxxxxxxxxx * Sender: owner-metastock@xxxxxxxxxxxxx Erkan > DOES METASTOCK HAS ANY DATE FUNCTIONS TO DRAW VERTICAL > LINE OR PAINT THE BAR FOR EXAMPLE IF(DATE=1/4/01,1,0)? > THANKS > ERKAN Use a combination of Year(), Month() and DayOfMonth() functions to create an indicator, drop it on a chart without scale, and change style to histogram. You could cut down the following "Date Filter" indicator to show only one date rather than a range. Roy |
|
Date Filter StDay:=Input(" Start day",1,31,1); StMnth:=Input("Start month",1,12,8); StYear:=Input("Start year",1980,2002,2001); EnDay:=Input(" End day",1,31,31); EnMnth:=Input(" End month",1,12,8); EnYear:=Input(" End year",1980,2002,2001); If((Year() > StYear OR (Year()=StYear AND ((Month() > StMnth) OR (Month() = StMnth AND DayOfMonth() >= StDay)))) AND (Year() < EnYear OR (Year()=EnYear AND ((Month() < EnMnth) OR (Month() = EnMnth AND DayOfMonth() <= EnDay)))) ,1,0); |
Source / From: |