Siapa si yang tidak tahu sepak terjang master indrafxscalping yang ditakuti para broker.
Hanya dengan bantuan EA master indrafxscalping bukan hanya trading tapi dia bisa merampok broker.
pasti anda semua sudah tau kan dengan EA yang master indrafxscalping
pake, dibawah ini saya berikan coding EA indrafxscalping v5.1 yang tidak
menggunakan file .dll seperti version sebelumnya..
silahkan pelajari system yang dipakai master indrafxscalping untuk merampok broker.
#property copyright “Copyright © 2010,indrafx_scalping@yahoo.co.id”
#property link “http://www.indrafxscalping.blogspot.com”
extern string Ea_Name = “indrafxScalping v5.1″;
extern string For_Broker = ” instaforex “;
extern int OrdersType = 0;
extern bool Average = TRUE;
extern int SL = 31;
extern int TP = 6;
extern bool MM = TRUE;
extern int Risk = 10;
extern double MinLot = 0.05;
extern bool CloseBy = TRUE;
extern int ClosePips = 3;
extern bool Auto_GMT_Offset = FALSE;
extern int Manual_GMT_Offset = 0;
extern string TradingTime = “Default 0 and 2″;
extern int OpenHour = 0;
extern int CloseHour = 2;
extern bool Use_Trailing = FALSE;
extern int TrailingStart = 1;
extern int TrailingStop = 15;
extern int MaxSpread = 3;
extern int Slippage = 1;
extern int magicNumber = 58912657;
extern int envPeriod = 14;
int g_ma_method_184 = MODE_LWMA;
int g_applied_price_188 = PRICE_CLOSE;
extern double envDeviation = 0.05;
double gd_200;
string gs_208;
string gs_216;
string gs_224;
string gs_232;
string gs_240;
bool gi_248 = FALSE;
bool gi_252;
double gd_unused_256;
double gd_unused_264;
int gi_272 = 65;
int gi_276 = 5;
int gi_280;
int gi_284;
int gi_288;
int g_datetime_292 = 0;
int g_datetime_296 = 0;
int g_datetime_300 = 0;
int g_datetime_304 = 0;
int g_datetime_308 = 0;
int g_datetime_312 = 0;
int g_leverage_316;
int gi_320;
int gi_324;
string g_comment_328 = “indrafxScalping v5.1″;
string gs_336;
int init() {
Comment(“Waiting quotes…”);
if (!IsTesting()) {
if (!IsDllsAllowed()) {
Alert(“Check \”AllowDLL Imports\” ON at menu Tools->Options->ExpertAdvisors!”);
Print(“Check \”AllowDLL Imports\” ON at menu Tools->Options->ExpertAdvisors!”);
Comment(“Warning: Check Parameter \”AllowDLL Imports\” ON menu Tools -> Options -> ExpertAdvisors!”);
return (0);
}
}
if (Digits == 5) {
TP = 10 * TP;
SL = 10 * SL;
ClosePips = 10 * ClosePips;
TrailingStart = 10 * TrailingStart;
TrailingStop = 10 * TrailingStop;
MaxSpread = 10 * MaxSpread;
Print(“Digits = “, Digits);
}
g_leverage_316 = AccountLeverage();
gs_336 = StringSubstr(Symbol(), 0, 6);
gi_280 = Manual_GMT_Offset;
if (gi_280 = 24) {
gi_320 -= 24;
continue;
}
if (gi_320 >= 0) break;
gi_320 += 24;
}
while (true) {
if (gi_324 >= 24) {
gi_324 -= 24;
continue;
}
if (gi_324 >= 0) break;
gi_324 += 24;
}
return (0);
}
int start() {
double l_price_4;
double l_price_12;
int l_ticket_20;
int li_24;
int li_28;
int li_32;
int li_36;
int l_ticket_40;
int l_ticket_44;
double l_ord_open_price_48;
double l_ord_open_price_56;
int li_64;
if (MarketInfo(Symbol(), MODE_SPREAD) > MaxSpread) {
Comment(“\n Spread Over!”,
“\n Max Spread : “, MaxSpread,
“\n Spread Now: “, Ask – Bid,
“\n if permanent want trading, for max spread setting”);
return;
}
DisplayInfo();
if (CloseBy) gs_208 = “ON”;
else gs_208 = “OFF”;
if (MM) gs_216 = “ON”;
else gs_216 = “OFF”;
if (Use_Trailing) gs_224 = “ON”;
else gs_224 = “OFF”;
if (CloseBy) CloseProfit();
if (gi_272 > 0) {
if (TimeDayOfWeek(TimeCurrent()) == 5) {
if (TimeCurrent() > 86400 * (TimeCurrent() / 86400) + 86400 – 60 * gi_272) {
fOrderDeleteLimit();
fOrderCloseMarket();
return (0);
}
}
}
if (gi_276 > 0) {
if (TimeDayOfWeek(TimeCurrent()) == 1)
if (TimeCurrent() < 86400 * (TimeCurrent() / 86400) + 60 * gi_276) return (0);
}
if (Ask – Bid <= MaxSpread * Point) {
if (TradingTime() == 1) {
if (gi_248) {
gd_unused_256 = Ask;
gd_unused_264 = Bid;
gi_248 = FALSE;
return (0);
}
gs_232 = "";
if (OrdersType == 0) {
l_price_4 = ND(iEnvelopes(NULL, 0, envPeriod,
g_ma_method_184, 0, g_applied_price_188, envDeviation, MODE_UPPER, 0));
l_price_12 = ND(iEnvelopes(NULL, 0, envPeriod,
g_ma_method_184, 0, g_applied_price_188, envDeviation, MODE_LOWER, 0));
li_24 = 0;
li_28 = 0;
li_32 = 0;
li_36 = 0;
li_64 = fOrdersCounter(li_24, li_28, li_32, li_36,
l_ord_open_price_48, l_ord_open_price_56, l_ticket_40, l_ticket_44);
if (li_64 == -1) return;
if (li_32 == 0 && li_24 == 0 || Average) {
if (Open[0] 0) gi_284 = Time[0];
Print(GetLastError());
Sleep(500);
RefreshRates();
}
}
if (li_36 == 0 && li_28 == 0 || Average) {
if (Open[0] > l_price_4 && gi_288 != Time[0]) {
l_ticket_20 = OrderSend(Symbol(), OP_SELL, Lots(),
Bid, Slippage, Bid + SL * Point, Bid – TP * Point, g_comment_328,
magicNumber, 0, Red);
if (l_ticket_20 > 0) gi_288 = Time[0];
Print(GetLastError());
Sleep(500);
RefreshRates();
}
}
}
if (OrdersType == 1) {
l_price_4 = ND(iEnvelopes(NULL, 0, envPeriod,
g_ma_method_184, 0, g_applied_price_188, envDeviation, MODE_UPPER, 0));
l_price_12 = ND(iEnvelopes(NULL, 0, envPeriod,
g_ma_method_184, 0, g_applied_price_188, envDeviation, MODE_LOWER, 0) –
(Ask – Bid));
li_24 = 0;
li_28 = 0;
li_32 = 0;
li_36 = 0;
li_64 = fOrdersCounter(li_24, li_28, li_32, li_36,
l_ord_open_price_48, l_ord_open_price_56, l_ticket_40, l_ticket_44);
if (li_64 == -1) return;
if (li_32 == 0 && li_24 == 0) {
if (l_price_12 ND(Bid + Point * MarketInfo(Symbol(), MODE_STOPLEVEL))) {
l_ticket_20 = OrderSend(Symbol(), OP_SELLLIMIT,
Lots(), l_price_4, 0, l_price_4 + SL * Point, l_price_4 – TP * Point,
g_comment_328, magicNumber, 0, DeepPink);
Print(“SellLimit: ” + GetLastError());
Sleep(500);
RefreshRates();
}
} else {
if (ND(l_ord_open_price_56) != l_price_4 && gi_288 != Time[0]) {
OrderModify(l_ticket_44, l_price_4, l_price_4 + SL * Point, l_price_4 – TP * Point, 0, DarkGreen);
gi_288 = Time[0];
Print(“Modify SellLimit: ” + GetLastError());
Sleep(500);
RefreshRates();
}
}
}
} else {
gs_232 = “Waiting Open Trading Time!”;
if (OrdersType == 1) fOrderDeleteLimit();
}
}
gd_unused_256 = Ask;
gd_unused_264 = Bid;
if (Use_Trailing) fTrailingStop();
return (0);
}
void DisplayInfo() {
if (Average) gs_240 = “***(Average TYPE)***”;
else gs_240 = “***(NORMAL TYPE)***”;
double l_stoplevel_0 = MarketInfo(Symbol(), MODE_STOPLEVEL);
Comment(” ———————————————”,
“\n “, gs_240, ” “, gs_232,
“\n :: EA indrafxScalping v5.1″,
“\n :: Spread : “, MarketInfo(Symbol(), MODE_SPREAD),
“\n :: Leverage : 1 : “, AccountLeverage(),
“\n :: Equity : “, AccountEquity(),
“\n ————————————————”,
“\n :: GMT Offset : “, DoubleToStr(gi_280, 1), ” TT:”, TradingTime(),
“\n :: Trading (GMT) : “, DoubleToStr(OpenHour, 2), ” – “, DoubleToStr(CloseHour, 2),
“\n :: Start Trading (Server): “, DoubleToStr(gi_320, 2), “-”, DoubleToStr(gi_324, 2),
“\n :: Time now (Server) : “, Hour(), “:”, Minute(),
“\n ————————————————”,
“\n :: Take Profit : “, TP,
“\n :: Stop Loss : “, SL,
“\n ————————————————”,
“\n :: Close to : “, ClosePips, ” “, gs_208,
“\n :: Use Trailing : “, gs_224,
“\n :: Trailing Stop : “, TrailingStop,
“\n ————————————————”,
“\n :: Money Management : “, gs_216,
“\n :: Maximum Risk : “, Risk,
“\n :: Lots : “, Lots(),
“\n —————————————————”);
}
void CloseProfit() {
int li_unused_0 = 0;
int li_unused_4 = 0;
double ld_unused_8 = 0;
if (OrdersTotal() > 0) {
for (int l_pos_16 = OrdersTotal() + 1; l_pos_16 >= 0; l_pos_16–) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol()) {
if (OrderMagicNumber() == magicNumber) {
if (OrderCloseTime() == 0) {
if (OrderType() == OP_BUY) {
RefreshRates();
if (Bid > OrderOpenPrice() + ClosePips * Point) {
Print(“del”);
del(OrderTicket());
}
}
if (OrderType() == OP_SELL) {
RefreshRates();
if (Ask < OrderOpenPrice() – ClosePips * Point) {
Print("del");
del(OrderTicket());
}
}
}
}
}
}
}
}
}
void del(int a_ticket_0) {
int l_error_4;
string l_symbol_8;
double l_bid_16;
for (int l_count_24 = 0; l_count_24 < 1; l_count_24++) {
GetLastError();
OrderSelect(a_ticket_0, SELECT_BY_TICKET, MODE_TRADES);
l_symbol_8 = OrderSymbol();
if (OrderType() == OP_BUY) {
RefreshRates();
l_bid_16 = MarketInfo(l_symbol_8, MODE_BID);
if (!OrderClose(a_ticket_0, OrderLots(), l_bid_16, 3, Green)) l_error_4 = GetLastError();
}
if (OrderType() == OP_SELL) {
RefreshRates();
l_bid_16 = MarketInfo(l_symbol_8, MODE_ASK);
if (!OrderClose(a_ticket_0, OrderLots(), l_bid_16, 3, Green)) l_error_4 = GetLastError();
}
if (l_error_4 == 0/* NO_ERROR */) {
PlaySound("expert.wav");
return;
}
if (l_error_4 != 0/* NO_ERROR */) {
PlaySound("timeout.wav");
Print("Error for Close Funtion =", l_error_4);
}
while (!IsTradeAllowed()) Sleep(5000);
if (l_error_4 == 146/* TRADE_CONTEXT_BUSY */) while (IsTradeContextBusy()) Sleep(11000);
}
}
double ND(double ad_0) {
return (NormalizeDouble(ad_0, Digits));
}
int fOrdersCounter(int &a_count_0, int &a_count_4, int
&a_count_8, int &a_count_12, double &a_ord_open_price_16,
double &a_ord_open_price_24, int &a_ticket_32, int
&a_ticket_36) {
a_count_0 = 0;
a_count_4 = 0;
a_count_8 = 0;
a_count_12 = 0;
a_ord_open_price_16 = 0;
a_ord_open_price_24 = 0;
a_ticket_32 = 0;
a_ticket_36 = 0;
for (int l_pos_40 = 0; l_pos_40 < OrdersTotal(); l_pos_40++) {
if (OrderSelect(l_pos_40, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol()) {
if (OrderMagicNumber() == magicNumber) {
switch (OrderType()) {
case OP_BUY:
a_count_0++;
break;
case OP_SELL:
a_count_4++;
break;
case OP_BUYLIMIT:
a_count_8++;
a_ord_open_price_16 = OrderOpenPrice();
a_ticket_32 = OrderTicket();
break;
case OP_SELLLIMIT:
a_count_12++;
a_ord_open_price_24 = OrderOpenPrice();
a_ticket_36 = OrderTicket();
}
}
}
} else return (-1);
}
return (a_count_0 + a_count_4);
}
double Lots() {
int li_0;
double ld_4 = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSTEP), 2);
if (ld_4 == 0.01) li_0 = 2;
else li_0 = 1;
if (MM) gd_200 = NormalizeDouble(AccountFreeMargin() * Risk / 1000.0 / (g_leverage_316 / 100), li_0);
else gd_200 = MinLot;
double ld_12 = NormalizeDouble(MarketInfo(Symbol(), MODE_MINLOT), 2);
double ld_20 = NormalizeDouble(MarketInfo(Symbol(), MODE_MAXLOT), 2);
if (gd_200 ld_20) gd_200 = ld_20;
return (gd_200);
}
int fOrderDeleteLimit(bool ai_0 = TRUE, bool ai_4 = TRUE) {
int li_ret_8 = 0;
for (int l_pos_12 = OrdersTotal() – 1; l_pos_12 >= 0; l_pos_12–) {
if (OrderSelect(l_pos_12, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol()) {
if (OrderType() == OP_BUYLIMIT) {
if (ai_0) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderDelete(OrderTicket())) li_ret_8 = -1;
} else {
if (TimeCurrent() > g_datetime_292 + 20) {
g_datetime_292 = TimeCurrent();
Print(“Need delete BUYLIMIT ” + OrderTicket() + “. Trade Context Busy”);
}
return (-2);
}
}
}
if (OrderType() == OP_SELLLIMIT) {
if (ai_4) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderDelete(OrderTicket())) li_ret_8 = -1;
} else {
if (TimeCurrent() > g_datetime_296 + 20) {
g_datetime_296 = TimeCurrent();
Print(“Need delete SELLSTOP ” + OrderTicket() + “. Trade Context Busy”);
}
return (-2);
}
}
}
}
}
}
return (li_ret_8);
}
int fOrderCloseMarket(bool ai_0 = TRUE, bool ai_4 = TRUE) {
int l_error_8;
int li_ret_12 = 0;
for (int l_pos_16 = OrdersTotal() – 1; l_pos_16 >= 0; l_pos_16–) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol()) {
if (ai_0) {
if (OrderType() == OP_BUY) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderClose(OrderTicket(), OrderLots(), ND(Bid), 3, CLR_NONE)) {
l_error_8 = GetLastError();
Print(“Error close BUY ” + OrderTicket() + ” ” + l_error_8);
li_ret_12 = -1;
}
} else {
if (TimeCurrent() > g_datetime_300 + 0) {
g_datetime_300 = TimeCurrent();
Print(“Need close BUY ” + OrderTicket() + “. Trade Context Busy”);
}
return (-2);
}
}
}
if (ai_4) {
if (OrderType() == OP_SELL) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderClose(OrderTicket(), OrderLots(), ND(Ask), 3, CLR_NONE)) {
l_error_8 = GetLastError();
Print(“Error close SELL ” + OrderTicket() + ” ” + l_error_8);
li_ret_12 = -1;
}
} else {
if (TimeCurrent() > g_datetime_304 + 20) {
g_datetime_304 = TimeCurrent();
Print(“Need close SELL ” + OrderTicket() + “. Trade Context Busy”);
}
return (-2);
}
}
}
}
}
}
return (li_ret_12);
}
void fTrailingStop() {
double l_price_0;
int l_error_8;
for (int l_pos_12 = 0; l_pos_12 < OrdersTotal(); l_pos_12++) {
if (OrderSelect(l_pos_12, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magicNumber) {
if (OrderType() == OP_BUY) {
RefreshRates();
if (ND(Bid – OrderOpenPrice()) l_price_0 || ND(OrderTakeProfit()) == 0.0) {
if (!IsTradeContextBusy()) {
if (!OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), l_price_0, 0, CLR_NONE)) {
l_error_8 = GetLastError();
Print(“Error trailingprofit BUY ” + OrderTicket() + ” – ” + l_error_8);
}
} else {
if (g_datetime_308 + 15 < TimeCurrent()) {
g_datetime_308 = TimeCurrent();
Print("Need trailingprofit BUY " + OrderTicket() + ". Trade Context Busy");
}
}
}
}
}
if (OrderType() == OP_SELL) {
RefreshRates();
if (ND(OrderOpenPrice() – Ask) <= ND((-Point) * TrailingStart)) {
l_price_0 = ND(Ask – Point * TrailingStop);
if (!IsTradeContextBusy()) {
if (ND(OrderTakeProfit()) < l_price_0) {
if (!OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), l_price_0, 0, CLR_NONE)) {
l_error_8 = GetLastError();
Print("Error trailingprofit SELL " + OrderTicket() + " – " + l_error_8);
}
}
} else {
if (g_datetime_312 + 15 gi_324) {
if (TimeHour(TimeCurrent()) >= gi_320 ||
TimeHour(TimeCurrent()) = gi_320 && TimeHour(TimeCurrent()) <
gi_324) gi_252 = TRUE;
return (gi_252);
}
Minggu, 24 Juli 2011
Expert Advisor Script Indrafx Scalping v5.1
Minggu, Juli 24, 2011
Almairi Tsaqib
1 komentar:
gmn cara merangkainya gan???
Posting Komentar