Hello,
I have an indicator that create rectangles for support and resistance, it draws several of them, all named : support-1 , support-2 , resistance-1 , resistance-2, ect.....
I want to use those values on an EA or an indicator, without having to enter every names one by one.
Is it possible to code something like : objectget price1 for every rectangle name support-X or resistance-X ? (then i will use it like if a bar close< and open> of a support or resistance, then do something)
Thanks
Yes, it is possible and not much difficult. But if you have source code of your SR indicator the better way is to use this code in your code.
Yes, it is possible and not much difficult. But if you have source code of your SR indicator the better way is to use this code in your code.
hello Petr Nosek,
thanks for the reply, can you point me to the right direction please, i can't find where to start.
I have several horizontal lines, i want an alert when a bar crossing it.
thanks
thanks for the reply, can you point me to the right direction please, i can't find where to start.
I have several horizontal lines, i want an alert when a bar crossing it.
You have to use ObjectGetDouble() https://docs.mql4.com/objects/objectgetdouble to find out these horizontal lines properties (price) and then just check if the current price crosses this price.
You have to use ObjectGetDouble() https://docs.mql4.com/objects/objectgetdouble to find out these horizontal lines properties (price) and then just check if the current price crosses this price.
there are several horizontal lines with different names, is there a way to use ObjectGetDouble() without having to name them all?
You said in your first post:
"I have an indicator that create rectangles for support and resistance, it draws several of them, all named : support-1 , support-2 , resistance-1 , resistance-2, ect..... "
If it is true then you can find out all exact names of them and work with all the names in ObjectGetDouble().
BTW horizontal lines or rectangles ?
You said in your first post:
"I have an indicator that create rectangles for support and resistance, it draws several of them, all named : support-1 , support-2 , resistance-1 , resistance-2, ect..... "
If it is true then you can find out all exact names of them and work with all the names in ObjectGetDouble().
BTW horizontal lines or rectangles ?
sorry for the misunderstanding, it s horizontal lines, there are several on my charts created by a market profile type indicator. Then If the bar is an upthrust for exemple, and crossing one of the lines , the EA or indicator should send an alert.
sorry for the misunderstanding, it s horizontal lines, there are several on my charts created by a market profile type indicator. Then If the bar is an upthrust for exemple, and crossing one of the lines , the EA or indicator should send an alert.
I understand you what you want. As I said, if you have a source code of your market profile indicator the best way is to add an alert into this indicator code. If you don't have the source code then you have to code a new EA/Indicator that provides alert based on the horizontal lines.
I am using the VP-Range-V6 (https://www.mql5.com/ru/code/15445), it's .Mq4 and free, so i guess it s ok the modify it for private use?
- votes: 24
- 2016.05.10
- Olexiy Polyakov
- www.mql5.com
I am using the VP-Range-V6 (https://www.mql5.com/ru/code/15445), it's .Mq4 and free, so i guess it s ok the modify it for private use?
Yes, you can modify the code by adding alerts.
- 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 have an indicator that create rectangles for support and resistance, it draws several of them, all named : support-1 , support-2 , resistance-1 , resistance-2, ect.....
I want to use those values on an EA or an indicator, without having to enter every names one by one.
Is it possible to code something like : objectget price1 for every rectangle name support-X or resistance-X ? (then i will use it like if a bar close< and open> of a support or resistance, then do something)
Thanks