_2523WSS94!INTRADAY-EA[1].demo





#property copyright "Copyright c2006, winning-solution.net team"
#property link "http://winning-solution.net"

int gi_76;
int gi_80 = 1172703600;
string gs_84 = "WSS-";
int gi_92 = 54112;
int gi_96 = 13451;
int gi_100 = 942;
extern string GeneralSetting = "--LEAVE IT DEFAULT OR YOU CAN ASK WSS HELPDESK--";
extern int MagicNum = 775500942;
extern string EA_PROJECT = "WSS Intraday Trapper 1.0";
extern string ExpiredDate = "28 February 2007, Please extend before expired";
extern string MoneySetting = "--USE AUTO MANAGER TO GET MAXIMUM PROFIT--";
extern bool UseAutoManager = FALSE;
extern double ManualLots = 0.1;
extern double RiskProcentage = 0.1;
extern double MinimumLots = 0.1;
extern double MaximumLots = 50;
double gd_176 = 0;
double gd_184 = 1;
extern string OrderTime = "--ORDER TIME IS 0700 GMT UNTIL 1500 GMT--";
extern int OpenTime = 9;
extern int CloseTime = 17;
int gi_208 = 1;
int gi_212 = 5;
extern string OrderTarget = "--ORDER TARGET PROFIT/LOSS--";
extern int StopLoss = 50;
extern int TakeProfit = 999;
extern int BreakEvenTarget = 30;
extern int PipsProtect = 10;
extern string Disclaimer1 = "1.This EA is not QUICK SCHEME to RICH";
extern string Disclaimer2 = "2.DONT dream to get 100 pips a day constantly";
extern string Disclaimer3 = "3.WSS will not responsible with any LOSSES";
extern bool YesIAgree = TRUE;
extern string ContactUs = "support@winning-solution.net";
int gi_276 = 0;
int gi_280 = 0;
int gi_284 = 120;
int gi_288 = 1;
int gi_292 = 0;
int gi_296 = 0;
int gi_300 = 0;
int gi_304 = 0;
int gi_308 = 0;
int gi_312 = 1;
int gi_316 = 0;
int gi_320 = 1;
bool gi_324 = FALSE;
bool gi_328 = FALSE;
int gi_332 = 0;

double CalculateMMLot() {
  double ld_0;
  double ld_8;
  double l_market_info_16;
  double ld_24;
  ld_0 = MinimumLots;
  ld_8 = MaximumLots;
  l_market_info_16 = MarketInfo(Symbol(), MODE_LOTSTEP);
  if (ld_0 < 0 || ld_8 <= 0 || l_market_info_16 <= 0) {
    Print("CalculateMMLot: invalid MarketInfo() results [", ld_0, ",", ld_8, ",", l_market_info_16, "]");
    return (0);
  } else {
    if (AccountLeverage() <= 0) {
      Print("CalculateMMLot: invalid AccountLeverage() [", AccountLeverage(), "]");
      return (0);
    } else {
      ld_24 = NormalizeDouble((AccountBalance() - gd_176) / gd_184 * RiskProcentage / AccountLeverage() / 10, 2);
      ld_24 = NormalizeDouble(ld_24 / l_market_info_16, 0) * l_market_info_16;
      if (ld_24 < ld_0) ld_24 = ld_0;
      if (ld_24 > ld_8) ld_24 = ld_8;
      return (ld_24);
    }
  }
}

