How to get center of the two prices with 50%

 

Hello Everyone 

 I have two prices:

Highprice = 1.14950

Lowprice = 1.05221

centerprice =?

and i want to get center price  of the Highprice and Lowprice 

 i need your help 

Thanks 

 
Fxtradewar:

Hello Everyone 

 I have two prices:

Highprice = 1.14950

Lowprice = 1.05221

centerprice =?

and i want to get center price  of the Highprice and Lowprice 

 i need your help 

Thanks 

(Hi+Low)/2
 
Stuart Browne:
(Hi+Low)/2

Hi Stuart Browne,

Thanks for your Reply

I solved it myself and its working

 

 

double Highprice=1.14950;
double Lowprice=1.05221;
double centerprice_1;
int centerprice;
int DiffPips = MathAbs(NormalizeDouble(Highprice-Lowprice,Digits)/Point);
      centerprice= DiffPips/2;
      centerprice_1= Highprice-centerprice*Point;
      Comment("Center Price : ",centerprice_1);
 
Good to hear and thanks for reporting back! Always great to post up your solutions for others to see. Thanks mate.

Cheers