Download MetaTrader 5

How to draw rectangle around a set of candles in custom indicator

To add comments, please log in or register
jackee1234
197
jackee1234  
Say I have two candles satisfy a property, I want to draw a rectangle around them like the following under custom indicator, what should I do? The [setIndexStyle][https://docs.mql4.com/customind/setindexstyle] does not seem to have this option.




SetIndexStyle - Custom Indicators - MQL4 Reference
SetIndexStyle - Custom Indicators - MQL4 Reference
  • docs.mql4.com
SetIndexStyle - Custom Indicators - MQL4 Reference
honest_knave
Moderator
2318
honest_knave  

You will need to create an OBJ_RECTANGLE using ObjectCreate() 

ObjectCreate - Object Functions - MQL4 Reference
ObjectCreate - Object Functions - MQL4 Reference
  • docs.mql4.com
ObjectCreate - Object Functions - MQL4 Reference
mntiwana
3590
mntiwana  
jackee1234:
Say I have two candles satisfy a property, I want to draw a rectangle around them like the following under custom indicator, what should I do? The [setIndexStyle][https://docs.mql4.com/customind/setindexstyle] does not seem to have this option.




If you want learn coding then "honest_knave" already answered you,in case you want ready code (indicator) there is already with all possible options,size,color,filled,empty,rectangle lines thickness,Tfs and so on.

jackee1234
197
jackee1234  
mntiwana:
If you want learn coding then "honest_knave" already answered you,in case you want ready code (indicator) there is already with all possible options,size,color,filled,empty,rectangle lines thickness,Tfs and so on.

What's the purpose of your post? You have some codes or libraries to show?
To add comments, please log in or register