MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Date Filter
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: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!