Jump to content

[Req] S+e+r+u+l+i+n+k ea (Kang Gun trading System)


Recommended Posts

  • 2 weeks later...

Re: [Req] S+e+r+u+l+i+n+k ea

 

Here the version 2

TF 15 M all pair.

 

[spoiler:1zazo45h]extern string Balance_Info = "Bila tercapai ROBOT berhenti TRADING";

extern double TargetPercentage = 10.0;

extern double StopPercentage = 20.0;

extern double TargetBalance = 0.0;

extern double StopBalance = 0.0;

extern bool StopTrading = FALSE;

extern string Filter_ = "Setting sesuai prediksi pergerakan harga";

extern bool Hanya_BUY = TRUE;

extern bool Hanya_SELL = TRUE;

extern bool CloseSignal = TRUE;

extern bool TrailingStop = FALSE;

extern int TS = 40;

string gs_unused_148 = "jika = true, tidak buka posisi baru, posisi yg lama tetap di maintain";

bool gi_156 = FALSE;

extern int Magic = 1;

extern string Time_Frame = "0=Chart Aktif, 5, 15, 30, 60, 240 dst";

extern int TF = 5;

extern int TP = 25;

extern string SL = "Sudah di SET otomatis hitung ATR";

extern bool Use_SLTP = FALSE;

extern string Time_Info = "Jam Trading waktu Server";

extern int OpenHour = 22;

extern int CloseHour = 5;

extern string MM_Info = "Kalau MM=true, isi risk berapa persen yg mau di pake.";

extern bool MM = TRUE;

extern double Risk = 2.0;

extern string Lots_Info = "Kalau MM=false, isi Lots yg mau di pake.";

extern double Lots = 0.01;

extern string MaxLots_Info = "Maximum dan Minimum Lot, nggak bisa lebih dari ini.";

extern double MaxLots = 8.0;

extern double MinLots = 0.01;

extern string LotsDigit_Info = "1=utk acc standar/mini, 2=utk acc micro";

extern int LotsDigit = 2;

extern int Slippage = 2;

extern string Filter_Info = "Filter untuk buka posisi";

extern int SignalFilter = 17;

extern int MaxTrades = 10;

extern int MaxTradePerBar = 1;

extern int MaxTradePerPosition = 5;

extern string TXComment = "Battousai-";

extern string CreatedBy = "AGUNG serulink";

extern string Email = "[email protected]";

extern string Website = "www.serulink.com";

int g_count_340 = 0;

double g_ord_open_price_344 = 0.0;

double g_ord_open_price_352 = 0.0;

int g_bars_360 = -1;

bool gi_364 = FALSE;

int gi_unused_368 = 0;

int gi_372 = 0;

 

int init() {

Comment("\nBattousai_v.2",

"\nLagi persiapan....");

return (0);

}

 

