Zobrazují se příspěvky se štítkemAOS. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkemAOS. Zobrazit všechny příspěvky

úterý 29. března 2011

Expert Builder - system

Expert Builder system

Vytvořte si jednoduše automatické strategie - Expert Builder

Postup tvorby automatického obchodního systému
Logické podmínky v programu XTB Expert Builder
Tvorba konkrétního automatického systému
Vladimír Holovka


ExpertAdvisorBuilder



Molanis Strategy Builder for MetaTrader 4
Molanis Strategy Builder for MetaTrader 5



Left / right value and logical operators
Logical operator is the operator which compares the left value with the right value.

'=': This means 'When the left value is equal to the right value'

'<>': This means 'When the left value isn't equal to the right value'

'<': This means 'When the left value is less than the right value' '>': This means 'When the left value is greater than the right value'

'<=': This means 'When the left value is equal to / less than the right value' '>=': This means 'When the left value is equal to / greater than the right value'


Overview of the Logical Operators


Logická funkce


Truth table - Pravdivostní tabulka

pátek 11. června 2010

Forex Automated Trading

Forex Automated Trading

Automated Trading Championship 2010

Automatic Forex Crusher.rar

Avoitenko EA (ATC 2010)
http://championship.mql5.com/2010/en/users/avoitenko
Free Download Avoitenko EA by Andrey Voytenko (ATC 2010)
http://forexrobotgeeks.com/2011/06/free-download-avoitenko-ea-andrey-voytenko-atc-2010/
http://www.donnaforex.com/forum/index.php?topic=2963.0

Daniel Private System v1.0.rar

Faizumi FX Trading System.rar

Fap Turbo.rar



http://hubpages.com/hub/FapTurboSettings
FAP TURBO SETTINGS  

FM.rar

Forex AI AutoTrader v2.1.rar

Forex Apocalypse.rar

Forex Conquest.rar

Forex Cyclone.rar

Forex Funnel.rar

Forex Godfather.rar
Forex Gold Trader.rar
Forex Grinder.rar
Forex Hacked.rar
Forex Insider Pro.rar
Forex Nightfox.rar
Forex Nitro.rar
Forex Profit System.rar
Forex Scalpa.rar
Forex Shocker.rar
Forex Slasher.rar
Forex Traders Cheat Sheet.rar
Forex WarLord.rar
Free Scalping Indicator by Karl Dittmann.rar
FSA.rar
FWS-EA.rar
FX Combo.rar
FX Equity Builder.rar
FX Profit Mountain.rar
fxEB.rar
FXPROMaker Advanced.rar
GPSFxRobot.rar
Guide To Setup VPS.rar
MACD Candles MT4 Indicator.rar
MACD Sample Optimized.rar
Mover3MkII (ATC 2010).rar
MT4 Tips n Tricks.rar
Pips4IdiotsSystem.rar
PipsMiner.rar
Piptronic.rar
Pipturbo.rar
PipZu.rar
Pipzu.rar
Primeval EA.rar
Rover North Forex System.rar
SF Trend Lines Indicator.rar
The Forex Hitman.rar
The London Forex Rush.rar
USDBot.rar

pátek 7. května 2010

How To Start An Automated Online Forex Trading System

How To Start An Automated Online Forex Trading System

How To Start An Automated Online Forex Trading System

automatic expert advisor

automatic expert advisor


Pallada automatic expert advisor v1.0

MQL4 Articles


Expert Advisors and Automated Trading - MT5

Interview with Boris Odintsov (bobsley) - 


Automated Trading Championship 2010

forex expert bobsley (Mover3MkII) winner of the Championship 2010 Boris Odintsov

2nd Andrey Perfilov

system

Nejaky mozny system

Dl_Trend
Dl
Dlouhodobý trend


int g_period_76 = 13;
int g_period_80 = 34;
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(0, g_ibuf_84);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(1, g_ibuf_88);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(2, g_ibuf_92);
   SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(3, g_ibuf_96);
   IndicatorDigits(Digits + 1);
   string ls_0 = "Dlouhodobý trend";
   IndicatorShortName(ls_0);
   SetIndexLabel(0, ls_0);
   SetIndexLabel(1, ls_0);
   SetIndexLabel(2, ls_0);
   SetIndexLabel(3, ls_0);
   return (0);
}


   }
   int l_ind_counted_20 = IndicatorCounted();
   if (l_ind_counted_20 < 0) return (-1);
   for (int li_24 = Bars - Max(l_ind_counted_20 - 1, 1); li_24 >= 0; li_24--) {
      ld_0 = iMA(NULL, 0, g_period_76, 0, MODE_EMA, PRICE_MEDIAN, li_24) - iMA(NULL, 0, g_period_80, 0, MODE_EMA, PRICE_MEDIAN, li_24);
      if (ld_0 > 0.0) {
         if ((g_ibuf_84[li_24 + 1] != 0.0 && ld_0 >= g_ibuf_84[li_24 + 1]) || (g_ibuf_88[li_24 + 1] != 0.0 && ld_0 > g_ibuf_88[li_24 + 1])) {
            g_ibuf_84[li_24] = ld_0;
            g_ibuf_88[li_24] = 0;
         } else {
            g_ibuf_84[li_24] = 0;
            g_ibuf_88[li_24] = ld_0;
         }
      } else {
         if ((g_ibuf_92[li_24 + 1] != 0.0 && ld_0 >= g_ibuf_92[li_24 + 1]) || (g_ibuf_96[li_24 + 1] != 0.0 && ld_0 > g_ibuf_96[li_24 + 1])) {
            g_ibuf_92[li_24] = ld_0;
            g_ibuf_96[li_24] = 0;
         } else {
            g_ibuf_92[li_24] = 0;
            g_ibuf_96[li_24] = ld_0;
         }
      }
   }
   return (0);
}

int Max(int ai_0, int ai_4) {
   if (ai_0 > ai_4) return (ai_0);
   return (ai_4);
}





Dl_Trend_A (black)


double g_ibuf_76[];
double g_ibuf_80[];
int g_period_84 = 13;
int g_period_88 = 34;
extern bool Alerts = TRUE;
int gi_96 = 0;
int gi_100 = 0;

int init() {
   SetIndexStyle(0, DRAW_ARROW, EMPTY);
   SetIndexArrow(0, SYMBOL_THUMBSUP);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_ARROW, EMPTY);
   SetIndexArrow(1, SYMBOL_THUMBSDOWN);
   SetIndexBuffer(1, g_ibuf_80);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int li_0;
   double l_ima_4;
   double l_ima_12;
   double l_ima_20;
   double l_ima_28;
   double l_ima_36;
   double l_ima_44;
   double ld_52;
   double ld_60;

   

   }
   int li_80 = IndicatorCounted();
   if (li_80 < 0) return (-1);
   if (li_80 > 0) li_80--;
   int li_84 = Bars - li_80;
   for (int li_88 = 0; li_88 <= li_84; li_88++) {
      li_0 = li_88;
      ld_52 = 0;
      ld_60 = 0;
      for (li_0 = li_88; li_0 <= li_88 + 9; li_0++) ld_60 += MathAbs(High[li_0] - Low[li_0]);
      ld_52 = ld_60 / 10.0;
      l_ima_4 = iMA(NULL, 0, g_period_84, 0, MODE_EMA, PRICE_CLOSE, li_88);
      l_ima_20 = iMA(NULL, 0, g_period_84, 0, MODE_EMA, PRICE_CLOSE, li_88 + 1);
      l_ima_36 = iMA(NULL, 0, g_period_84, 0, MODE_EMA, PRICE_CLOSE, li_88 - 1);
      l_ima_12 = iMA(NULL, 0, g_period_88, 0, MODE_EMA, PRICE_CLOSE, li_88);
      l_ima_28 = iMA(NULL, 0, g_period_88, 0, MODE_EMA, PRICE_CLOSE, li_88 + 1);
      l_ima_44 = iMA(NULL, 0, g_period_88, 0, MODE_EMA, PRICE_CLOSE, li_88 - 1);
      if (l_ima_4 > l_ima_12 && l_ima_20 < l_ima_28 && l_ima_36 > l_ima_44) {
         g_ibuf_76[li_88] = Low[li_88] - ld_52 / 2.0;
         if (li_88 <= 2 && Alerts && !gi_96) {
            SendMail("xxxx", "Dlouhodoby trend nad nulou!!!(Long)" + Symbol());
            Alert(Symbol(), " ", Period(), " Dlouhodobý trend nad nulou!!!(Long) ");
            gi_96 = TRUE;
            gi_100 = FALSE;
         }
      } else {
         if (l_ima_4 < l_ima_12 && l_ima_20 > l_ima_28 && l_ima_36 < l_ima_44) {
            g_ibuf_80[li_88] = High[li_88] + ld_52 / 2.0;
            if (li_88 <= 2 && Alerts && !gi_100) {
               SendMail("xxxx", "Dlouhodoby trend pod nulou!!!(Short)" + Symbol());
               Alert(Symbol(), " ", Period(), " Dlouhodobý trend pod nulou!!!(Short) ");
               gi_100 = TRUE;
               gi_96 = FALSE;
            }
         }
      }
   }
   return (0);
}







Kr_Trend_D
Trend D


int gi_76 = 21;
extern int CountBars = 3000;
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];
int gi_96;
int g_count_100;
int gi_104;
bool gi_108;
int g_ind_counted_112;
datetime g_time_116;
datetime g_time_120;
datetime g_time_124;
double gd_128;
double gd_136;
double gd_144;
double gd_152;


double gd_368;
double gd_376;
double gd_384;
double gd_392;
double gd_400;
double gd_408;
double gd_416;

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(0, g_ibuf_84);
   SetIndexBuffer(1, g_ibuf_88);
   SetIndexBuffer(2, g_ibuf_92);
   IndicatorShortName("Krátkodobý trend/H");
   SetIndexDrawBegin(0, Bars - CountBars);
   SetIndexDrawBegin(1, Bars - CountBars);
   SetIndexDrawBegin(2, Bars - CountBars);
   IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS));
   if (gi_76 - 1 >= 5) gi_104 = gi_76 - 1;
   else gi_104 = 5;
   gd_408 = 3 / (gi_76 + 2.0);
   gd_416 = 1.0 - gd_408;
   return (0);
}


   }
   g_ind_counted_112 = IndicatorCounted();
   if (g_ind_counted_112 < 0) return (-1);
   if (g_ind_counted_112 > gi_76) gi_96 = Bars - g_ind_counted_112 - 1;
   else gi_96 = Bars - gi_76 - 1;
   g_time_124 = Time[gi_96 + 1];
   if (g_time_124 != g_time_116 && gi_96 < Bars - gi_76 - 1) {
      if (g_time_124 == g_time_120) {
         gd_312 = gd_208;
         gd_320 = gd_216;
         gd_328 = gd_224;
         gd_336 = gd_232;


         gd_384 = gd_280;
         gd_392 = gd_288;
         gd_400 = gd_296;
      } else return (-1);
   }
   if (gi_76 - 1 >= 5) gi_104 = gi_76 - 1;
   else gi_104 = 5;
   gd_408 = 3 / (gi_76 + 2.0);
   gd_416 = 1.0 - gd_408;
   while (gi_96 >= 0) {
      if (g_count_100 == 0) {
         g_count_100 = 1;
         gi_108 = FALSE;
      } else {
         if (g_count_100 >= gi_104) g_count_100 = gi_104 + 1;
         else g_count_100++;
         gd_136 = Close[gi_96] - (Close[gi_96 + 1]);
         gd_192 = MathAbs(gd_136);
         gd_312 = gd_416 * gd_312 + gd_408 * gd_136;
         gd_320 = gd_408 * gd_312 + gd_416 * gd_320;
         gd_176 = 1.5 * gd_312 - gd_320 / 2.0;
         gd_328 = gd_416 * gd_328 + gd_408 * gd_176;
         gd_336 = gd_408 * gd_328 + gd_416 * gd_336;
         gd_144 = 1.5 * gd_328 - gd_336 / 2.0;
         gd_344 = gd_416 * gd_344 + gd_408 * gd_144;
         gd_352 = gd_408 * gd_344 + gd_416 * gd_352;
         gd_152 = 1.5 * gd_344 - gd_352 / 2.0;
         gd_360 = gd_416 * gd_360 + gd_408 * gd_192;
         gd_368 = gd_408 * gd_360 + gd_416 * gd_368;
         gd_160 = 1.5 * gd_360 - gd_368 / 2.0;
         gd_376 = gd_416 * gd_376 + gd_408 * gd_160;
         gd_384 = gd_408 * gd_376 + gd_416 * gd_384;
         gd_184 = 1.5 * gd_376 - gd_384 / 2.0;
         gd_392 = gd_416 * gd_392 + gd_408 * gd_184;
         gd_400 = gd_408 * gd_392 + gd_416 * gd_400;
         gd_168 = 1.5 * gd_392 - gd_400 / 2.0;
         if (g_count_100 <= gi_104 && gd_136 != 0.0) gi_108 = TRUE;
         if (g_count_100 == gi_104 && gi_108 == FALSE) g_count_100 = 0;
      }
      if (g_count_100 > gi_104 && gd_168 > 0.0000000001) {
         gd_128 = 50.0 * (gd_152 / gd_168 + 1.0);
         if (gd_128 > 100.0) gd_128 = 100.0;
         if (gd_128 < 0.0) gd_128 = 0.0;
      } else gd_128 = 50.0;
      gd_304 = gd_128 / 50.0 - 1.0;
      if (gi_96 == 1) {
         g_time_120 = Time[1];
         g_time_116 = Time[0];
         gd_208 = gd_312;
         gd_216 = gd_320;
         gd_224 = gd_328;
         gd_232 = gd_336;

         gd_272 = gd_376;
         gd_280 = gd_384;
         gd_288 = gd_392;
         gd_296 = gd_400;
      }
      gd_200 = gd_304 - (g_ibuf_84[gi_96 + 1]) - (g_ibuf_88[gi_96 + 1]) - (g_ibuf_92[gi_96 + 1]);
      g_ibuf_84[gi_96] = 0.0;
      g_ibuf_88[gi_96] = 0.0;
      g_ibuf_92[gi_96] = 0.0;
      if (gd_200 > 0.0) g_ibuf_84[gi_96] = gd_304;
      else {
         if (gd_200 < 0.0) g_ibuf_88[gi_96] = gd_304;
         else g_ibuf_92[gi_96] = gd_304;
      }
      gi_96--;





Kr_Trend_H


int gi_76 = 13;
extern int CountBars = 3000;
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];
int gi_96;
int g_count_100;
int gi_104;
bool gi_108;
int g_ind_counted_112;
datetime g_time_116;
datetime g_time_120;
datetime g_time_124;
double gd_128;
double gd_136;
double gd_144;
double gd_152;
double gd_160;
double gd_168;
double gd_176;


double gd_328;
double gd_336;
double gd_344;
double gd_352;
double gd_360;
double gd_368;
double gd_376;
double gd_384;
double gd_392;
double gd_400;
double gd_408;
double gd_416;

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexBuffer(0, g_ibuf_84);
   SetIndexBuffer(1, g_ibuf_88);
   SetIndexBuffer(2, g_ibuf_92);
   IndicatorShortName("Krátkodobý trend/H");
   SetIndexDrawBegin(0, Bars - CountBars);
   SetIndexDrawBegin(1, Bars - CountBars);
   SetIndexDrawBegin(2, Bars - CountBars);
   IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS));
   if (gi_76 - 1 >= 5) gi_104 = gi_76 - 1;
   else gi_104 = 5;
   gd_408 = 3 / (gi_76 + 2.0);
   gd_416 = 1.0 - gd_408;
   return (0);
}



   }
   g_ind_counted_112 = IndicatorCounted();
   if (g_ind_counted_112 < 0) return (-1);
   if (g_ind_counted_112 > gi_76) gi_96 = Bars - g_ind_counted_112 - 1;
   else gi_96 = Bars - gi_76 - 1;
   g_time_124 = Time[gi_96 + 1];
   if (g_time_124 != g_time_116 && gi_96 < Bars - gi_76 - 1) {
      if (g_time_124 == g_time_120) {
         gd_312 = gd_208;
         gd_320 = gd_216;
         gd_328 = gd_224;
         gd_336 = gd_232;
         gd_344 = gd_240;
         gd_352 = gd_248;
         gd_360 = gd_256;
         gd_368 = gd_264;
         gd_376 = gd_272;
         gd_384 = gd_280;
         gd_392 = gd_288;
         gd_400 = gd_296;
      } else return (-1);
   }
   if (gi_76 - 1 >= 5) gi_104 = gi_76 - 1;
   else gi_104 = 5;
   gd_408 = 3 / (gi_76 + 2.0);
   gd_416 = 1.0 - gd_408;
   while (gi_96 >= 0) {
      if (g_count_100 == 0) {
         g_count_100 = 1;
         gi_108 = FALSE;
      } else {
         if (g_count_100 >= gi_104) g_count_100 = gi_104 + 1;
         else g_count_100++;
         gd_136 = Close[gi_96] - (Close[gi_96 + 1]);
         gd_192 = MathAbs(gd_136);
         gd_312 = gd_416 * gd_312 + gd_408 * gd_136;
         gd_320 = gd_408 * gd_312 + gd_416 * gd_320;
         gd_176 = 1.5 * gd_312 - gd_320 / 2.0;
         gd_328 = gd_416 * gd_328 + gd_408 * gd_176;
         gd_336 = gd_408 * gd_328 + gd_416 * gd_336;
         gd_144 = 1.5 * gd_328 - gd_336 / 2.0;
         gd_344 = gd_416 * gd_344 + gd_408 * gd_144;
         gd_352 = gd_408 * gd_344 + gd_416 * gd_352;
         gd_152 = 1.5 * gd_344 - gd_352 / 2.0;
         gd_360 = gd_416 * gd_360 + gd_408 * gd_192;
         gd_368 = gd_408 * gd_360 + gd_416 * gd_368;
         gd_160 = 1.5 * gd_360 - gd_368 / 2.0;
         gd_376 = gd_416 * gd_376 + gd_408 * gd_160;
         gd_384 = gd_408 * gd_376 + gd_416 * gd_384;
         gd_184 = 1.5 * gd_376 - gd_384 / 2.0;
         gd_392 = gd_416 * gd_392 + gd_408 * gd_184;
         gd_400 = gd_408 * gd_392 + gd_416 * gd_400;
         gd_168 = 1.5 * gd_392 - gd_400 / 2.0;
         if (g_count_100 <= gi_104 && gd_136 != 0.0) gi_108 = TRUE;
         if (g_count_100 == gi_104 && gi_108 == FALSE) g_count_100 = 0;
      }
      if (g_count_100 > gi_104 && gd_168 > 0.0000000001) {
         gd_128 = 50.0 * (gd_152 / gd_168 + 1.0);
         if (gd_128 > 100.0) gd_128 = 100.0;
         if (gd_128 < 0.0) gd_128 = 0.0;
      } else gd_128 = 50.0;
      gd_304 = gd_128 / 50.0 - 1.0;
      if (gi_96 == 1) {
         g_time_120 = Time[1];
         g_time_116 = Time[0];
         gd_208 = gd_312;
         gd_216 = gd_320;
         gd_224 = gd_328;
         gd_232 = gd_336;
         gd_240 = gd_344;
         gd_248 = gd_352;
         gd_256 = gd_360;
         gd_264 = gd_368;
         gd_272 = gd_376;
         gd_280 = gd_384;
         gd_288 = gd_392;
         gd_296 = gd_400;
      }
      gd_200 = gd_304 - (g_ibuf_84[gi_96 + 1]) - (g_ibuf_88[gi_96 + 1]) - (g_ibuf_92[gi_96 + 1]);
      g_ibuf_84[gi_96] = 0.0;
      g_ibuf_88[gi_96] = 0.0;
      g_ibuf_92[gi_96] = 0.0;
      if (gd_200 > 0.0) g_ibuf_84[gi_96] = gd_304;
      else {
         if (gd_200 < 0.0) g_ibuf_88[gi_96] = gd_304;
         else g_ibuf_92[gi_96] = gd_304;
      }
      gi_96--;
   }
   return (0);
}




_Trend


extern int SpreadThreshold = 6;
extern bool D_ADX = TRUE;

int init() {
   IndicatorShortName("Trend (" + Symbol() + ")");
   return (0);
}

int deinit() {
   ObjectsDeleteAll(0, OBJ_LABEL);
   ObjectDelete("Trend-1");
   ObjectDelete("Trend-2");
   ObjectDelete("Trend-3");
   ObjectDelete("Trend-4");
   ObjectDelete("Trend-5");
   ObjectDelete("Trend-6");
   ObjectDelete("Trend-7");
   ObjectDelete("Trend-8");
   ObjectDelete("Trend-9");
   ObjectDelete("Trend-10");
   ObjectDelete("Trend-11");
   ObjectDelete("Trend-12");
   ObjectDelete("Trend-2a");
   ObjectDelete("Trend-4a");
   ObjectDelete("Trend-6a");
   ObjectDelete("Trend-8a");
   ObjectDelete("Trend-10a");
   ObjectDelete("Trend-12a");
   return (0);
}

int start() {
   color l_color_0;
   color l_color_4;
   color l_color_8;
   color l_color_12;
   color l_color_16;
   color l_color_20;
   string l_text_24;
   string l_text_32;
   string l_text_40;
   string l_text_48;
   string ls_unused_56;
   string l_text_64;


   }
   double l_iadx_84 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_92 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_100 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_108 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_116 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_124 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_132 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_140 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_148 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_156 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_164 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_172 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_180 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_188 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_196 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_204 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_212 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_220 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   if (l_iadx_84 < 23.0 && l_iadx_84 != 0.0) l_color_0 = LightSkyBlue;
   if (l_iadx_84 >= 23.0 && l_iadx_92 > l_iadx_100) l_color_0 = Lime;
   if (l_iadx_84 >= 23.0 && l_iadx_92 < l_iadx_100) l_color_0 = Red;
   if (l_iadx_108 < 23.0 && l_iadx_108 != 0.0) l_color_4 = LightSkyBlue;
   if (l_iadx_108 >= 23.0 && l_iadx_116 > l_iadx_124) l_color_4 = Lime;
   if (l_iadx_108 >= 23.0 && l_iadx_116 < l_iadx_124) l_color_4 = Red;
   if (l_iadx_132 < 23.0 && l_iadx_132 != 0.0) l_color_8 = LightSkyBlue;
   if (l_iadx_132 >= 23.0 && l_iadx_140 > l_iadx_148) l_color_8 = Lime;
   if (l_iadx_132 >= 23.0 && l_iadx_140 < l_iadx_148) l_color_8 = Red;
   if (l_iadx_156 < 23.0 && l_iadx_156 != 0.0) l_color_12 = LightSkyBlue;
   if (l_iadx_156 >= 23.0 && l_iadx_164 > l_iadx_172) l_color_12 = Lime;
   if (l_iadx_156 >= 23.0 && l_iadx_164 < l_iadx_172) l_color_12 = Red;
   if (l_iadx_180 < 23.0 && l_iadx_180 != 0.0) l_color_16 = LightSkyBlue;
   if (l_iadx_180 >= 23.0 && l_iadx_188 > l_iadx_196) l_color_16 = Lime;
   if (l_iadx_180 >= 23.0 && l_iadx_188 < l_iadx_196) l_color_16 = Red;
   if (l_iadx_204 < 23.0 && l_iadx_204 != 0.0) l_color_20 = LightSkyBlue;
   if (l_iadx_204 >= 23.0 && l_iadx_212 > l_iadx_220) l_color_20 = Lime;
   if (l_iadx_204 >= 23.0 && l_iadx_212 < l_iadx_220) l_color_20 = Red;
   string l_iadx_228 = l_iadx_84;
   string l_iadx_236 = l_iadx_108;
   string l_iadx_244 = l_iadx_132;
   string l_iadx_252 = l_iadx_156;
   string l_iadx_260 = l_iadx_180;
   string l_iadx_268 = l_iadx_204;
   if (l_iadx_84 < 23.0 && l_iadx_84 != 0.0) l_text_24 = "h";
   if (l_iadx_84 >= 23.0 && l_iadx_84 < 28.0 && l_iadx_92 > l_iadx_100) l_text_24 = "ě";
   if (l_iadx_84 >= 23.0 && l_iadx_84 < 28.0 && l_iadx_92 < l_iadx_100) l_text_24 = "î";
   if (l_iadx_84 >= 28.0 && l_iadx_92 > l_iadx_100) l_text_24 = "é";
   if (l_iadx_84 >= 28.0 && l_iadx_92 < l_iadx_100) l_text_24 = "ę";
   if (l_iadx_108 < 23.0 && l_iadx_108 != 0.0) l_text_32 = "h";
   if (l_iadx_108 >= 23.0 && l_iadx_108 < 28.0 && l_iadx_116 > l_iadx_124) l_text_32 = "ě";
   if (l_iadx_108 >= 23.0 && l_iadx_108 < 28.0 && l_iadx_116 < l_iadx_124) l_text_32 = "î";
   if (l_iadx_108 >= 28.0 && l_iadx_116 > l_iadx_124) l_text_32 = "é";
   if (l_iadx_108 >= 28.0 && l_iadx_116 < l_iadx_124) l_text_32 = "ę";
   if (l_iadx_132 < 23.0 && l_iadx_132 != 0.0) l_text_40 = "h";
   if (l_iadx_132 >= 23.0 && l_iadx_132 < 28.0 && l_iadx_140 > l_iadx_148) l_text_40 = "ě";
   if (l_iadx_132 >= 23.0 && l_iadx_132 < 28.0 && l_iadx_140 < l_iadx_148) l_text_40 = "î";
   if (l_iadx_132 >= 28.0 && l_iadx_140 > l_iadx_148) l_text_40 = "é";
   if (l_iadx_132 >= 28.0 && l_iadx_140 < l_iadx_148) l_text_40 = "ę";
   if (l_iadx_156 < 23.0 && l_iadx_156 != 0.0) l_text_48 = "h";
   if (l_iadx_156 >= 23.0 && l_iadx_156 < 28.0 && l_iadx_164 > l_iadx_172) l_text_48 = "ě";
   if (l_iadx_156 >= 23.0 && l_iadx_156 < 28.0 && l_iadx_164 < l_iadx_172) l_text_48 = "î";
   if (l_iadx_156 >= 28.0 && l_iadx_172 > l_iadx_172) l_text_48 = "é";
   if (l_iadx_156 >= 28.0 && l_iadx_164 < l_iadx_172) l_text_48 = "ę";
   if (l_iadx_180 < 23.0 && l_iadx_180 != 0.0) ls_unused_56 = "h";
   if (l_iadx_180 >= 23.0 && l_iadx_180 < 28.0 && l_iadx_188 > l_iadx_196) ls_unused_56 = "ě";
   if (l_iadx_180 >= 23.0 && l_iadx_180 < 28.0 && l_iadx_188 < l_iadx_196) ls_unused_56 = "î";
   if (l_iadx_180 >= 28.0 && l_iadx_188 > l_iadx_196) ls_unused_56 = "é";
   if (l_iadx_180 >= 28.0 && l_iadx_188 < l_iadx_196) ls_unused_56 = "ę";
   if (l_iadx_204 < 23.0 && l_iadx_204 != 0.0) l_text_64 = "h";
   if (l_iadx_204 >= 23.0 && l_iadx_204 < 28.0 && l_iadx_212 > l_iadx_220) l_text_64 = "ě";
   if (l_iadx_204 >= 23.0 && l_iadx_204 < 28.0 && l_iadx_212 < l_iadx_220) l_text_64 = "î";
   if (l_iadx_204 >= 28.0 && l_iadx_212 > l_iadx_220) l_text_64 = "é";
   if (l_iadx_204 >= 28.0 && l_iadx_212 < l_iadx_220) l_text_64 = "ę";
   ObjectCreate("Trend-1", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-1", "5 min:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("Trend-1", OBJPROP_CORNER, 0);
   ObjectSet("Trend-1", OBJPROP_XDISTANCE, 185);
   ObjectSet("Trend-1", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-2", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-2", " ADX " + StringSubstr(l_iadx_228, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_0);
   ObjectSet("Trend-2", OBJPROP_CORNER, 0);
   ObjectSet("Trend-2", OBJPROP_XDISTANCE, 225);
   ObjectSet("Trend-2", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-2a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-2a", l_text_24, 9, "Wingdings", l_color_0);
   ObjectSet("Trend-2a", OBJPROP_CORNER, 0);
   ObjectSet("Trend-2a", OBJPROP_XDISTANCE, 288);
   ObjectSet("Trend-2a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-3", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-3", "15 min:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("Trend-3", OBJPROP_CORNER, 0);
   ObjectSet("Trend-3", OBJPROP_XDISTANCE, 318);
   ObjectSet("Trend-3", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-4", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-4", " ADX " + StringSubstr(l_iadx_236, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_4);
   ObjectSet("Trend-4", OBJPROP_CORNER, 0);
   ObjectSet("Trend-4", OBJPROP_XDISTANCE, 363);
   ObjectSet("Trend-4", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-4a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-4a", l_text_32, 9, "Wingdings", l_color_4);
   ObjectSet("Trend-4a", OBJPROP_CORNER, 0);
   ObjectSet("Trend-4a", OBJPROP_XDISTANCE, 426);
   ObjectSet("Trend-4a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-5", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-5", "30 min:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("Trend-5", OBJPROP_CORNER, 0);
   ObjectSet("Trend-5", OBJPROP_XDISTANCE, 453);
   ObjectSet("Trend-5", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-6", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-6", " ADX " + StringSubstr(l_iadx_244, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_8);
   ObjectSet("Trend-6", OBJPROP_CORNER, 0);
   ObjectSet("Trend-6", OBJPROP_XDISTANCE, 496);
   ObjectSet("Trend-6", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-6a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-6a", l_text_40, 9, "Wingdings", l_color_8);
   ObjectSet("Trend-6a", OBJPROP_CORNER, 0);
   ObjectSet("Trend-6a", OBJPROP_XDISTANCE, 557);
   ObjectSet("Trend-6a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-7", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-7", "1 H:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("Trend-7", OBJPROP_CORNER, 0);
   ObjectSet("Trend-7", OBJPROP_XDISTANCE, 580);
   ObjectSet("Trend-7", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-8", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-8", " ADX " + StringSubstr(l_iadx_252, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_12);
   ObjectSet("Trend-8", OBJPROP_CORNER, 0);
   ObjectSet("Trend-8", OBJPROP_XDISTANCE, 610);
   ObjectSet("Trend-8", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-8a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-8a", l_text_48, 9, "Wingdings", l_color_12);
   ObjectSet("Trend-8a", OBJPROP_CORNER, 0);
   ObjectSet("Trend-8a", OBJPROP_XDISTANCE, 672);
   ObjectSet("Trend-8a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-9", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-9", "4 H:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("Trend-9", OBJPROP_CORNER, 0);
   ObjectSet("Trend-9", OBJPROP_XDISTANCE, 702);
   ObjectSet("Trend-9", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-10", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-10", " ADX " + StringSubstr(l_iadx_260, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_16);
   ObjectSet("Trend-10", OBJPROP_CORNER, 0);
   ObjectSet("Trend-10", OBJPROP_XDISTANCE, 732);
   ObjectSet("Trend-10", OBJPROP_YDISTANCE, 2);
   ObjectCreate("Trend-10a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
   ObjectSetText("Trend-10a", l_text_64, 9, "Wingdings", l_color_20);
   ObjectSet("Trend-10a", OBJPROP_CORNER, 0);
   ObjectSet("Trend-10a", OBJPROP_XDISTANCE, 793);
   ObjectSet("Trend-10a", OBJPROP_YDISTANCE, 2);
   if (D_ADX == TRUE) {
      ObjectCreate("Trend-11", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
      ObjectSetText("Trend-11", "Denní:", 9, "Lucida Sans Regular", LightSteelBlue);
      ObjectSet("Trend-11", OBJPROP_CORNER, 0);
      ObjectSet("Trend-11", OBJPROP_XDISTANCE, 823);
      ObjectSet("Trend-11", OBJPROP_YDISTANCE, 2);
      ObjectCreate("Trend-12", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
      ObjectSetText("Trend-12", " ADX " + StringSubstr(l_iadx_268, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_20);
      ObjectSet("Trend-12", OBJPROP_CORNER, 0);
      ObjectSet("Trend-12", OBJPROP_XDISTANCE, 863);
      ObjectSet("Trend-12", OBJPROP_YDISTANCE, 2);
      ObjectCreate("Trend-12a", OBJ_LABEL, WindowFind("Trend (" + Symbol() + ")"), 0, 0);
      ObjectSetText("Trend-12a", l_text_64, 9, "Wingdings", l_color_20);
      ObjectSet("Trend-12a", OBJPROP_CORNER, 0);
      ObjectSet("Trend-12a", OBJPROP_XDISTANCE, 923);
      ObjectSet("Trend-12a", OBJPROP_YDISTANCE, 2);
   }
   return (0);
}

čtvrtek 12. června 2008

Interview with Kiril Kartunov (Liliput)

Interview with Kiril Kartunov (Liliput)

Kiril Kartunov known to us as Liliput prefers half-automated trading. He likes to control the process. This is why Kiril does not use Trailing Stop thinking that market must not decide when a trade should be closed. Generally Kiril prefers simple Expert Advisors and does not use many indicators. He is sure that simple solutions contain more knowledge than complex ones.
Hello, Kiril. Please tell us about yourself - where you are from, your occupation.
I'm from Bulgaria and live also there now. I studied Electrical/Mechanical engineering and I have been working in the area as a freelancer since I was done with the study a year ago. Trading is my second occupation, I can tell that I do 60% percent engineering and 40% trading for living.
Were you acquainted with programming before studying MQL4?
I had programming skills before beginning to use MQL4 because I had worked as a programmer using languages like C++ and JAVA. So it was not hard for me to get into the basics of MQL4 fast and start using it to create EAs. It took me 2-3 months to develop bug free code of a simple MA Expert Advisor. It was my first one.
Can you say how many EA's you have developed?
More than 10 for a period of 6-7 months. They all were simple EAs not more than 1000 lines of code. Some of them were profitable but no one won my trust and respect. That is why I had dropped them all and they never have done live trading for me.
Could you please explain why?
No, with them not because all of them need me to intervene at some point sooner or later. So I took good parts of the EAs (parts where many calculations must be made) and transformed them into scripts. I did this because I like more half automated trading than fully automated. That is how I trade on my live accounts. It makes me feel more in control this way.
Don't you think about full automated trading?
Yes, I have a project of mine to develop the ultimate EA but I'm not there yet. The Ruler seems to be an important mile stone in this long term project. So I decided to test it in the Сhampionship and observe how it works without my intervention.
Can you describe its strategy?
Yes. Basically it tries to catch overbought/oversold points in the market and trade them. To do this it uses a volatility adjusted oscillator I had integrated into it as a part of the code. It trades the D1 chart on USDJPY using bar control technique MQL4 offers.
The strategy is a longterm one; that is why it makes much less trades then other EAs. It was also easier to analyze small amounts of data of the D1 timeframe rather than M5 for instance. This way the EA is protected from the high noise of the lower timeframes, which I consider as a white noise and fear it. 
The lotsize of the trades is calculated using a square relation from the account equity and a probability factor the EA calculates for the intended trade. So, the first trades were very important for me to get to a balance with bigger safety. This is like MathSqrt(9)=3 - calculated with the account equity it gives a number which is multiplied with the probability factor and all is normalized to the lotsize step 0.1 lot (for the contest).
So this way the MM is somehow related to the trade strategy. Another question is that with so much money on the account and max lotsize of 5 the EA trades 5lots in every trade. May be I should integrate some protection for the future. I will think about it.
Your Expert Advisor uses oscillator. Does it use any other indicators?
No. Just one volatility adjusted indicator. I try to keep simple the code and believe that there is more knowledge in simple things than in the complex ones.
It is written in the description of your Expert Advisor that it is based on Repeated Incremental Pruning to Produce Error Reduction (RIPPER). What do these rules mean?
RIPPER is an algorithm used in the Dataminig for creating decision trees. It is relative good but the main advantage is that it represents/structures data in a way a decision can be easily made. In our case buy, sell or close a position.
Some data is taken in other programs and then imported in this EA, isn't it?
Half yes. The main analysis how the EA should work is made outside MQL4 via various tools like Excel, Matlab and so on. Then the result is imported into MQL4 to use the good possibility MetaTrader 4 offers to write trading applications.
But do you think it is possible to do all this only in MetaTrader 4?
Yes, it is. But it will be difficult in the sense of big, hard work with MT4. May be with MetaTrader 5 when objects will be part of MQL, I hope.
Your Expert Advisor does not use modification of opened orders, i.e. does not trail stops or change TakeProfit levels. Why?
Yes, they are fixed. Trailing stop is a way to put oneself out of the game. Every spike, and they are a lot of them in forex, will hit the trailed stop when it is too close. To trail with much larger stops does not make sense to me either because under normal conditions a trade can be closed if needed. Why let the market decide when a trade should be closed?
So basically there exists no relation for me, trailing stop level X points to market behavior. The best thing one can make of it is optimize the stop X points which will easy result in overfitting the history curve. An intelligent EA should be able to detect such spikes and handle them accordingly
StopLoss for buy and sell trades is equal to 180 points, TakeProfit is also fixed and equal to 460 points. Have you chosen these values during optimization?
Yes. Some analysis of mine pointed me around these numbers and they appeared in the optimization approximately equal. So, I chose them because I liked the optimization results with them.
When trading according to this algorithm is it possible to get a long sequence of losing trades that will harm your account? Is there any protective mechanism for such a case?
No, there is not any panic mode. It will trade/fight to the end. Only time will show how it will end the ATC 2008. We see so many EAs in the top 10 trading excellent with small distance between them. So big fun is ahead of us and for me - many new worries because I have now what to lose. My hope dies last you know, as they say. Tests were stable for a very long period, let's say 8 years. I try not to think that this year will be the year where everything breaks apart. But who knows. Such crazy markets and two months more are important factors.
Why have you chosen USDJPY? We know, during last years it did not show trends. Is your EA designed for trading in a flat?
USDJPY was the best stable performer, at least it seemed to me. I chose it trying to select best relation between profit/PF/drawdown. This pair was responsible for making my first live account to zero so we have unfinished business. May be this also was a factor to select it. Yes, it is trained also to trade flats. The closing/opening play will occur more often when the volatility drops. For now markets are crazy and we all see drops 1000 pips a day and 600 retrace next day. So this is a trend but it happens only in 2 days.
You conducted optimization. What parameters were most important for you - drawdown, profit, mathematical expectation or anything else?
Yes the standard results were for drawdown, profit and expectation. I had included the SL/TP as I spoke before and for one parameter of the MM system and one of the trading system. So it makes 4 inputs. The first two are those that we spoke about; the next two are there to help me estimate the weights for the MM system and the switching point of the probability estimation.
Thank you for your answers, Kiril. We wish you Good luck!
Created: 2008.11.01  Author: MetaQuotes Software Corp.

http://championship.mql4.com/2008/news/440

http://championship.mql4.com/2008/users/Liliput/


#    Login    Name    Comments    Country    PF    Balance    Profit    Equity
1 600349 Liliput     225       Bulgaria    3.20   169 584.64    0.00    169 584.64
2 600486 PrizmaL 272 Israel 1.86 156 650.22 0.00 156 650.22
3 600011 abeiks 100 Latvia 2.33 155 936.98 0.00 155 936.98
4 600260 Gorez 612 Russia 3.33 137 181.88 0.00 137 181.88
5 600125 Cronex 247 Russia 1.44 90 189.54 0.00 90 189.54
6 600211 fireflies 38 Indonesia 1.60 74 464.63 0.00 74 464.63
7 600233 FXPro 33 Russia 1.20 68 726.41 0.00 68 726.41
8 600638 vam 64 Luxembourg 1.35 64 931.36 0.00 64 931.36
9 600066 arnautov 16 Russia 6.45 63 553.90 0.00 63 553.90
10 600046 amelabs 298 United States 3.59 61 922.24 0.00 61 922.24
11 600199 fadiy 20 Canada 2.82 56 277.60 0.00 56 277.60
12 600658 w4rn1ng 10 Italy 0.00 52 020.44 0.00 52 020.44
13 600185 eniksoft 215 Germany 1.13 50 539.12 0.00 50 539.12
14 600018 adb 6 Slovenia 1.38 47 508.92 0.00 47 508.92
15 600137 DCP 23 United States 1.75 45 860.73 0.00 45 860.73

http://championship.mql4.com/2008/users