Download MetaTrader 5

Is there a code to measure the candle's body?

To add comments, please log in or register
Cuong Truong
4562
Cuong Truong  

Is there a code to measure the candle's body similar to iHighest() or iLowest()?

 iBody() ? 

iBuy() - Code to place buy orders

iSell()  - Code to place sell orders

Osama Shaban
1554
Osama Shaban  

You may use such a code or do the variation that suits you ...

if(Open[1] > Close[1])
   Body = Open[1] - Close[1];
else
   Body = Close[1] - Open[1];

 Of course, this code is the simplest ... You need to change the result from x.xxxxx representation to Pips or Points by multiplying the result by  1/Point value.

Laszlo Tormasi
3057
Laszlo Tormasi  
Osama Shaban:

You may use such a code or do the variation that suits you ...

 Of course, this code is the simplest ... You need to change the result from x.xxxxx representation to Pips or Points by multiplying the result by  1/Point value.

Simplest code would be:

double Body=fabs(Close[1]-Open[1]);
To add comments, please log in or register