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 #

Uptrend / Downtrend Signals
rev. 01/06/97 We will define the beginning of the uptrend as: H>Ref(HHV(H,4),-1)
and the beginning of the downtrend as: L<Ref(LLV(L,4),-1)

Now you want to plot the lowest low if you are in an uptrend and thehighesthigh when in a downtrend,enter the following formulas and plotthe last one.


Uptrend Signal

Peak(1,If(H>Ref(HHV(H,4),-1),Ref(LLV(L,4),-1),0),1) <>
Ref(Peak(1,If(H>Ref(HHV(H,4),-1),Ref(LLV(L,4),-1),0),1),-1)

 


Downtrend Signal

Peak(1,If(L<Ref(LLV(L,4),-1),Ref(HHV(H,4),-1),0),1) <>
Ref(Peak(1,If(L<Ref(LLV(L,4),-1),Ref(HHV(H,4),-1),0),1),-1)

 

 


Uptrend / Downtrend Signals - Final Plot

If(BarsSince(Fml("Downtrend Signal")) <BarsSince(Fml("Uptrend Signal")),
{then} Ref(HHV(H,4),-1), {else} Ref(LLV(L,4),-1))

 

COMMENTARY: The Uptrend/Downtrend Signals find the point where the mostcurrent trend has started.
The Final Plot formula simply finds which trend we are in and thenplots the appropriate formula.
The {then} portion is if you are in a downtrend and the {else} portionisplotted in uptrends.
Source / From: TOP
http://www.equis.com

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!