Jump to content

need help educating this ea


Recommended Posts

hello friends i got this ea and it needs to be educated and tested ...

 

/*
  Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
  Website: [url]http://purebeam.biz[/url]
  E-mail : [email][email protected][/email]
*/
#property copyright "Copyright © 2006, Arab Online Forex"
#property link      "[email protected]"

extern double Lot_size = 0.1;
extern double maxLose = 0.0;
extern double TrailingStop = 0.0;
bool gi_100 = FALSE;
bool gi_104 = TRUE;
int gi_108 = 0;
string gs_112 = "2009.08.31";

int start() {
  string ls_80;
  double l_ihigh_0 = iHigh("EURUSD", PERIOD_D1, 2);
  double l_ilow_8 = iLow(NULL, PERIOD_D1, 2);
  double l_iclose_16 = iClose(NULL, PERIOD_D1, 2);
  double ld_24 = NormalizeDouble((l_ihigh_0 + l_ilow_8 + l_iclose_16) / 3.0, Digits);
  double l_ihigh_32 = iHigh(NULL, PERIOD_D1, 1);
  double l_ilow_40 = iLow(NULL, PERIOD_D1, 1);
  double l_iclose_48 = iClose(NULL, PERIOD_D1, 1);
  double l_price_64 = NormalizeDouble((l_ihigh_32 + l_ilow_40 + l_iclose_48) / 3.0, Digits);
  double ld_72 = l_ihigh_32 - l_ilow_40;
  double l_iopen_56 = iOpen(NULL, PERIOD_D1, 0);
  double l_price_88 = NormalizeDouble(2.0 * l_price_64 - l_ihigh_32, Digits);
  double l_price_96 = NormalizeDouble(l_price_64 - (l_ihigh_32 - l_ilow_40), Digits);
  double l_price_104 = NormalizeDouble(2.0 * l_price_64 - (2.0 * l_ihigh_32 - l_ilow_40), Digits);
  double l_price_112 = NormalizeDouble(2.0 * l_price_64 - l_ilow_40, Digits);
  double l_price_120 = NormalizeDouble(l_price_64 + (l_ihigh_32 - l_ilow_40), Digits);
  double l_price_128 = NormalizeDouble(2.0 * l_price_64 + (l_ihigh_32 - 2.0 * l_ilow_40), Digits);
  if (gi_108 != 0) {
     if (AccountNumber() != gi_108) {
        Alert("ArabiFx Expert is registered to account # " + gi_108 + " ONLY !\nIf this is not your registered account", 
        "\nPlease contact [email][email protected][/email] \nor Call 002-0103-925-926");
        return (0);
     }
  }
  int l_str2time_136 = StrToTime(gs_112);
  if (TimeCurrent() >= l_str2time_136) {
     Alert("This Trial version has been expired");
     Alert("Please contact [email][email protected][/email] \nor Call 002-0103-925-926");
     return (0);
  }
  if (IsDemo() == FALSE && gi_100 == TRUE) {
     Alert("You can use the program with a Demo account ONLY");
     Alert("Please contact [email][email protected][/email] \nor Call 002-0103-925-926");
     return (0);
  }
  if (AccountBalance() <= maxLose) {
     Alert("Sorry ... \nMaximum Account Stop has been Reached \nThe Program Stopped");
     CloseAllTrades();
     Comment("Maximum Account Stop has been reached - The Program Stopped");
     return (0);
  }
  if (l_price_64 >= ld_24 && l_price_64 > l_iopen_56 && l_price_64 - l_iopen_56 > 0.0014) ls_80 = " Today is BOMP DOWN or BOMP UP if Cant Break Low Yesterday";
  if (l_price_64 <= ld_24 && l_price_64 < l_iopen_56 && l_iopen_56 - l_price_64 > 0.0014) ls_80 = "2- Today is BOMP UP or BOMP DOWN if Cant Break High Yesterday";
  if (l_price_64 > ld_24 && l_price_64 < l_iopen_56 && ld_72 <= 0.015 && l_price_64 - l_price_104 > 0.0125) ls_80 = " Program OFF DONT ENTER THE MARKET TODAY - Risky Market";
  if (l_price_64 < ld_24 && l_price_64 > l_iopen_56 && ld_72 <= 0.015 && l_price_64 - l_price_104 > 0.0125) ls_80 = " Program OFF DONT ENTER THE MARKET TODAY - Risky Market";
  if (l_price_64 > ld_24 && l_price_64 < l_iopen_56 && ld_72 > 0.015) ls_80 = " Today Zigzag UP then DOWN - Flag";
  if (l_price_64 < ld_24 && l_price_64 > l_iopen_56 && ld_72 > 0.015) ls_80 = " Today Zigzag DOWN then UP - Flag";
  if (l_price_64 == l_iclose_48 || l_price_64 == l_iopen_56) ls_80 = " Program OFF DONT ENTER THE MARKET TODAY - Risky Market";
  if (l_price_64 - l_iopen_56 <= 0.0014 && l_price_64 - l_iopen_56 > 0.0 && l_price_64 - l_price_104 <= 0.0125) ls_80 = " Today is BOMP DOWN or BOMP UP - Risky Market";
  if (l_iopen_56 - l_price_64 <= 0.0014 && l_iopen_56 - l_price_64 > 0.0 && l_price_64 - l_price_104 <= 0.0125) ls_80 = " Today is BOMP UP or BOMP DOWN - Risky Market";
  if (l_price_64 - l_iopen_56 <= 0.0014 && l_price_64 - l_iopen_56 > 0.0 && l_price_64 - l_price_104 > 0.0125) ls_80 = " Program OFF DONT ENTER THE MARKET TODAY - Risky Market";
  if (l_iopen_56 - l_price_64 <= 0.0014 && l_iopen_56 - l_price_64 > 0.0 && l_price_64 - l_price_104 > 0.0125) ls_80 = " Program OFF DONT ENTER THE MARKET TODAY - Risky Market";
  Comment(ls_80, 
     "\n\n", "???? ?????? ?????? ????? ??? ??????? ?????\n ?? ????? ??? ???????? ???? ????? ?? ?????? \n??????? ??? ?????? ?? ?? ??? ??? ????? ?? ??? ????? ?? ????? ????? ??? ?????\n ??? ???? ??? ????? ??? ??????? ???? ?? ???? ???????? ???????? ?????????", 
  "\n\n", "Coded By: ArabOnlineForex.com - Tel: 002 0103 925 926");
  if (gi_104 == TRUE)
     if (TimeHour(TimeCurrent()) >= 23) CloseAllTrades();
  if (Hour() >= 21 && Minute() == Minute()) {
     for (int l_pos_140 = 0; l_pos_140 < OrdersTotal(); l_pos_140++) {
        OrderSelect(l_pos_140, SELECT_BY_POS, MODE_TRADES);
        if (OrderSymbol() == Symbol() && OrderType() == OP_BUYLIMIT || OrderType() == OP_SELLLIMIT || OrderType() == OP_BUYSTOP || OrderType() == OP_SELLSTOP) OrderDelete(OrderTicket());
     }
  }
  if (Hour() >= 21) return (0);
  if (Hour() < 21 && !ExistPositions()) {
     if (l_price_64 == l_iclose_48 || l_price_64 == l_iopen_56) return (0);
     if (l_price_64 > ld_24 && l_price_64 < l_iopen_56 && ld_72 <= 0.015 && l_price_64 - l_price_104 > 0.0125) return (0);
     if (l_price_64 < ld_24 && l_price_64 > l_iopen_56 && ld_72 <= 0.015 && l_price_64 - l_price_104 > 0.0125) return (0);
     if (l_price_64 - l_iopen_56 <= 0.0014 && l_price_64 - l_iopen_56 > 0.0 && l_price_64 - l_price_104 > 0.0125) return (0);
     if (l_iopen_56 - l_price_64 <= 0.0014 && l_iopen_56 - l_price_64 > 0.0 && l_price_64 - l_price_104 > 0.0125) return (0);
     if (l_iopen_56 > l_iclose_48 && l_iopen_56 - l_iclose_48 >= 0.0014) OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_iopen_56 - 30.0 * Point, 2, l_iopen_56, l_iclose_48 + 5.0 * Point, "ArabiFx", 32165498, 0, Red);
     if (l_iopen_56 < l_iclose_48 && l_iclose_48 - l_iopen_56 >= 0.0014) OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_iopen_56 + 30.0 * Point, 2, l_iopen_56, l_iclose_48 - 5.0 * Point, "ArabiFx", 32165498, 0, Blue);
     if (l_price_64 >= ld_24 && l_price_64 > l_iopen_56 && l_price_64 - l_iopen_56 > 0.0014 && Hour() > 10) {
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_112 + 15.0 * Point, 2, l_price_64 - 50.0 * Point, l_price_120 - 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_112 + 25.0 * Point, 2, l_price_64 - 50.0 * Point, l_price_128 - 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_112 + 50.0 * Point, 2, l_price_64 - 50.0 * Point, l_price_128 - 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_ilow_40, 2, l_price_64 + 50.0 * Point, l_price_96 + 20.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_ilow_40, 2, l_price_64 + 50.0 * Point, l_price_104 + 15.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_88 - 50.0 * Point, 2, l_price_64 + 50.0 * Point, l_price_104 + 15.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_96, 2, l_price_96 - 50.0 * Point, l_price_96 + 25.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_104 - 20.0 * Point, 2, l_price_104 + 25.0 * Point, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_104, 2, l_price_104 - 40.0 * Point, l_price_104 + 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_128, 2, l_price_128 + 40.0 * Point, l_price_128 - 10.0 * Point, "ArabiFx", 32165498, 0, Red);
     }
     if (l_price_64 <= ld_24 && l_price_64 < l_iopen_56 && l_iopen_56 - l_price_64 > 0.0014 && Hour() > 10) {
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_88 - 15.0 * Point, 2, l_price_64 + 50.0 * Point, l_price_96 + 10.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_88 - 25.0 * Point, 2, l_price_64 + 50.0 * Point, l_price_104 + 10.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_88 - 50.0 * Point, 2, l_price_64 + 50.0 * Point, l_price_104 + 10.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32, 2, l_price_64 - 50.0 * Point, l_price_120 - 20.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32, 2, l_price_64 - 50.0 * Point, l_price_128 - 15.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_112 + 50.0 * Point, 2, l_price_64 - 50.0 * Point, l_price_128 - 15.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_120, 2, l_price_120 + 50.0 * Point, l_price_120 - 25.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_128 + 20.0 * Point, 2, l_price_128 - 25.0 * Point, l_price_128 + 50.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_128, 2, l_price_128 + 40.0 * Point, l_price_128 - 10.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_104, 2, l_price_104 - 40.0 * Point, l_price_104 + 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
     }
     if (l_price_64 > ld_24 && l_price_64 < l_iopen_56 && ld_72 > 0.015) {
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_64 + 10.0 * Point, 2, l_price_96, l_price_64 + 25.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_64, 2, l_price_96, l_price_64 + 10.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_88 + 12.0 * Point, 2, l_price_96, l_price_88 + 50.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_88, 2, l_price_96, l_price_88 + 50.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_88 - 35.0 * Point, 2, l_price_96, l_price_88 + 50.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_88 - 50.0 * Point, 2, l_price_96, l_price_88 + 50.0 * Point, "ArabiFx", 32165498, 0, Blue);
     }
     if (l_price_64 < ld_24 && l_price_64 > l_iopen_56 && ld_72 > 0.015) {
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_64 - 15.0 * Point, 2, l_price_120, l_price_64 - 25.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_64, 2, l_price_120, l_price_64 - 10.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_112 - 12.0 * Point, 2, l_price_120, l_price_112 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_112, 2, l_price_120, l_price_112 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_112 + 35.0 * Point, 2, l_price_120, l_price_112 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLLIMIT, Lot_size, l_price_112 + 50.0 * Point, 2, l_price_120, l_price_112 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
     }
     if (l_price_64 - l_iopen_56 <= 0.0014 && l_price_64 - l_iopen_56 > 0.0 && l_price_64 - l_price_104 <= 0.0125) {
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_120, 2, l_price_112, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_128, 2, l_price_120, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_128, 2, l_price_120, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_ilow_40 - 5.0 * Point, 2, l_price_64, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_96, 2, l_price_64, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_104, 2, l_price_96, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_104, 2, l_price_96, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32 + 5.0 * Point, 2, l_price_64, l_price_120 - 15.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32 + 15.0 * Point, 2, l_price_64, l_price_128, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_96 + 10.0 * Point, 2, l_price_96, l_price_96 + 20.0 * Point, "ArabiFx", 32165498, 0, Blue);
     }
     if (l_iopen_56 - l_price_64 <= 0.0014 && l_iopen_56 - l_price_64 > 0.0 && l_price_64 - l_price_104 <= 0.0125) {
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_120, 2, l_price_112, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_128, 2, l_price_120, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_price_128, 2, l_price_120, l_price_128 + 35.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_ilow_40 - 5.0 * Point, 2, l_price_64, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_96, 2, l_price_64, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_104, 2, l_price_96, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_SELLSTOP, Lot_size, l_price_104, 2, l_price_96, l_price_104 - 50.0 * Point, "ArabiFx", 32165498, 0, Red);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32 + 5.0 * Point, 2, l_price_64, l_price_120 - 15.0 * Point, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYSTOP, Lot_size, l_ihigh_32 + 15.0 * Point, 2, l_price_64, l_price_128, "ArabiFx", 32165498, 0, Blue);
        OrderSend(Symbol(), OP_BUYLIMIT, Lot_size, l_price_96 + 10.0 * Point, 2, l_price_96, l_price_96 + 20.0 * Point, "ArabiFx", 32165498, 0, Blue);
     }
  }
  int l_ord_total_144 = OrdersTotal();
  for (int l_pos_148 = 0; l_pos_148 < l_ord_total_144; l_pos_148++) {
     OrderSelect(l_pos_148, SELECT_BY_POS, MODE_TRADES);
     if (OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
        if (OrderType() == OP_BUY) {
           if (TrailingStop > 0.0) {
              if (Bid - OrderOpenPrice() > Point * TrailingStop) {
                 if (OrderStopLoss() < Bid - Point * TrailingStop) {
                    OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, Blue);
                    return (0);
                 }
              }
           }
        }
        if (OrderType() == OP_SELL) {
           if (TrailingStop > 0.0) {
              if (OrderOpenPrice() - Ask > Point * TrailingStop) {
                 if (OrderStopLoss() > Ask + Point * TrailingStop || OrderStopLoss() == 0.0) {
                    OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, Red);
                    return (0);
                 }
              }
           }
        }
     }
  }
  return (0);
}

