int candleclose()
{
double open = iOpen(_Symbol,PERIOD_CURRENT,1);
double high = iHigh(_Symbol,PERIOD_CURRENT,1);
double low = iLow(_Symbol,PERIOD_CURRENT,1);
double close = iClose(_Symbol,PERIOD_CURRENT,1);
int range = int ((high-low)/_Point);
int closerange = 0;
if(open<close) closerange = int ((close-low)/_Point); // Bullishelseif(open>close) closerange = int ((high-close)/_Point); // Bearishreturn (closerange*100)/range;
}
how to modify the code as shown below:
If it is bearish Bar = it will calculate the % of the "high to the close" of the Bar
If it is bullish Bar = it will calculate the % from the "low to the close" of the Bar Thank for your help ;)
This code is about showing the % of the the body
how to modify the code as shown below:

If it is bearish Bar = it will calculate the % of the "high to the close" of the Bar
If it is bullish Bar = it will calculate the % from the "low to the close" of the Bar

Thank for your help ;)