SCRIPT CLOSE ALL

Posted: May 16, 2011 in Expert Advisor

Bagi teman-teman yang memiliki system trading average, mungkin script ini berguna saat semua posisi kita sudah dalam keadaan profit ini script yang akan menutup semua open posisi trading kita..

silahkan dicoba dan dioprex.

NB : simpan pada c:/programfiles/xxxxbroker/experts/scripts

/*PLEASE DO NOT SALE THIS SCRIPT, BECAUSE IT IS FREE*/

#property copyright “Copyright © 2009, Andi Goen”
#property link “Http://facebook.com/Andi.Goen”
#property show_inputs
extern int Slippage=6;

//+——————————————————————+
//| script program start function |
//+——————————————————————+

int start()
{
//—-
int total=OrdersTotal(), i;
for(i=0; i=0; cnt–)
{
if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES))
{
if(OrderType()==OP_SELL) {if(!OrderClose(OrderTicket(),OrderLots(),MarketInfo(Symbol(),MODE_ASK),Slippage,CLR_NONE)) Print(“last error code = “,GetLastError());}
if(OrderType()==OP_BUY) {if(!OrderClose(OrderTicket(),OrderLots(),MarketInfo(Symbol(),MODE_BID),Slippage,CLR_NONE)) Print(“last error code = “,GetLastError());}
}
}
}

void del()
{
for(int cnt=OrdersTotal()-1; cnt>=0; cnt–)
{
if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES))
{
if(OrderType()>OP_SELL) {if(!OrderDelete(OrderTicket())) Print(“last error code = “,GetLastError());}
}
}
}

Comments
  1. Topan says:

    bos gmna cara settingan untk sesuaikan no.akun dgn EA sejuta umat. karena ketika aktifkan EA nya ada allert “Login number didnt match”. gmana caranya spya sy bsa pasang EA SU di akun?
    tq jawabannya

  2. dafid says:

    bos bisa tlg buatkan script. tq.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s