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; }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?