days range

 

I am not a technie but understand how the code has been written. I want a custom indicator which shows the day's range.

i got the following code from other indicator as a part of other infos. but i want the range to be on right top or bottom with bigger font and color which i can customize depending on the background i use. can anyone please write a code as per my requirement?

comment= comment + "Range: Yesterday "+DoubleToStr(MathRound(q/pts),0)

+" pips, Today "+DoubleToStr(MathRound(d/pts),0)+" pips" + "\n";

thanks for your effort in advance.

 
adiga:

I am not a technie but understand how the code has been written. I want a custom indicator which shows the day's range.

i got the following code from other indicator as a part of other infos. but i want the range to be on right top or bottom with bigger font and color which i can customize depending on the background i use. can anyone please write a code as per my requirement?

comment= comment + "Range: Yesterday "+DoubleToStr(MathRound(q/pts),0)

+" pips, Today "+DoubleToStr(MathRound(d/pts),0)+" pips" + "\n";

thanks for your effort in advance.

Your welcome.

 
You cannot change the font size or position of the comment function use objects instead
 
qjol:
You cannot change the font size or position of the comment function use objects instead

i don't know much about coding! so, if you can recode as per my requirement, i will be thankful to you qjol
 
adiga:

I am not a technie but understand how the code has been written. I want a custom indicator which shows the day's range.

It should be easy for you to follow this too . . .

Use a Text Label so you can position it by x & y pixel coordinates . . .

https://docs.mql4.com/objects/ObjectCreate then https://docs.mql4.com/objects/ObjectSet to set the coordinates and the corner setting, then finally https://docs.mql4.com/objects/ObjectSetText to set the text itself, the font & size and the colour.

To create the text I would use https://docs.mql4.com/strings/StringConcatenate as it's quicker and tidier than building the string within the ObjectSetText

 
adiga:
i don't know much about coding! so, if you can recode as per my requirement, i will be thankful to you qjol
How thankful? No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
Reason: