75% Candle body

 

HEy Guys,

i am looking for the code for the following factor.


i would like, that my ea can calc 75% of the candle body. 

Does anybody has a solution?

 
Rehpo22:

HEy Guys,

i am looking for the code for the following factor.


i would like, that my ea can calc 75% of the candle body. 

Does anybody has a solution?

i use this code to get the price to put pending order  at specific price based on % .

1 param: maximum of the candle

2 param: minimum of the candle

3 param: type of position

4 param: % of desired price(based on candle body)

double GetPrecoOrdem(double maxima,double minima,ENUM_POSITION_TYPE tipo_operacao,int entrada)
{



   
      
         double Pips = maxima-minima;
      
      double porcento =  entrada / 100;
      double Pipscomporcentagem = Pips * porcento;
     double preco_entrada;
       
     
       if(tipo_operacao == POSITION_TYPE_BUY)
       {
      preco_entrada = NormalizeDouble((minima + Pipscomporcentagem),_Digits);
      
              
      }else if(tipo_operacao == POSITION_TYPE_SELL)
      {
         
         preco_entrada = NormalizeDouble((maxima - Pipscomporcentagem),_Digits);
           
      }
      
      return preco_entrada;

}