int start() {

double ld_20;

double ld_28;

if (gi_156 == TRUE) {

CloseAll();

return (0);

}

int l_count_0 = 0;

int l_count_4 = 0;

int l_count_8 = 0;

int l_ticket_12 = -1;

int l_pos_16 = 0;

if (Tradetime() == 1) {

if (TargetPercentage > 0.0) {

if (gi_364 == FALSE) {

ld_20 = AccountEquity() + AccountEquity() * TargetPercentage / 100.0;

ld_28 = AccountEquity() - AccountEquity() * StopPercentage / 100.0;

if (TargetBalance != ld_20) TargetBalance = ld_20;

if (StopBalance != ld_28) StopBalance = ld_28;

gi_364 = TRUE;

}

} else gi_364 = TRUE;

if ((gi_364 == TRUE && (TargetBalance > 0.0 && AccountEquity() >= TargetBalance) || (StopBalance >= 0.0 && AccountEquity() <= StopBalance)) || StopTrading == TRUE) {

Comment("\nBattousai_v.2",

"\nSTOP TRADING....",

"\n\nTargetBalance = ", TargetBalance,

"\nAccountEquity = ", AccountEquity(),

"\nStopBalance = ", StopBalance,

"\n\nSELAMAT TARGET TELAH TERCAPAI ...!!",

"\nISTIRAHAT DULU YA :-)");

ForceCloseAll();

return (0);

}

Comment("\nBattousai_v.2",

"\nLAGI TRADING...",

"\n\nTargetBalance = ", TargetBalance,

"\nAccountEquity = ", AccountEquity(),

"\nStopBalance = ", StopBalance,

"\n\nMulai Trading Jam = ", OpenHour,

"\nSelesai Trading Jam = ", CloseHour,

"\nSekarang Jam = ", Hour());

for (l_pos_16 = 0; l_pos_16 < OrdersTotal(); l_pos_16++) {

OrderSelect(l_pos_16, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderCloseTime() == 0) {

l_count_8++;

if (OrderType() == OP_BUY) {

l_count_0++;

g_ord_open_price_344 = OrderOpenPrice();

}

if (OrderType() == OP_SELL) {

l_count_4++;

g_ord_open_price_352 = OrderOpenPrice();

}

}

}

if (l_count_8 < MaxTrades) {

if (g_bars_360 != Bars) {

g_count_340 = 0;

g_bars_360 = Bars;

}

RefreshRates();

if (l_count_4 < MaxTradePerPosition && g_count_340 < MaxTradePerBar && Ask - g_ord_open_price_352 > SignalFilter * Point || l_count_4 < 1 && GetSignal(1) == 1) {

if (AccountFreeMarginCheck(Symbol(), OP_SELL, GetLots()) <= 0.0 || GetLastError() == 134/* NOT_ENOUGH_MONEY */) Print("Bro, udah nggak punya Margin lagi nih, nggak bisa OP...");

else {

if (Use_SLTP == FALSE) l_ticket_12 = OrderSend(Symbol(), OP_SELL, GetLots(), Bid, Slippage, 0, 0, TXComment + Symbol(), Magic, 0, Red);

else l_ticket_12 = OrderSend(Symbol(), OP_SELL, GetLots(), Bid, Slippage, Bid + iATR(NULL, PERIOD_H1, 30, 0), Bid - TP * Point, TXComment + Symbol(), Magic, 0, Red);

if (l_ticket_12 > 0) g_count_340++;

}

}

if (l_count_0 < MaxTradePerPosition && g_count_340 < MaxTradePerBar && g_ord_open_price_344 - Bid > SignalFilter * Point || l_count_0 < 1 && GetSignal(0) == 1) {

if (AccountFreeMarginCheck(Symbol(), OP_BUY, GetLots()) <= 0.0 || GetLastError() == 134/* NOT_ENOUGH_MONEY */) Print("Bro, udah nggak punya Margin lagi nih, nggak bisa OP...");

else {

if (Use_SLTP == FALSE) l_ticket_12 = OrderSend(Symbol(), OP_BUY, GetLots(), Ask, Slippage, 0, 0, TXComment + Symbol(), Magic, 0, Blue);

else l_ticket_12 = OrderSend(Symbol(), OP_BUY, GetLots(), Ask, Slippage, Ask - iATR(NULL, PERIOD_H1, 30, 0), Ask + TP * Point, TXComment + Symbol(), Magic, 0, Blue);

if (l_ticket_12 > 0) g_count_340++;

}

}

}

} else {

gi_364 = FALSE;

Comment("\nBattousai_v.2",

"\nIstirahat Dulu... ",

"\n\nTargetBalance = ", TargetBalance,

"\nAccountEquity = ", AccountEquity(),

"\nStopBalance = ", StopBalance,

"\n\nMulai Trading Jam = ", OpenHour,

"\nSelesai Trading Jam = ", CloseHour,

"\nSekarang Jam = ", Hour());

}

CloseAll();

return (0);

}

 

int GetSignal(int ai_0) {

bool li_ret_4 = FALSE;

if (ai_0 == 0) {

if (Hanya_BUY == TRUE && iClose(NULL, TF, 0) < iBands(NULL, TF, 20, 2, 0, PRICE_CLOSE, MODE_LOWER, 0)) li_ret_4 = TRUE;

} else {

if (ai_0 == 1)

if (Hanya_SELL == TRUE && iClose(NULL, TF, 0) > iBands(NULL, TF, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, 0)) li_ret_4 = TRUE;

}

return (li_ret_4);

}

 

void CloseAll() {

for (int l_pos_0 = OrdersTotal() - 1; l_pos_0 >= 0; l_pos_0--) {

OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderCloseTime() == 0) {

if (OrderType() == OP_BUY) {

if (SecurProfit() == 1 || CrossPositionProfit() == 1) OrderClose(OrderTicket(), OrderLots(), Bid, 3, Blue);

if (TrailingStop == TRUE && MarketInfo(OrderSymbol(), MODE_BID) - OrderOpenPrice() > TS * Point && OrderStopLoss() < MarketInfo(OrderSymbol(), MODE_BID) - TS * Point ||

OrderStopLoss() == 0.0) OrderModify(OrderTicket(), OrderOpenPrice(), MarketInfo(OrderSymbol(), MODE_BID) - TS * Point, OrderTakeProfit(), 65280);

}

if (OrderType() == OP_SELL) {

if (SecurProfit() == 1 || CrossPositionProfit() == 2) OrderClose(OrderTicket(), OrderLots(), Ask, 3, Red);

if (TrailingStop == TRUE && OrderOpenPrice() - MarketInfo(OrderSymbol(), MODE_ASK) > TS * Point && OrderStopLoss() > MarketInfo(OrderSymbol(), MODE_ASK) + TS * Point ||

OrderStopLoss() == 0.0) OrderModify(OrderTicket(), OrderOpenPrice(), MarketInfo(OrderSymbol(), MODE_ASK) + TS * Point, OrderTakeProfit(), 255);

}

}

}

}

 

void ForceCloseAll() {

for (int l_pos_0 = OrdersTotal() - 1; l_pos_0 >= 0; l_pos_0--) {

OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderCloseTime() == 0) {

if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 3, Blue);

if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 3, Red);

}

}

}

 

int Tradetime() {

bool li_ret_0 = FALSE;

if (OpenHour < CloseHour) {

if (Hour() >= OpenHour && Hour() <= CloseHour) li_ret_0 = TRUE;

} else {

if (OpenHour > CloseHour)

if (Hour() >= OpenHour || Hour() <= CloseHour) li_ret_0 = TRUE;

}

return (li_ret_0);

}

 

double GetLots() {

double ld_ret_0;

int li_40;

double ld_8 = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSTEP), 2);

double ld_16 = NormalizeDouble(MarketInfo(Symbol(), MODE_MARGINREQUIRED), 4);

double ld_24 = 1000.0 * ld_16;

if (LotsDigit == 0) {

if (ld_8 == 0.01) li_40 = 2;

else li_40 = 1;

LotsDigit = li_40;

}

if (MM == TRUE) ld_ret_0 = NormalizeDouble(AccountFreeMargin() / (ld_24 / Risk), LotsDigit);

else ld_ret_0 = Lots;

double ld_32 = NormalizeDouble(MarketInfo(Symbol(), MODE_MINLOT), 2);

if (ld_ret_0 < ld_32) ld_ret_0 = ld_32;

if (ld_ret_0 > MaxLots) ld_ret_0 = MaxLots;

return (ld_ret_0);

}

 

double TickValue() {

double ld_0 = NormalizeDouble(MarketInfo(Symbol(), MODE_TICKVALUE), 4);

return (ld_0);

}

 

int SecurProfit() {

bool li_ret_0 = FALSE;

if (OrderProfit() > TickValue() * GetLots() * TP) li_ret_0 = TRUE;

return (li_ret_0);

}

 

int CrossPositionProfit() {

gi_372 = 0;

if (CloseSignal == TRUE && (iClose(NULL, TF, 1) < iOpen(NULL, TF, 1) && iClose(NULL, TF, 2) >= iOpen(NULL, TF, 2) || iClose(NULL, TF, 3) >= iOpen(NULL, TF, 3)) && iHigh(NULL, TF, 1) > iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_UPPER, 1) ||

iHigh(NULL, TF, 2) > iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_UPPER, 2) || iHigh(NULL, TF, 3) > iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_UPPER, 3) && iClose(NULL, TF, 1) < (iClose(NULL, TF, 2) +

iOpen(NULL, TF, 2) + iClose(NULL, TF, 3) + iOpen(NULL, TF, 3)) / 4.0) gi_372 = 1;

if (CloseSignal == TRUE && (iClose(NULL, TF, 1) > iOpen(NULL, TF, 1) && iClose(NULL, TF, 2) <= iOpen(NULL, TF, 2) || iClose(NULL, TF, 3) <= iOpen(NULL, TF, 3)) && iLow(NULL, TF, 1) < iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_LOWER, 1) ||

iLow(NULL, TF, 2) < iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_LOWER, 2) || iLow(NULL, TF, 3) < iBands(NULL, TF, 24, 2, 0, PRICE_CLOSE, MODE_LOWER, 3) && iClose(NULL, TF, 1) > (iClose(NULL, TF, 2) +

iOpen(NULL, TF, 2) + iClose(NULL, TF, 3) + iOpen(NULL, TF, 3)) / 4.0) gi_372 = 2;

return (gi_372);

}[/spoiler:1zazo45h]

Link to comment
Share on other sites

Re: [Req] S+e+r+u+l+i+n+k ea (Kang Gun trading System)

 

Hmm it does not seem that he is only running his ea on the account shown, Is he trading some kind of manual system there and if so which manual system>

[spoiler:26ukmy10]Never trust, never fear, never beg[/spoiler:26ukmy10]
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...