Draw Custom Indicator automatically
-
Hello,
for my setup I am using a custom indicator (Demark Trend Lines), but its output buffers are useless for an EA. So I drag the indicator manually on chart and let the EA do its work with the object names. Therefore, backtesting in MT4 only works in visual mode, which is very time-consuming.
Is it possible for the EA to load the indicator on its own - maybe on init? The reason I want it this way is to do the faster 'offline' backtests without loading a chart.
-
I looked at this indicator and .. what to say ..., one you can try is remake logic from this indicator into blocks, I think it is possible for this indicator, but dont expect something easy, it can be a lot of work, maybe more time consumed as visual mode tester and result testing can be again slow

other you can try to do is make this indicator faster or add into this indicator usefull buffers (do in indicator code logic where you get values what you are expecting into buffers) --- again this can cost you a lot of time ... maybe somebody here find better solution for you
-
Thanks a lot! Maybe I will manage to modify the code of the indicator... or I have to live with it

-
Custom indicators are separate programs, they cannot be embed into the EA (as I know). But they are used by the EA, as you know. And also as you know, the indicator communicate with the EA via special arrays called buffers. Indicators can also print objects on the chart, which is also true for EAs and Scripts. Normally indicators print different kind of complex lines that does not appear in the list of Objects.
If the product of this indicator is Trendline chart object, I guess that this is all you have. One trendline object is made out of only 2 points. It's not that the program (the indicator) can't get all possible values of the line once it's printed on the chart, but I can't imagine someone doing that. -
You're totally right, I think it doesn't work this way. But anyway the EA works with the little workaround by dragging the indicator manually on chart.
Thank you both for the great and fast support guys!! -
@Mycle89 Please how can I create an EA that trade by dragging indicator manually on chart
-
Can you please open a new thread for your question?