Request: Adding buffers to a Trend Channel Indicator

To add comments, please log in or register
ezzakt
44
ezzakt  

Hello,

I like to create a trend channel EA using attached indicator. Unfortunately it does not have buffers set.

I would like to add 3 buffers, just for the top line, middle line and bottom line of the channel.

Any chance someone could add this ? Thank you!

Andy

Files:
Robert
418
Robert  

Use ObjectGetValuesByShift Instead Of Buffers

ezzakt:
Hello,

I like to create a trend channel EA using attached indicator. Unfortunately it does not have buffers set.

I would like to add 3 buffers, just for the top line, middle line and bottom line of the channel.

Any chance someone could add this ? Thank you! Andy

Hi Andy,

You can get your values directly from the trend lines on the chart without using buffers by using this in your EA:

ObjectGetValueByShift

You just have to know the names of the trend lines to get their values on the current bar (or any bar).

Place your cursor on the line to get the name of the trend lines.

2AutoTrendChannel (UpperBlue)

0AutoTrendChannel (MiddleSkyBlue)

1AutoTrendChannel (LowerRed)

Examples to get the values:

UpperBlue= ObjectGetValueByShift("2AutoTrendChannel", 0)

MiddleSkyBlue = ObjectGetValueByShift("0AutoTrendChannel", 0)

LowerRed = ObjectGetValueByShift("1AutoTrendChannel", 0)

Hope this helps you,

Robert

ezzakt
44
ezzakt  

Amazing, that helps a lot. Thank you

ezzakt
44
ezzakt  

re

If I achieve good results with that EA, I will post it here for other members

Thanks again Robert

junlangzai
4
junlangzai  

Thanks again Robert

Fernando Jose Velasco Borea
703
Fernando Jose Velasco Borea  
How did you made the code? I'm trying to do the same but I can't get the price result
To add comments, please log in or register