Trend indicators - page 29

 

That will work for some indicator but for a non-repainting multi color line indicator it will not since nrp way of drawing requires 2 drawing buffers for additional color to avoid repainting (if an indicator has just one per color it is going to repaint in some cases, regardless of what code is used, so that test can not be used when a proper nrp mode is coded)

MrPip:
Actually you can get the values of the line buffers and check if one has a valid value. It helps to have the source code to know which buffer has what color and what value is used for the other buffers when they should have no value, usually 0 or EMPTY_VALUE.

I have used this method for BBands when the display show different colored lines, one buffer above price and the other below price.

Robert
 

mLaden,

Perhaps I misunderstood the issue.

Attached is a multicolor line indicator as I understood the question.

The iCustom tester shows the values of the 3 buffers and the output shown in the chart clearly identifies the trend as up. When Trend is Flat both up and down buffers have the large value.

BTW, The tester program can easily be modified to show the buffer outputs of all 8 buffers of any custom indicator. The code is already there for 7 buffers and it is wasy to add the final one.

Robert

Files:
 

ITMF SigAlert

ITMF SigAlert indicator

Files:
itmf_sig.gif  35 kb
itmf_sig.ex4  4 kb
 

Only now noticed (when a new post was posted by tampa here) the post so sorry for the late answer.

In the code for the average you posted there is a part that has to determine color of the ma. This is the part of the code I am referring to :

if (MA_Prev > MA_Cur)

{

UpTrendBuffer=EMPTY_VALUE;

}

else if (MA_Prev < MA_Cur)

{

DownTrendBuffer=EMPTY_VALUE; //-1 red/greem tight

}

else

{

DownTrendBuffer=EMPTY_VALUE;//EMPTY_VALUE;

UpTrendBuffer=EMPTY_VALUE;//EMPTY_VALUE;

}

}

From that code part it is obvious that if previous value is greater than current value it should be one color (red), if the previous value is less than the current value it should be other color (green), and the remaining case (since the greater than and less than are already covered) when the values are equal should have third color (yellow color). Now here is an example of the average that has a period set to 3 in order to make obvious when the third color is appearing and (according to the code) it should not (since those are not equal values on that chart)

Non-repainting code (and colors for similar indicators) does not look like that and it can not be used for trend finding (when the code is made not to repaint) since then the code must use 2 buffers for a single color to avoid repainting or errors in slope coloring. That is what I was referring to.

Attaching another picture with that same example to show how it looks like when a non-repainting code is applied to it (attaching the indicator that does that so it can be tested - I tried to make the code in as simple a manner as I could to show what is done when, not as much for eficiency of the execution).

As you can see it is coloring the slopes now as it should (and in case that equal value on two consecutive bars should appear it will color it in yellow - as it succeeded to catch one of the rare cases when it happens - you can see it on the current bar) but if you try to find out the "trend" from color buffers of that indicator you will find out that it will be meaningless in some cases. And that is why I said that non repainting multi color line indicators can not be used in that manner to find out the trend, even though they do all as it must be done in order to provide correct and non-repainting coloring for an indicator

Hope this clarifies what did I mean when I posted that post.

regards

Mladen

MrPip:

mLaden,

Perhaps I misunderstood the issue.

Attached is a multicolor line indicator as I understood the question.

The iCustom tester shows the values of the 3 buffers and the output shown in the chart clearly identifies the trend as up. When Trend is Flat both up and down buffers have the large value.

BTW, The tester program can easily be modified to show the buffer outputs of all 8 buffers of any custom indicator. The code is already there for 7 buffers and it is wasy to add the final one.

Robert
Files:
 

Mr. mLaden plz add MTF in this LSMA Thanks a tonnes in advance . . .

Lsma trend - channeled.mq4

 

Need Modfication Lsma trend

mladen:
Well, first version of LSMA trend was posted long time ago ( this post : https://www.mql5.com/en/forum/180514/page34 ) and it was made only to show what some other indicator was about. In the mean time it was renamed (surprise, surprise ... ) and posted as something different while nothing at all was changed in it.


But not posting about that now .

The main problem (in my opinion) with it was the "oversensitivity" since all it is looking for is a slope of linear regression value (LSMA == linear regression value). This version is a possible way to avoid that "oversensitivity" and ads a kind of a filter on it that might help in avoiding "insignificant" changes.

Hi

Can You Please mod Ind Lsma Trend Channeled Ind From Separate Window To main Chart price Bars Window.

Thanks In Advance

Vishal

 

Vishal

It can not be done. LSMA trend has completely different values and ranges than the main chart (take a look at the right of the LSMA trend and you will see what values are there) and it would be impossible to port it to main chart in the form it is

vishal gandhi:
Hi

Can You Please mod Ind Lsma Trend Channeled Ind From Separate Window To main Chart price Bars Window.

Thanks In Advance

Vishal
 

HI ALL!

USES THE "TREND TRAFFIC v4"indicator something EA fxrobot?

THE error code:

"TT1=iCustom( NULL ,0,"Trend_Traffic_v4 ",High_Period_Comparison,FastEMA,SlowEMA, RedZone, SpeedZone,0,0);"

"TT2=iCustom( NULL ,0,"Trend_Traffic_v4 ",High_Period_Comparison,FastEMA,SlowEMA, RedZone, SpeedZone,1,0);"

messages: cannot open Trend_Traffic_v4 ex4 file!

Someone help me!

THANKS!

 

It means that "Trend_Traffic_v4.ex4" (that exact name) indicator is missing

Check if it is saved under different name. It must exist in indicators folder using exact "Trend_Traffic_v4" name

MISI1:
HI ALL!

USES THE "TREND TRAFFIC v4"indicator something EA fxrobot?

THE error code:

"TT1=iCustom( NULL ,0,"Trend_Traffic_v4 ",High_Period_Comparison,FastEMA,SlowEMA, RedZone, SpeedZone,0,0);"

"TT2=iCustom( NULL ,0,"Trend_Traffic_v4 ",High_Period_Comparison,FastEMA,SlowEMA, RedZone, SpeedZone,1,0);"

messages: cannot open Trend_Traffic_v4 ex4 file!

Someone help me!

THANKS!
 

hi mladen!

thanks replication!

This is not the problem! problem cod -invalid index buffer-! error cod!

You know that the Trend_Traffic_v4 indicator it to be inserted in a EA robot?

the correct cod should.