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 #

Trend Strength Indicator II

Similar results (0-10) instead of -100 to 100 with simpler code:


Trend Strength Indicator II

{for metastock, coded by P Umrysh}
{from the August 2005 issue of Active Trader Magazine}
{modified by wabbit 08Jul05}

PRD:= Input("ENTER PERIODS FOR SMA",1,100,10);
STEP:= Input("ENTER SMA STEPS",1,50,10);

(C>Mov(C,PRD+(STEP*0),S))+
(C>Mov(C,PRD+(STEP*1),S))+
(C>Mov(C,PRD+(STEP*2),S))+
(C>Mov(C,PRD+(STEP*3),S))+
(C>Mov(C,PRD+(STEP*4),S))+
(C>Mov(C,PRD+(STEP*5),S))+
(C>Mov(C,PRD+(STEP*6),S))+
(C>Mov(C,PRD+(STEP*7),S))+
(C>Mov(C,PRD+(STEP*8),S))+
(C>Mov(C,PRD+(STEP*9),S))




Trend Strength Indicator II
 

Hpe this helps.

wabbit :D

===============================

Wabbit,

There are literally dozens of modifications that can be made to this indicator. What I coded reflected the thoughts of the article and the info I found at wealthlab. Some other options would include changing the SMA to another type of moving average. You could also link the signals to some other type of momentum indicator. Keeping in mind that the KISS method always works well, the moving averages give some good signals. The magazine article tested the indicator and found some fair results. The problem I think was that this indicator works well in trending markets which don't always come as often as we'd like. Good to see other working with the code!

Preston

===============================

Preston,

I wasn't having a go at you or your code. If you got the wrong impression - sorry.

I was just posting a slight variation of the code you created to make it a little easier for the simpletons like me to understand. Your code is excellent, and as you righly pointed out can be modified in many, many ways. I just had to simplify it a bit so I could get the full appreciation of what the indicator was trying to show. I thought this might have been useful for the others here too.

Here is another slight modification that your reply prompted, that some people also might like to try, its just an extension of the simplified version to take into account different price data and MA types:

{Trend Strength Indicator}
{for metastock, coded by P Umrysh}
{from the August 2005 issue of Active Trader Magazine}
{modified by wabbit 09Jul05}

x:=Input("Data: 1-O 2-H 3-L 4-C 5-MP 6-Typ",1,6,4);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=4,C,If(x=5,MP(),Typical())))));

MA:=Input("MA Type: 1-S 2-E",1,2,1);

PRD:=Input("MA Periods",1,100,10);
STEP:=Input("MA Steps",1,50,10);

(x>If(MA=1,Mov(x,PRD+(STEP*0),S),Mov(x,PRD+(STEP*0),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*1),S),Mov(x,PRD+(STEP*1),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*2),S),Mov(x,PRD+(STEP*2),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*3),S),Mov(x,PRD+(STEP*3),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*4),S),Mov(x,PRD+(STEP*4),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*5),S),Mov(x,PRD+(STEP*5),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*6),S),Mov(x,PRD+(STEP*6),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*7),S),Mov(x,PRD+(STEP*7),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*8),S),Mov(x,PRD+(STEP*8),E)))+
(x>If(MA=1,Mov(x,PRD+(STEP*9),S),Mov(x,PRD+(STEP*9),E)))

wabbit :D

===============================

Wabbit,

No need to apologize, I'm actually glad to see that you are coming up with some good variations of the original. Also glad to see that you are willing to share them. There were some other ways to code the indicator but like you I tried to keep it simple and understandable.

Preston

Source / From: TOP
equismetastock [at] yahoogroups [dot] 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!