int start() {
  int li_0;
  int l_ord_ticket_4;
  int l_str2time_12;
  int l_datetime_16;
  int l_str2time_20;
  int li_24;
  int li_28;
  bool li_32;
  bool li_36;
  int l_ord_ticket_40;
  int l_ord_ticket_44;
  int l_datetime_48;
  int l_datetime_52;
  double l_lots_56;
  double ld_64;
  double l_price_72;
  double l_stoploss_80;
  double l_stoploss_88;
  double l_takeprofit_96;
  double l_takeprofit_104;
  double l_datetime_112;
  double ld_120;
  double ld_128;
  string ls_136;
  double l_ihigh_144;
  double l_ilow_152;
  double l_iopen_160;
  double l_iclose_168;
  double l_ihigh_176;
  double l_ilow_184;
  double l_iopen_192;
  double l_iclose_200;
  double ld_208;
  double ld_216;
  double ld_224;
  double ld_232;
  double ld_240;
  double ld_248;
  double ld_256;
  double ld_264;
  double ld_272;
  double ld_280;
  double ld_288;
  double ld_296;
  double ld_304;
  double ld_312;
  double ld_320;
  double ld_328;
  double ld_336;
  double ld_344;
  double ld_352;
  double ld_360;
  double ld_368;
  double ld_376;
  double ld_384;
  double ld_392;
  double ld_400;
  double ld_408;
  double ld_416;
  double ld_424;
  double ld_432;
  double ld_440;
  double ld_448;
  double ld_456;
  double ld_464;
  double ld_472;
  double ld_480;
  double ld_488;
  int li_496;
  int li_500;
  double ld_504;
  double ld_512;
  double ld_520;
  double ld_528;
  double l_ima_536;
  double l_ihigh_544;
  double l_ilow_552;
  double l_iwpr_560;
  double ld_568;
  double ld_576;
  double ld_584;
  double ld_592;
  double l_icustom_600;
  double l_irsi_608;
  if (CurTime() < gi_80) {
    gi_76 = gi_80;
    li_24 = 0;
    li_28 = 0;
    li_32 = FALSE;
    li_36 = FALSE;
    ls_136 = ls_136 + "------------------------------------------------------------------------------------------------------------\n";
    ls_136 = ls_136 + "   WINNING SOLUTION SYSTEM EXPERT ADVISOR - INTRADAY EA\n";
    ls_136 = ls_136 + "   --> Product Key : " + gs_84 + "" + gi_92 + "" + gi_76 + "" + AccountNumber() + "" + gi_100 + "\n";
    ls_136 = ls_136 + "   --> You must update this software before " + TimeToStr(gi_76, TIME_DATE|TIME_SECONDS) + "\n";
    ls_136 = ls_136 + "------------------------------------------------------------------------------------------------------------\n";
    Comment(ls_136);
    l_ihigh_144 = iHigh(NULL, PERIOD_D1, 1);
    l_ilow_152 = iLow(NULL, PERIOD_D1, 1);
    l_iopen_160 = iOpen(NULL, PERIOD_D1, 1);
    l_iclose_168 = iClose(NULL, PERIOD_D1, 1);
    l_ihigh_176 = iHigh(NULL, PERIOD_D1, 0);
    l_ilow_184 = iLow(NULL, PERIOD_D1, 0);
    l_iopen_192 = iOpen(NULL, PERIOD_D1, 0);
    l_iclose_200 = iClose(NULL, PERIOD_D1, 0);
    ld_208 = (l_ihigh_144 + l_ilow_152 + l_iclose_168) / 3;
    ld_216 = 2 * ld_208 - l_ilow_152;
    ld_224 = ld_208 + l_ihigh_144 - l_ilow_152;
    ld_232 = 2 * ld_208 + l_ihigh_144 - 2 * l_ilow_152 - 5 * Point;
    ld_240 = 3 * ld_208 + l_ihigh_144 - 3 * l_ilow_152;
    ld_248 = 2 * ld_208 - l_ihigh_144;
    ld_256 = ld_208 - (l_ihigh_144 - l_ilow_152);
    ld_264 = 2 * ld_208 - (2 * l_ihigh_144 - l_ilow_152) + 5 * Point;
    ld_272 = 3 * ld_208 - (3 * l_ihigh_144 - l_ilow_152);
    ld_280 = (ld_256 + ld_264) / 2;
    ld_288 = (ld_248 + ld_256) / 2;
    ld_296 = (ld_208 + ld_248) / 2;
    ld_304 = (ld_208 + ld_216) / 2;
    ld_312 = (ld_216 + ld_224) / 2;
    ld_320 = (ld_224 + ld_232) / 2;
    ld_328 = l_ihigh_176 - l_ilow_184;
    ld_336 = l_ihigh_144 - l_ilow_152;
    ld_344 = 0.55 * ld_336 + l_iclose_168;
    ld_352 = 0.27 * ld_336 + l_iclose_168;
    ld_360 = l_iclose_168 - 0.27 * ld_336;
    ld_368 = l_iclose_168 - 0.55 * ld_336;
    ld_376 = l_ilow_152 - 0.618 * ld_336;
    ld_384 = l_ilow_152 - 0.382 * ld_336;
    ld_392 = l_ilow_152 + 0.382 * ld_336;
    ld_400 = l_ilow_152 + ld_336 / 2;
    ld_408 = l_ihigh_144 - 0.382 * ld_336;
    ld_416 = l_ihigh_144 + 0.382 * ld_336;
    ld_424 = l_ihigh_144 + 0.618 * ld_336;
    ld_432 = ld_208 + 20 * Point;
    ld_440 = ld_208 + 20 * Point;
    ld_448 = ld_208 + 40 * Point;
    ld_456 = ld_208 - 20 * Point;
    ld_464 = ld_208 - 20 * Point;
    ld_472 = ld_208 - 40 * Point;
    ld_480 = (ld_216 + ld_344 + l_ihigh_144 + 0.382 * ld_336) / 3;
    ld_488 = (ld_248 + ld_368 + l_ilow_152 - 0.382 * ld_336) / 3;
    li_496 = (ld_480 - ld_432) / Point;
    li_500 = (ld_456 - ld_488) / Point;
    ld_504 = ld_480;
    ld_512 = ld_488;
    if (li_496 < 200) {
      li_496 = (ld_232 - ld_432) / Point;
      ld_504 = ld_232;
    }
    if (li_500 < 200) {
      li_500 = (ld_456 - ld_264) / Point;
      ld_512 = ld_264;
    }
    ld_520 = iBands(NULL, 0, 20, 1, 0, PRICE_CLOSE, MODE_UPPER, 0);
    ld_528 = iBands(NULL, 0, 20, 1, 0, PRICE_CLOSE, MODE_LOWER, 0);
    l_ima_536 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, 0);
    l_ihigh_544 = iHigh(NULL, 0, 0);
    l_ilow_552 = iLow(NULL, 0, 0);
    l_iwpr_560 = iWPR(NULL, 0, 14, 0);
    ld_568 = -50;
    ld_576 = l_iwpr_560 - ld_568;
    ld_584 = iEnvelopes(NULL, 0, 14, MODE_SMA, 0, PRICE_CLOSE, 0.1, MODE_UPPER, 0);
    ld_592 = iEnvelopes(NULL, 0, 14, MODE_SMA, 0, PRICE_CLOSE, 0.1, MODE_LOWER, 0);
    l_icustom_600 = iCustom(NULL, 0, "#TMA", 0, 0);
    l_irsi_608 = iRSI(NULL, 0, 14, PRICE_CLOSE, 0);
    if (UseAutoManager) l_lots_56 = CalculateMMLot();
    else l_lots_56 = ManualLots;
    li_32 = FALSE;
    l_datetime_112 = iTime(NULL, li_32, 0);
    if (IsTesting() && gi_324 && TimeMonth(l_datetime_112) >= 4 && TimeMonth(l_datetime_112) <= 10) {
      l_str2time_12 = StrToTime((OpenTime - 1) + ":00");
      l_str2time_20 = StrToTime((OpenTime + gi_316 - 1) + ":00");
      if (DayOfWeek() == 5) l_datetime_16 = MathMin(StrToTime("22:00"), StrToTime((CloseTime - 1) + ":00"));
      else l_datetime_16 = StrToTime((CloseTime - 1) + ":00");
    } else {
      l_str2time_12 = StrToTime(OpenTime + ":00");
      l_str2time_20 = StrToTime((OpenTime + gi_316) + ":00");
      if (DayOfWeek() == 5) l_datetime_16 = MathMin(StrToTime("22:00"), StrToTime(CloseTime + ":00"));
      else l_datetime_16 = StrToTime(CloseTime + ":00");
    }
    if (gi_320 == 1 && CurTime() > l_str2time_12 - 900 && l_datetime_112 < l_str2time_12) {
      for (li_0 = 0; li_0 < OrdersTotal(); li_0++) {
        OrderSelect(li_0, SELECT_BY_POS, MODE_TRADES);
        if (OrderMagicNumber() == MagicNum && OrderSymbol() == Symbol() && (OrderType() == OP_BUYSTOP || OrderType() == OP_SELLSTOP)) OrderDelete(OrderTicket());
      }
    }
    if (TimeDay(StrToTime(TimeHour(l_datetime_112) + ":00")) == TimeDay(l_datetime_112) && l_datetime_112 >= l_str2time_12 && StrToTime(TimeHour(l_datetime_112) + ":00") < l_str2time_12 + 3600) {
      ld_120 = 0;
      for (li_0 = 0; li_0 < Bars; li_0++) {
        if (iTime(NULL, li_32, li_0) < StrToTime(TimeHour(l_datetime_112) + ":00") - 60 * 60 * gi_208) {
          ld_120 = li_0 + 1;
          break;
        }
      }
      if (ld_120 == 0) return (0);
      ld_64 = iHigh(NULL, li_32, Highest(NULL, li_32, MODE_HIGH, ld_120, 1)) + (gi_212 + MarketInfo(Symbol(), MODE_SPREAD)) * Point;
      l_price_72 = iLow(NULL, li_32, Lowest(NULL, li_32, MODE_LOW, ld_120, 1)) - gi_212 * Point;
      l_stoploss_80 = MathMax(ld_64 - StopLoss * Point, l_price_72);
      l_stoploss_88 = MathMin(l_price_72 + StopLoss * Point, ld_64);
      if (gi_276 == 0) {
        l_takeprofit_96 = ld_64 + TakeProfit * Point;
        l_takeprofit_104 = l_price_72 - TakeProfit * Point;
      } else {
        l_takeprofit_96 = ld_64 + ld_64 - l_stoploss_80;
        l_takeprofit_104 = l_price_72 - (l_stoploss_88 - l_price_72);
      }
      for (li_0 = 0; li_0 < OrdersTotal(); li_0++) {
        OrderSelect(li_0, SELECT_BY_POS, MODE_TRADES);
        if (OrderMagicNumber() == MagicNum && OrderSymbol() == Symbol() && (OrderType() == OP_BUYSTOP || OrderType() == OP_BUY)) {
          li_24++;
          if (OrderStopLoss() < OrderOpenPrice() - StopLoss + 2 * Point) OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice() - StopLoss * Point, OrderTakeProfit(), OrderExpiration(), Green);
        }
        if (OrderMagicNumber() == MagicNum && OrderSymbol() == Symbol() && (OrderType() == OP_SELLSTOP || OrderType() == OP_SELL)) {
          li_28++;
          if (OrderStopLoss() > OrderOpenPrice() + StopLoss + 2 * Point) OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice() + StopLoss * Point, OrderTakeProfit(), OrderExpiration(), Green);
        }
      }
      if (gi_308 != 0 && ld_64 - l_price_72 >= gi_308 * Point) {
        if (gi_312 == 1) {
          if (iClose(NULL, li_32, 1) - l_price_72 < ld_64 - iClose(NULL, li_32, 1)) li_28 = 1;
          else li_24 = 1;
        } else {
          li_24 = 1;
          li_28 = 1;
        }
      }
      if (!(IsTesting() && gi_328 && DayOfWeek() == 5 && Day() < 8)) {
        if (li_24 == 0 && ld_64 > Ask + MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) l_ord_ticket_4 = OrderSend(Symbol(), OP_BUYSTOP, l_lots_56, ld_64, 3, l_stoploss_80, l_takeprofit_96, EA_PROJECT, MagicNum, 0, Green);
        if (li_28 == 0 && l_price_72 < Bid - MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) l_ord_ticket_4 = OrderSend(Symbol(), OP_SELLSTOP, l_lots_56, l_price_72, 3, l_stoploss_88, l_takeprofit_104, EA_PROJECT, MagicNum, 0, Green);
      }
    }
    [cut][cut][cut][cut]
    return (0);
  } else {
    Comment("Your EA has been EXPIRED. Please contact http://winning-solution.net HELPDESK to EXTEND...");
    Comment("Your EA has been EXPIRED. Please contact http://winning-solution.net HELPDESK to EXTEND...");
    return (0);
  }
}




Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains open prices of each bar
Series array that contains close prices for each bar


Indicator Curves created:


Indicators Used:

Bollinger bands indicator
Moving average indicator
Larry William percent range indicator
Envelopes indicator

Relative strength index


Custom Indicators Used:
#TMA

Order Management characteristics:
Checks for the total of open orders
It can change open orders parameters, due to possible stepping strategy
It automatically opens orders when conditions are reached

Other Features: