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 #

Psychological Index
· To: "MetaStock listserver" <metastock@xxxxxxxxxxxxx>
· Subject: Psychological Index
· From: "Glen Wallace" <gcwallace@xxxxxxxx>
· Date: Sun, 6 Aug 2000 06:59:34 -0700
· Reply-To: metastock@xxxxxxxxxxxxx
· Sender: owner-metastock@xxxxxxxxxxxxx

There was an overbought/oversold indicator described in the June 2000 Futures Magazine called the Psychological Index. It looked sort of interesting, so I wrote the MetaStock code for it:

Psychological Index

{Futures Magazine, Vol.29 No.6, June 2000, P.48}
LookBack:= Input("Number of lookback periods", 2, 100, 12);
UThreshold:= Input("Upper threshold (%)", 0, 100, 75);
LThreshold:= Input("Lower threshold (%)", 0, 100, 25);
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex;
UThreshold;
LThreshold

e-w-Psychological_Index.gif
The article described the standard lookback period as 12 bars with a level of 75% or higher being an indication of an overbought market and 25% or lower being an oversold market. Like most overbought/oversold indicators, it will give poor results in a strongly trending market, but perhaps using an ADX and trend direction filter, it might prove useful.

On 5-minute bars in the bonds, you have to constantly adjust the thresholds for an upward or downward bias, but if you increase the lookback period and widen the signal levels for less frequent signals, the results were interesting.

Regards.

System Tester code:

Enter Long / Close Short

LookBack:= opt1;
UThreshold:= opt2;
LThreshold:= opt3;
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex <= LThreshold

Enter Short / Close Long

LookBack:= opt1;
UThreshold:= opt2;
LThreshold:= opt3;
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex >= UThreshold


[19420]


Re: Psychological Index

· To: metastock@xxxxxxxxxxxxx
· Subject: Re: Psychological Index
· From: HHP <hhp@xxxxxxxx>
· Date: Mon, 07 Aug 2000 10:40:54 -0700
· References: <009101bfffae$bef0aea0$5a124118@xxxxxxxxxxxxxxxxxxxxxx>
· Reply-To: metastock@xxxxxxxxxxxxx
· Sender: owner-metastock@xxxxxxxxxxxxx

Your UThreshold and LThreshold are the first time I've seen the Input() function used for this purpose. Good thinking. I'll steal that idea.

HHP

[19376]

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!