# Trend indicators - page 13

3203

Files:
ts_c__jc.jpg 58 kb
76

Very nice indicator

This one I needed to rename : it was described by Jose Crusetin the attached document but since he calls it a Trend Strength and since there is already an indicator for metatrader with that name (different calculation behind it) I renamed it to MasTrend.

Thanks for sharing.

Files:
chart.gif 34 kb
3203

seriously, with all hard coded in one f-la ("A") : ) - how to get "C" (p44 doc) : (

155795

fxbs:
for (; masPeriod<=Mas.End; masPeriod+= Mas.Step, masCount++)

Mladen, (; - looks like something missing, is it ACodeError?

dem, his code getting shorter and shorter - i'm very unhappy

now i don't even know what is it (what i'm stealing), that's apsets me

Nah, no error As of short - not short enough. The ideal would look something like this :

while(myWelth<3*WarrenBuffetsWelth) makeMeSomeMoreMoney();

but when I write it metatrader complains (can you imagine that )

fxbs:
seriously, with all hard coded in one f-la ("A") : ) - how to get "C" (p44 doc) : (

Looking for slopes of MA instead for difference between price and MA. So : if iMa(,..,i)>iMa(,...,i+1) total++ and if iMa(,..,i)<iMa(,...,i+1) total--. For speeding up maybe some more code would be needed, but that is the essence

_____________________________

PS: Ultra trend does the same slope comparing thing only it uses JMA for that and it's representation is a bit different, so it would be interesting to find out exactly the origin of that "slope" idea (I am not sure that it is Jose Cruset's original idea)

3203

if i knew what is it :

for (; masPeriod<=Mas.End; masPeriod+= Mas.Step, masCount++)

- i would allready did it

3203

Nah, no error

As of short - not short enough. The ideal would look something like this :

while(myWelth<3*WarrenBuffetsWelth) makeMeSomeMoreMoney();

but when I write it metatrader complains (can you imagine that )

Looking for slopes of MA instead for difference between price and MA. So : if iMa(,..,i)>iMa(,...,i+1) total++ and if iMa(,..,i)<iMa(,...,i+1) total--. For speeding up maybe some more code would be needed, but that is the essence

_____________________________

PS: Ultra trend does the same slope comparing thing only it uses JMA for that and it's representation is a bit different, so it would be interesting to find out exactly the origin of that "slope" idea (I am not sure that it is Jose Cruset's original idea)

like this

A:

for (; masPeriod<=Mas.End; masPeriod+= Mas.Step, masCount++)

{

double ma = iMA(NULL,0,masPeriod,0,Mas.Type,Price,i);

if (price > ma) total++;

if (price < ma) total--;

}

MasTrendBuffer = 100.00*total/masCount;

C:

for (; masPeriod<=Mas.End; masPeriod+= Mas.Step, masCount++)

{

double ma0 = iMA(NULL,0,masPeriod,0,Mas.Type,Price,i);

double ma1 = iMA(NULL,0,masPeriod,0,Mas.Type,Price,i+1);

if (ma0 > ma1) total++;

if (ma0 < ma1) total--;

}

MasTrendBuffer = 100.00*total/masCount;

p.s. thanks, Mladen ( though i still have no idea what "for (; " means - and you don't wanna tell nobody : (((((((

Files:
36

fxbs:
for (; masPeriod<=Mas.End; masPeriod+= Mas.Step, masCount++)

Mladen, (; - looks like something missing, is it ACodeError?

dem, his code getting shorter and shorter - i'm very unhappy

now i don't even know what is it (what i'm stealing), that's apsets me

36

This one I needed to rename : it was described by Jose Crusetin the attached document but since he calls it a Trend Strength and since there is already an indicator for metatrader with that name (different calculation behind it) I renamed it to MasTrend. The idea is simple : compare a price to a series of moving averages. For more details about it (not just about it) please read the attached document byJose Cruset. In general, values above 60 and below -60 are considered as strong trend.

Is there a reason you didn't plot the level lines at 60, 0 and -60?

Simple code:

#property indicator_level1 60.0

#property indicator_level2 0.0

#property indicator_level3 -60.0

#property indicator_levelcolor Gray

Files:
_cm.gif 17 kb
1285

CodeMuncher:

Is there a reason you didn't plot the level lines at 60, 0 and -60?

Simple code:

#property indicator_level1 60.0

#property indicator_level2 0.0

#property indicator_level3 -60.0

#property indicator_levelcolor Gray

Because it will make you billionaire

155795

...

Why of course TRO

I waited on you to "improve" it. I see you are becoming a teacher now, and must say, am eagerly awaiting some new pearls of your immense wisdom :):)

________________________

PS: since you are a "dear friend" of mine and since I promised that I will try to help you in your "intellectual venture" and climbing your IQ to levels of at least 30-35, did you happen to look at this tab of any indicators properties?

No? I thought so

CodeMuncher:

Is there a reason you didn't plot the level lines at 60, 0 and -60?

Simple code:

#property indicator_level1 60.0

#property indicator_level2 0.0

#property indicator_level3 -60.0

#property indicator_levelcolor Gray

Files:
levels.jpg 29 kb