Quote:
Originally Posted by subhi
i need help from everybody here to edit my EA....i hope this EA can running successful if i have post 1(TP=20),post 2(TP=20),post 3(TP=25),post 4(TP=30),post 5(TP=40),post 6(TP=50),post 7(TP=60),post 8(TP=70),post 9(TP=80),post 10(TP=90)
max trade=10
SL=0
Pips=20
Trailing stop=5
the problem is...how to write script to set TP automatically depend on how many trade is opened...i need your help,who experience to write scripts....TQ
|
Maybe this is what you want.
I basically added this;
if(Use_Auto_TakeProfit) {
int total = OrdersTotal();
if (total >=0 && total <3) {TakeProfit = 10;}
if (total >=3 && total <6) {TakeProfit = 20;}}
Let me know if that is what you want.