lukpayat
Active+ Member

- Messages
- 3,105
- Joined
- Dec 21, 2008
- Messages
- 3,105
- Reaction score
- 4,333
- Points
- 111
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.



extern double PercentClose = 0.10;
int Start()<---Masukkan Coding di bawah bahagian ini...
double ProfitAll = AccountEquity()-AccountBalance();
double ProfitClose = AccountBalance()*PercentClose;
if(ProfitAll>=ProfitClose){
for (int k=0;k<=OrdersTotal(); k++){
if (OrderSelect(k, SELECT_BY_POS)==true) {
string PairClose = OrderSymbol();
double PairAsk = MarketInfo(PairClose,MODE_ASK);
double PairBid = MarketInfo(PairClose,MODE_BID);
if(OrderType()==OP_BUY){OrderClose(OrderTicket(),OrderLots(),PairBid,5,Blue);}
if(OrderType()==OP_SELL){OrderClose(OrderTicket(),OrderLots(),PairAsk,5,Red);}
if (OrderType()==OP_BUYLIMIT){OrderDelete(OrderTicket(),CLR_NONE);}
if( OrderType()==OP_SELLLIMIT){OrderDelete(OrderTicket(),CLR_NONE);}
if( OrderType()==OP_BUYSTOP){OrderDelete(OrderTicket(),CLR_NONE);}
if( OrderType()==OP_SELLSTOP){OrderDelete(OrderTicket(),CLR_NONE);}
}
}
}
//---- Harap Membantu

takkan tak bole buat kot:-$
hi...
they are looking for EA that can close all floating -ve position if the equity reach it target percent....
so can you help them and share it here.........................
sorry my english is lintang pukang.............![]()
tq bro digital,for yr present![]()