Coding help - page 220

 

ok,

1.- find opening price of the day, check

2.- find the high and low of this price and make the math

(opening price + high + low)/3 = number1

Could you help me please?

 
daniel1983:
ok,

1.- find opening price of the day, check

2.- find the high and low of this price and make the math

(opening price + high + low)/3 = number1

Could you help me please?

daniel

If you wish the high and the low of the current bar of the current chart (time frame) they are simply High[0] and Low[0]

 

So, if they are High[0] and Low[0] does it mean High price = 0, Low Price = 0 for this candle every day? or this are the for finding "name for the high/low price for this candle"?

math would be (price of the day + High[0]+Low[0])/3 = number1?

 
daniel1983:
So, if they are High[0] and Low[0] does it mean High price = 0, Low Price = 0 for this candle every day? or this are the for finding "name for the high/low price for this candle"? math would be (price of the day + High[0]+Low[0])/3 = number1?

No

The "[0]" means the current bar of the current chart

It would return high and low values for the current bar, not 0

 

math would be:

(Opening price + High[0] + Low[0])/3=number1 ??

code would be:

PHP Code:

double dayOpen=iOpen(NULL,PERIOD_D1,0);(iOpen(NULL,PERIOD_D1,0)+High[0]+Low[0])/3= number1

?

 
daniel1983:
math would be:

(Opening price + High[0] + Low[0])/3=number1 ??

code would be:

PHP Code:

double dayOpen=iOpen(NULL,PERIOD_D1,0);(iOpen(NULL,PERIOD_D1,0)+High[0]+Low[0])/3= number1

?

Yes

 

Thank you Mladen,

How would be the code for printing in the screen graph the following:

1.- throw a line in this "number1" price

2.- below this line print "key of the day = number1?

image example attached

Files:
 
daniel1983:
Thank you Mladen,

How would be the code for printing in the screen graph the following:

1.- throw a line in this "number1" price

2.- below this line print "key of the day = number1?

image example attached

Daniel

You have some very good example how horizontal lines can be created here : https://www.mql5.com/en/forum/172989

 

Hello,Mladen.You made the indicator on the price, on the schedule. Whether it is possible to lower the indicator under the schedule?

thank you

 
Air92:
Hello,Mladen.You made the indicator on the price, on the schedule. Whether it is possible to lower the indicator under the schedule? thank you

Air92

I am afraid that I do not understand the question. Can you please try explaining it some other way?

Reason: