Trend indicators - page 24

Batchboy
237
Batchboy  
mladen:
Posting this simple example to show the difference between line drawing and points drawing in metatrader and hopefully clarify some coding things

It has just one parameter. DrawLines. If set to true it will set the drawing style of 2 drawing buffers to line, and if set to false, it will draw dots instead (so not lines). What id does is even simpler. If previous point of some color is drawn, then the next point is drawn in other color. Now see the comparison of the 2 modes : upper is when it is drawing "dots" and lower is when it is drawing lines. And no, your ayes are not failing you : in the part where you should see lines you see nothing, since colored lines can not be drawn by specifying just one point. I hope that this example will clarify what is actually happening in metatrader drawing buffers if some rules are not obeyed since the only difference between the 2 is the drawing style - values are exactly the same

Thx,

It ALMOST don't matter to me how these things are "drawn", for an EA and how optimizing

What matters is the digital outputs not changing per bar, therefor the digital indie result for recently

Finished formed bar remains the same when moving to next position back. Perhaps that is what my

Programmer is seeing difference of, the values and how drawing? Did you gather that from his gifs?

I'm sure this indie maintains itsdata window values per bar or you'll be telling me, as like I say, thats all that matters in tester, how

Indie looked originally on chart was just original enamor-ization with indie.

Mladen Rakic
156411
Mladen Rakic  

...

Sorry

But I can not explain simpler. Please re-read the post with the explanation why multi color lines must be drawn in a certain manner and see the example that I have attached the code too.

all the best Mladen

Batchboy:
Thx,

It ALMOST don't matter to me how these things are "drawn", for an EA and how optimizing

What matters is the digital outputs not changing per bar, therefor the digital indie result for recently

Finished formed bar remains the same when moving to next position back. Perhaps that is what my

Programmer is seeing difference of, the values and how drawing? Did you gather that from his gifs?

I'm sure this indie maintains itsdata window values per bar or you'll be telling me, as like I say, thats all that matters in tester, how

Indie looked originally on chart was just original enamor-ization with indie.
powermatrix
6
powermatrix  
derumuro:
Hello,

i have found the following picture:

Divergenz-Sensor

Can someone make this Indikotor?

Thanks and Regards

derumuro

This one looks great...

Mladen Rakic
156411
Mladen Rakic  

TDI laguerre rsi based ...

Found this interesting variation of the TDI (traders dynamic index) that is not using RSI but Laguerre RSI for calculation. Results seem to be interesting. I do not know who's idea was to use Laguerre RSI in the indicator originally

tampa
2047
tampa  

Interesting indicator for trends

gradwohl
17
gradwohl  

trend indikator

Can someone make this Indikotor (trendMA) change in mt4

meta: subchart ( false );

Inputs:

Price ( Close ),

PeriodFast ( 4, 1 ),

PeriodPro ( 2, 1 ),

Drawings ( True ),

System ( On_, Off_ ) = Off_ ;

Variables:

Avg, Avg2;

Avg = Average(Price, PeriodFast);

Avg2 = Avg[-PeriodPro];

If System = On_ then Begin

If Avg crosses over Avg2

then buy ("LONG") 1 shares this bar on close;

If Avg crosses under Avg2

then short ("SHORT") 1 shares this bar on close;

End;

if drawings then begin

drawline(avg,"avgNormal",stylesolid,2,blue,blue);

drawline[-PeriodPro](avg,"avgZukunft",stylesolid,2,red,red);

end;

thanks mahatma

Mladen Rakic
156411
Mladen Rakic  

...

mahatma

That is simply a system of crosses of an average and its own value two bars ago. It is very similar to trading when the slope of the average changes but this one is different since in it not the first past bar is compared to current bar to get a signal but a second bar is compared to current bar (which is actually not a bad idea to filter some false signal out). Attaching the indicator that does that. I set the default ma type to EMA instead to SMA (is in the code you posted). If you wish it to use SMA, set the FastMethod to 0

mahatma:
Can someone make this Indikotor (trendMA) change in mt4

meta: subchart ( false );

Inputs:

Price ( Close ),

PeriodFast ( 4, 1 ),

PeriodPro ( 2, 1 ),

Drawings ( True ),

System ( On_, Off_ ) = Off_ ;

Variables:

Avg, Avg2;

Avg = Average(Price, PeriodFast);

Avg2 = Avg[-PeriodPro];

If System = On_ then Begin

If Avg crosses over Avg2

then buy ("LONG") 1 shares this bar on close;

If Avg crosses under Avg2

then short ("SHORT") 1 shares this bar on close;

End;

if drawings then begin

drawline(avg,"avgNormal",stylesolid,2,blue,blue);

drawline[-PeriodPro](avg,"avgZukunft",stylesolid,2,red,red);

end;

thanks mahatma
Files:
2_mas.mq4 2 kb
2_mas.gif 30 kb
gradwohl
17
gradwohl  

trend indikator

super thank mladen,

is there anything else?

possibly lay the trend Ma on a different indicator

For example: the trendMA put on such a moving average Kama, or Hull!!

here is a slightly modified version

meta: subchart (false);

inputs:

Price (Close)

Fast period (4, 1),

PeriodPro (2, 1),

Drawings (True)

System (On_, off_) = off_;

Variables:

Avg, avg2;

Avg = Average (Price, Period Fast);

Avg2 = AVG [PeriodPro];

If system = On_ then Begin

If Avg crosses over avg2

then buy ("LONG") 1 shares this bar on close;

If Avg crosses under avg2

then short ("SHORT") 1 shares this bar on close;

End;

if drawings do begin

DrawLine (avg, "avgNormal" style solid, 2, blue, blue);

DrawLine (avg2, "avgVergangenheit" style solid, 2, red, red);

end;

many thanks in advance

mahatma

Mladen Rakic
156411
Mladen Rakic  

...

mahatma

That is the same formula, only the name of the parameters is changed

As far as applying it to some other indicator (if I understand correctly the question) it is not possible in metatrader 4

mahatma:
super thank mladen,

is there anything else?

possibly lay the trend Ma on a different indicator

For example: the trendMA put on such a moving average Kama, or Hull!!

here is a slightly modified version

meta: subchart (false);

inputs:

Price (Close)

Fast period (4, 1),

PeriodPro (2, 1),

Drawings (True)

System (On_, off_) = off_;

Variables:

Avg, avg2;

Avg = Average (Price, Period Fast);

Avg2 = AVG [PeriodPro];

If system = On_ then Begin

If Avg crosses over avg2

then buy ("LONG") 1 shares this bar on close;

If Avg crosses under avg2

then short ("SHORT") 1 shares this bar on close;

End;

if drawings do begin

DrawLine (avg, "avgNormal" style solid, 2, blue, blue);

DrawLine (avg2, "avgVergangenheit" style solid, 2, red, red);

end;

many thanks in advance

mahatma
tampa
2047
tampa  
"Indestructible trend winner"