CODING EA RASENGAN – SURIKEN by PROFITEA

Posted: May 19, 2011 in Expert Advisor

Maaf temen-temen saya baru bisa update blog lagi…

ini isi dari coding EA RASENGAN – SURIKEN by PROFITEA, silahkan di pelajari dan dioprex sesuai dengan system teman-teman..

// profitea
extern string By = “PROFITEA”;
extern string Chart = “M1-M5 All Pair”;
extern double lTakeProfit = 7;
extern double sTakeProfit = 7;
extern double lStopLoss = 300;
extern double sStopLoss = 300;
extern double max_orders = 10;
extern color clOpenBuy = Green;
extern color clOpenSell = Red;
extern string Name_Expert = “Rasengan-Suriken”;

extern int Slippage = 1;
extern int magic = 123456;
extern bool UseSound = false;
extern string NameFileSound = “Alert.wav”;
extern double Lots = 0.1;
double spread;
extern int rsitimeframe = 0;
extern int rsiperiod = 7;
extern int oversold1 = 20;
extern int overbought1 = 80;
extern int shift = 0;
extern int Time_Open = 0;
extern int Time_Close = 8;

void deinit() {
Comment(“”);
}
//+——————————————————————+
//| |
//+——————————————————————+
int start(){

if (Digits == 5) {
lTakeProfit = 10 * lTakeProfit;
sTakeProfit = 10 * sTakeProfit;
lStopLoss = 10 * lStopLoss;
sStopLoss = 10 * sStopLoss;
}

if(Bars<50){
Print("bars less than 50");
return(0);
}
if(lTakeProfit<1){
Print("TakeProfit less than 1");
return(0);
}
if(sTakeProfit<1){
Print("TakeProfit less than 1");
return(0);
}
spread = MarketInfo(Symbol(), MODE_SPREAD);
// +++++ Display on Chart +++++++++++++++++++++++++++++++++++++++++++++++++
string comment = "Broker = " + AccountCompany();
comment = comment + "\nSpread = " + DoubleToStr(spread, 2);
comment = comment + "\nOrders Total = " + DoubleToStr(OrdersTotal(), 2);
comment = comment + "\nmax orders = " + DoubleToStr(max_orders, 2);
comment = comment + "\nMagic number = " + magic;
Comment(comment);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

double l_irsi_16 = iRSI(NULL, rsitimeframe, rsiperiod, PRICE_CLOSE, shift);
double diClose0=iClose(NULL,1,0);
double diMA1=iMA(NULL,5,2,0,MODE_SMA,PRICE_OPEN,1);
double diClose2=iClose(NULL,1,0);
double diMA3=iMA(NULL,5,1,0,MODE_SMA,PRICE_OPEN,1);

if(AccountFreeMargin()=Time_Open || Hour()<=Time_Close){

if ((diClose0<diMA1 && l_irsi_16 diMA3 && l_irsi_16 >= overbought1)){
OpenSell();
return(0);
}
}

return (0);
}

bool ExistPositions() {
for (int i = max_orders; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber() == magic) {
return(True);
}
}
}

return(false);
}
void OpenBuy() {
double ldLot, ldStop, ldTake;
string lsComm;
ldLot = GetSizeLot();
ldStop = GetStopLossBuy();
ldTake = GetTakeProfitBuy();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,magic,0,clOpenBuy);
if (UseSound) PlaySound(NameFileSound);
}

void OpenSell() {
double ldLot, ldStop, ldTake;
string lsComm;

ldLot = GetSizeLot();
ldStop = GetStopLossSell();
ldTake = GetTakeProfitSell();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,magic,0,clOpenSell);
if (UseSound) PlaySound(NameFileSound);
}
string GetCommentForOrder() { return(Name_Expert); }
double GetSizeLot() { return(Lots); }
double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); }
double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); }
double GetStopLossBuy() { return(Bid-lStopLoss*Point); }
double GetStopLossSell() { return(Ask+sStopLoss*Point);}

Download file jadinya

Comments
  1. krieboy says:

    minta link downloadnya gan

  2. b4h3n0l says:

    Oom Kriboy …link downloadnya mau dunk ?

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