Suggestion for Spacing between Graphical Objects of type OBJ_TEXT

 


Hi everyone 
I have written a code to create 2 graphical objects of type OBJ_TEXT   as per the picture bellow

The first object is an arrow (using Wingdings Font Type)  placed at the last low and right  bellow it is a text.




My question is the following .
What is an efficient way to determine the spacing between the two objects, taking into account the size of candles/chart zoom/ timeframe /scaling etc.


         ObjectCreate(0,name,OBJ_TEXT,0,0,0,0);
         ObjectSetInteger(0,name,OBJPROP_TIME,time);
         ObjectSetDouble(0,name,OBJPROP_PRICE,price);

I use the above code with the time and price for the price of the arrow being the parameters of the last low candle.
To determine the price of the second object for now I take the range between the high and low of last 5 candles (variable) and subtract it from the candle low.

Thank you


 
You can try using a multiplicand of ATR value to find a proper placement.
 
Yashar Seyyedin #:
You can try using a multiplicand of ATR value to find a proper placement.

Good suggestion. Thank you

Reason: