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

 
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
 

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
 
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.

 
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?
Reason: