Download MetaTrader 5

Return price of a hand drawn line

To add comments, please log in or register
Unable to find the answer to your question? Use the search!
simonwalters
9
simonwalters 2016.11.05 10:10 

Hi,

I would like to know if it is possible to have the price value of a hand drawn horizontal line returned for use in a custom indicator,

I have been searching but no luck so far, please advise if you know a way, Cheers Simon 

Fernando Carreiro
2349
Fernando Carreiro 2016.11.05 13:19  
simonwalters: I would like to know if it is possible to have the price value of a hand drawn horizontal line returned for use in a custom indicator,

I have been searching but no luck so far, please advise if you know a way, Cheers Simon 

Yes, it is possible! It is a matter of coding it. Your choices are:

  • To learn MQL coding, in order to do it yourself (which can take a long time if you have no knowledge or experience with it)
  • To hire someone to code it for you (by going to the Freelance section and placing a Job request)

If you decide to code it yourself, the following steps may help you:

  1. Manually create the Horizontal Line and give the object a specific unique and identifiable name (after that, you would only move the line, every time you wanted a price change).
  2. In the Custom Indicator, the code would:
    1. Use the "ObjectFind()" to get the specified named object.
    2. Use the "ObjectGetDouble()" with the "OBJPROP_PRICE" property, to get the price for the object found in the previous step.
simonwalters
9
simonwalters 2016.11.06 12:01  
simonwalters:

Hi Fernando,

I'm going to learn how to code it myself and thanks for your help here. That seems be be what I was looking for.

Cheers, Simon 

To add comments, please log in or register