Use ObjectGetValuesByShift Instead Of Buffers
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! AndyHi 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
Amazing, that helps a lot. Thank you
re
If I achieve good results with that EA, I will post it here for other members
Thanks again Robert
Thanks again Robert
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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