BTC USD 75,555.6 Gold USD 4,355.19
Time now: Jun 1, 12:00 AM

100 pips ea

if(AccountFreeMargin()<(500*Lots)){
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
p/s: sesiapa yang nak gunakan lot besar sikit boleh ubah koding yang kaler merah tu...secukup rasa..aku kurangkan daripada 1000 ke 500...
 
Aku dah run 24j..total pips dlm 800pips..cume bile bukak arah berlawanan floating -ve boleh tahan sbb xda sl..

mungkin kitaorang boleh minta bantuan bro aiman untuk tambahkan sedikit koding untuk stop loss..lebih selamat...huhu
 
mungkin kitaorang boleh minta bantuan bro aiman untuk tambahkan sedikit koding untuk stop loss..lebih selamat...huhu

die xde sl sbb die martin..martin mmg float tnggi tp skali die reverse mmg kencang
 
masta lelabah klo boleh minx tlg tambahkan supaya boleh letak berapa jumlah sl yang kite nak set,tq masta~


mungkin kitaorang boleh minta bantuan bro aiman untuk tambahkan sedikit koding untuk stop loss..lebih selamat...huhu


setuju....masta aiman, kami mintak tolong buatkan coding untuk stoploss.
 
die xde sl sbb die martin..martin mmg float tnggi tp skali die reverse mmg kencang

rasanya ea ni bukan martingle, sebab tengok koding takda multiplier..cuba tengok ss kat page sebelum ni bro..ea ni guna SMA untuk open position..cuba bro buat backtest..baru leh faham
 
Last edited:
Sila edit seperti di bawah, tenguk warna merah

Code:
extern bool UseSound = False;
extern string NameFileSound = "alert.wav";
extern double Lots = 1;
[COLOR="Red"]extern int StopLoss = 0;[/COLOR]

Code:
void OpenBuy() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 
   ldLot = GetSizeLot(); 
   ldStop = 0; 
   ldTake = GetTakeProfitBuy(); 
   lsComm = GetCommentForOrder(); 
   [COLOR="red"]
   if (StopLoss>0) ldStop=Bid-StopLoss*Point;[/COLOR]
   OrderSend(Symbol
(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,[COLOR="red"]0[/COLOR],0,clOpenBuy); 
   if (UseSound) PlaySound(NameFileSound); 
} 
void OpenSell() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 
   ldLot = GetSizeLot(); 
   ldStop = 0; 
   ldTake = GetTakeProfitSell(); 
   lsComm = GetCommentForOrder(); 
   [COLOR="red"]
   if (StopLoss>0) ldStop =Ask+StopLoss*Point;  [/COLOR] 
   OrderSend(Symbol
(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,[COLOR="red"]0[/COLOR],0,clOpenSell); 
   if (UseSound) PlaySound(NameFileSound); 
}

Jangan lupa test dulu selepas edit. :)
 
Last edited:
thanks masta aiman..thanks bebanyak..lepas ni nak test pulak..cari seting sesuai....
 
Sila edit seperti di bawah, tenguk warna merah

Code:
extern bool UseSound = False;
extern string NameFileSound = "alert.wav";
extern double Lots = 1;
[COLOR="Red"]extern int StopLoss = 0;[/COLOR]

Code:
void OpenBuy() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 
   ldLot = GetSizeLot(); 
   ldStop = 0; 
   ldTake = GetTakeProfitBuy(); 
   lsComm = GetCommentForOrder(); 
   [COLOR="red"]double slBuy=0;
   if (StopLoss>0) slBuy=Bid-StopLoss*Point;[/COLOR]
   OrderSend(Symbol
(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,[COLOR="red"]slBuy[/COLOR],0,clOpenBuy); 
   if (UseSound) PlaySound(NameFileSound); 
} 
void OpenSell() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 
   ldLot = GetSizeLot(); 
   ldStop = 0; 
   ldTake = GetTakeProfitSell(); 
   lsComm = GetCommentForOrder(); 
   [COLOR="red"]double slSell=0;
   if (StopLoss>0) slSell=Ask+StopLoss*Point;  [/COLOR] 
   OrderSend(Symbol
(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,[COLOR="red"]slSell[/COLOR],0,clOpenSell); 
   if (UseSound) PlaySound(NameFileSound); 
}

Jangan lupa test dulu selepas edit. :)
masta aiman..aku da cuba backtest, nampaknya sl tu macam tak berfungsi..huhu...:(:(:(
 

Live Forex Chart

Currency
Rates
EUR / USD
1.15392
USD / JPY
155.083
GBP / USD
1.34456
USD / CHF
0.81884
USD / CAD
1.39358
EUR / JPY
178.953
AUD / USD
0.71316
Back
Top
Log in Register