void CloseAllTrades() {
  for (int l_pos_0 = 0; l_pos_0 < OrdersTotal(); l_pos_0++) {
     if (OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES)) {
        if (Symbol() == OrderSymbol() && OrderMagicNumber() == 32165498) {
           if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 2, Blue);
           if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 2, Red);
        }
     }
  }
}

bool ExistPositions() {
  for (int l_pos_0 = 0; l_pos_0 < OrdersTotal(); l_pos_0++) {
     if (OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES))
        if (OrderSymbol() == Symbol() && OrderMagicNumber() == 32165498) return (TRUE);
  }
  return (FALSE);
}

Link to comment
Share on other sites

Re: need help educating this ea

 

find the following and add them to disable the checks.. it should run in live account and no date checks..

 

 

/* <<<<<---- add this

if (gi_108 != 0) {

if (AccountNumber() != gi_108) {

Alert("ArabiFx Expert is registered to account # " + gi_108 + " ONLY !\nIf this is not your registered account",

"\nPlease contact [email protected] \nor Call 002-0103-925-926");

return (0);

}

}

int l_str2time_136 = StrToTime(gs_112);

if (TimeCurrent() >= l_str2time_136) {

Alert("This Trial version has been expired");

Alert("Please contact [email protected] \nor Call 002-0103-925-926");

return (0);

}

if (IsDemo() == FALSE && gi_100 == TRUE) {

Alert("You can use the program with a Demo account ONLY");

Alert("Please contact [email protected] \nor Call 002-0103-925-926");

return (0);

}

add this ---->>> */

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...