Thread: supercharger EA
View Single Post
  #2 (permalink)  
Old 03-10-2009, 07:46 PM
matrixebiz's Avatar
matrixebiz matrixebiz is offline
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by subhi View Post
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.
Attached Files
File Type: mq4 EA_supercharger 1.mq4 (12.6 KB, 165 views)
Reply With Quote