I think you can say pips1= close[0]-close[1] and pips2=close[2]-close[1] etc.
if pips1 > pips2 and pips1 is positive then use pips 1 etc.
or if pips 1 < pips2 and pips1 is negative then use pips1 etc.
then when you have your target you can *0.8 eg. pips1=pips1*0.8
you will add the current close price to the pips eg. pips1=pips1+close();
and then you can do OrderSelect(ticket,SELECT_BY_TICKET);
to select the order then you can do OrderClose(). Look up orderclose in help because I cant remember if it has parameters to go inside the brackets.
and for your ordersend when you open the order make ticket=OrderSend(…..)
but use no TP because the Orderclose() is the TP
I think you can say pips1= close[0]-close[1] and pips2=close[2]-close[1] etc.
if pips1 > pips2 and pips1 is positive then use pips 1 etc.
or if pips 1 < pips2 and pips1 is negative then use pips1 etc.
then when you have your target you can *0.8 eg. pips1=pips1*0.8
you will add the current close price to the pips eg. pips1=pips1+close();
and then you can do OrderSelect(ticket,SELECT_BY_TICKET);
to select the order then you can do OrderClose(). Look up orderclose in help because I cant remember if it has parameters to go inside the brackets.
and for your ordersend when you open the order make ticket=OrderSend(…..)
but use no TP because the Orderclose() is the TP
Thanks for your kind respond.
I have made an order for the freelancers. Maybe you would like to apply and get it done?
https://www.mql5.com/en/job/108821
Thanks
Damati
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I need to make my take profit as on the fibonacci lines. I know its hard to use fibonacci on the EA. so I am trying to make it as percentage.
For example. I want the EA to calculate the highest candle, then make the take profit as 0.8* the total pips of the highest 2 or 3 candles.
I dont know how to make the EA read the percentage and how to make the order (Take profit) as a percentage.
Also I am facing a problem with calculating the pips of the candles. :)
I am not very pro in programming. So is there any professionals here who can advise?
Thanks in advance