iCustom detection of output values for ex4-only indicator

Back to topics list To post a new topic, please log in or register
avatar
54
strontiumDog 2015.02.16 22:27
 

Hello

I acquired a free-to-download indicator for MT4 with no src code and no instructions on how to work with it in mql4 and I want to work with its output values in my EA.  Although I can see the extern value types from the input tab when I drag it onto a chart, I do not know what the indicator returns.

I suspect that the indicator - which writes Daily, Weekly and Monthly pivot lines on a chart returns three arrays, one value for each period, but I've played around with it and I cannot discover what datatype to assign to the output of the iCustom call.

Obviously the terminal works OK with it, so there is something in the Terminal which knows automatically what types the indicator returns and how to render the lines from the values it spits out but how do I find out?

Thanks

avatar
Moderator
3406
GumRai 2015.02.17 00:37 #
 

With the indicator open on the chart, open the data window (Ctrl+D) and you should see if there are any buffers from the indicator and their values.

As the indicator draws pivot lines it may be that there are no buffers drawn and it uses horizontal lines or trend lines instead. If that is the case, you will need to get the values from the objects 

avatar
54
strontiumDog 2015.02.17 00:58 #
 

Thanks for the response

I've seen there is a value in the data window, but I've tried assigning theoutput of the iCustom call to a double and I still get nothing assigned.

I've found an indicator that has got the code with it, and does the identical thing.  What is the best resource for reading up on editing indicators?  I've seen a bunch through Google, but I need a simple step guide.

avatar
Moderator
3406
GumRai 2015.02.17 01:21 #
 
strontiumDog:

Thanks for the response

I've seen there is a value in the data window, but I've tried assigning theoutput of the iCustom call to a double and I still get nothing assigned.

I've found an indicator that has got the code with it, and does the identical thing.  What is the best resource for reading up on editing indicators?  I've seen a bunch through Google, but I need a simple step guide.

As there are more than 1 pivot line and you have only seen a value, I suspect that the lines are drawn as objects. Check the objects list.

You can get price values from objects by ObjectGet() or ObjectGetDouble()

I don't know of a resource specifically for editing indicators. In fact modifying other people's code can often be more difficult than writing the code from scratch.

But reading other people's code, checking the documentation and making the effort to fully understand the code will improve your knowledge 

Back to topics list  

To add comments, please log in or register