AIS2 Trading Robot


 : 20005
  : 2009.03.25


 




1. 
2. 
3. 
4. 
5. 
 1
 2
 3


1. 

1.1. AIS2 Trading Robot   MQL4    MetaTrader 4.
1.2.  :
     1.2.1.  ;
     1.2.2.   ;
     1.2.3.     ;
     1.2.4.  .
1.3.   AIS2 Trading Robot     :
     1.3.1.         AIS2 Trading Robot;
     1.3.2.     ,     ;
     1.3.3.      ,     .
1.4. AIS2 Trading Robot  AIS1 Trading Robot       .
1.5. AIS2 Trading Robot         .


2. 

2.1. AIS2 Trading Robot :
     2.1.1. "AIS2TR.MQ4" -   MQL4 ;
     2.1.2. "AIS2TR.EX4" -  .
2.2.   "AIS2TR.MQ4".
2.3.    MetaTrader 4,   "%MT4%".
2.4.     MetaTrader 4    "C:/Program Files/MetaTrader 4".
2.5.   "AIS2TR.MQ4"   "%MT4%/experts".
2.6.   MetaTrader 4,   "MetaTrader".
2.7.  <F4>   MetaEditor.
2.8.  MetaEditor  <Ctrl-O>    "".
2.9.   "AIS2TR.MQ4"   "%MT4%/experts".
2.10.    7  .
2.11.    8  .
2.12.  <F5>   .
2.13.  <F4>    MetaTrader.
2.14.  MetaTrader  <Ctrl-O>    "".
2.15.   ""  "":
      2.15.1.   " "="+";
      2.15.2. "    "   ;
      2.15.3. "    "   ;
      2.15.4.   "  "="+";
      2.15.5.    " ";
      2.15.6.     .
2.16.   [OK]  "".
2.17.  <Ctrl-N>    "".
2.18.    ""  "".
2.19.   "".
2.20.  "AIS2TR".
2.21. "AIS2TR" -      "AIS2TR.EX4".
2.22.   "AIS2TR"   "EURUSD".
2.23.   "AIS2TR"   ""  " ".
2.24.   ""  "AIS2TR":
      2.24.1.   "":
              2.24.1.1.  ""="Long & Short",
              2.24.1.1.     ;
      2.24.2.   " ":
              2.24.2.1.   "  "="+",
              2.24.2.2.    " ";
      2.24.3.   ""    .
2.25.   " "  "AIS2TR":
      2.25.1. ,    "aes.Symbol"    ;
      2.25.2.    .
2.26.   [OK]  "AIS2TR".
2.27.         "AIS2TR".
2.28. AIS2 Trading Robot .
2.29.  .


3. 

3.1.  <F3>    " ".
3.2.    14	  :
     3.2.1. "AIS20005.Setup.1.1.AccountReserve"    ;
     3.2.2. "AIS20005.Setup.1.2.OrderReserve"     ;
     3.2.3. "AIS20005.Setup.2.1.Trading"     :
             3.2.3.1.  "1"   ,
             3.2.3.2.  "0"   ;
     3.2.4. "AIS20005.Setup.2.2.Timeframe.1"     "Timeframe.1";
     3.2.5. "AIS20005.Setup.2.3.Timeframe.2"     "Timeframe.2";
     3.2.6. "AIS20005.Setup.2.4.TakeFactor"     "TakeFactor";
     3.2.7. "AIS20005.Setup.2.5.StopFactor"     "StopFactor;
     3.2.8. "AIS20005.Setup.2.6.TrailFactor"     "TrailFactor";
     3.2.9. "AIS20005.Setup.3.1.Monitor"     ;
             3.2.7.1.  "1"   ,
             3.2.7.2.  "0"   ;
     3.2.10. "AIS20005.Setup.3.2.FontSize"     ;
     3.2.11. "AIS20005.Setup.3.3.FontColor"     ;
     3.2.12. "AIS20005.Setup.3.4.LineSpace"     ;
     3.2.13. "AIS20005.Setup.3.5.PositionX"      ;
     3.2.14. "AIS20005.Setup.3.6.PositionY"      .


4. 

4.1.  :
     4.1.1.         ;
     4.1.2.       " "  "AIS2TR";
     4.1.3. AIS2 Trading Robot     ;
     4.1.4.        AIS2 Trading Robot;
     4.1.5.          .
4.2.   :
     4.2.1.         ;
     4.2.2.           :
            4.2.2.1. "aed.AccountReserve" -   ,  36  "AIS2TR.MQ4";
            4.2.2.1. "aed.OrderReserve"   -    ,  37  "AIS2TR.MQ4";
     4.2.3.       :
            4.2.3.1.   " "  "AIS2TR"    AIS2 Trading Robot,
            4.2.3.2.       <F7>   ,
            4.2.3.3.      " "  ;
     4.2.4.  "aed.AccountReserve"       ;
     4.2.5.  "aed.AccountReserve"     "Relative drawdon";
     4.2.6.         ;
     4.2.7.  "aed.OrderReserve"      ,    ;
     4.2.8.  "aed.OrderReserve"       ;
     4.2.9.          ;
     4.2.10.             1;
     4.2.11.    :
             4.2.11.1.   20%,
             4.2.11.2.    4%.
4.3.    :
     4.3.1.     5 :
            4.3.1.1. "ai.Timeframe.1" -   ,
            4.3.1.1. "ai.Timeframe.2" -   ,
            4.3.1.1. "aed.TakeFactor"  -     TakeProfit,
            4.3.1.1. "aed.StopFactor"  -     StopLoss,
            4.3.1.1. "aed.TrailFactor" -     -;
     4.3.2.       :
            4.3.2.1.   " "  "AIS2TR"    AIS2 Trading Robot,
            4.3.2.2.       <F7>   ,
            4.3.2.3.      " "  ;
     4.3.3.  "ai.Timeframe.1"  "ai.Timeframe.2"    :
            4.3.3.1. 1,
            4.3.3.2. 5,
            4.3.3.3. 15,
            4.3.3.4. 30,
            4.3.3.5. 60,
            4.3.3.6. 240,
            4.3.3.7. 1440,
            4.3.3.8. 10080,
            4.3.3.9. 43200;
     4.3.4.       2;
     4.3.5.         3.
4.4.  :
     4.4.1.       AIS2 Trading Robot;
     4.4.2.      :
            4.4.2.1.     AIS2 Trading Robot;
            4.4.2.2.   AIS2 Trading Robot    ;
            4.4.2.3. 6  :
                     4.4.2.3.1.  "Client-Server",
                     4.4.2.3.2.  "Balance",
                     4.4.2.3.3.  "Open Position",
                     4.4.2.3.4.  "Leverage/Contract";
                     4.4.2.3.5.  "Trading Strategy Rules",
                     4.4.2.3.6.  "Trading Strategy Preset",
     4.4.3.   "Client-Server":
            4.4.3.1. "Client Time":
                     4.4.3.1.1.   AIS2 Trading Robot,
                     4.4.3.1.2.   AIS2 Trading Robot   ,
                     4.4.3.1.3.         "Buy+Sell=Total",
                     4.4.3.1.4.  -   ;
            4.4.3.2. "Client Name" -   ;
            4.4.3.3. "Server Name" -  ,    ;
            4.4.3.4. "Server Time":
                     4.4.3.4.1.  ,
                     4.4.3.4.2.     ,
                     4.4.3.4.3.     AIS2 Trading Robot,
                     4.4.3.4.4.    ,
                     4.4.3.4.5.   ;
     4.4.4.   "Balance":
            4.4.4.1. "Capital":
                     4.4.4.1.1.     ,
                     4.4.4.1.2.          ,
                     4.4.4.1.3.         ,
                     4.4.4.1.4.         ;
            4.4.4.2. "Reserve" -   :
                     4.4.4.2.1.   ,
                     4.4.4.2.2.       ;
            4.4.4.3. "Peak Equity" -     :
                     4.4.4.3.1.   ,
                     4.4.4.3.2.  100%,
                     4.4.4.3.3.          ;
            4.4.4.4. "Drawdown" -           :
                     4.4.4.4.1.   ,
                     4.4.4.4.2.        ;
            4.4.4.5. "Account Equity" -      :
                     4.4.4.5.1.   ,
                     4.4.4.5.2.        ,
                     4.4.4.5.3.           ,
                     4.4.4.5.4.           ;
            4.4.4.6. "Free margin" -     :
                     4.4.4.6.1.      ,
                     4.4.4.6.2.   ,
                     4.4.4.6.3.  "Stop Out"   ,
                     4.4.4.6.4.  "Stop Out"   ;
     4.4.5.   "Open Position":
            4.4.5.1. "Order" -    :
                     4.4.5.1.1.    "magic number",
                     4.4.5.1.2.  ,
                     4.4.5.1.3.  ,
                     4.4.5.1.4.    ,
                     4.4.5.1.5.   ,
                     4.4.5.1.6.    ,
                     4.4.5.1.7	   ;
            4.4.5.2. "Profit":
                     4.4.5.2.1.    /,
                     4.4.5.2.2.     ;
            4.4.5.3. "Target" -       TakeProfit   /;
            4.4.5.4. "VAR"    -       StopLoss   /;
            4.4.5.5. "Limit"  -     :
                     4.4.5.5.1.   ,
                     4.4.5.5.2.        ;
     4.4.6.  a "Leverage/Contract":
            4.4.6.1.   "Leverage":
                     4.4.6.1.1.   ,
                     4.4.6.1.2.       1 ,
                     4.4.6.1.3.    ,
                     4.4.6.1.4.        1 ;
            4.4.6.2.   "Contract":
                     4.4.6.2.1.   ,
                     4.4.6.2.2.     ,
                     4.4.6.2.3.     ,
                     4.4.6.2.4.     ;
     4.4.7.   "Trading Strategy Rules", .  2:
            4.4.7.1.  "Buy":
                     4.4.7.1.1.  "Ask",
                     4.4.7.1.2.  "ald.High.1 + avd.QuoteSpread",
                     4.4.7.1.3.  "ald.Close.1 + avd.QuoteSpread",
                     4.4.7.1.4.  "ald.Average.1 + avd.QuoteSpread";
            4.4.7.2.  "Sell":
                     4.4.7.2.1.  "Bid",
                     4.4.7.2.2.  "ald.Low.1",
                     4.4.7.2.3.  "ald.Close.1,
                     4.4.7.2.4.  "ald.Average.1";
     4.4.8.  a "Trading Strategy Preset":
            4.4.8.1.    :
                     4.4.8.1.1.     "Index.1",
                     4.4.8.1.2.    ,
                     4.4.8.1.3.   "aed.TakeFactor",
                     4.4.8.1.4.   "aed.StopFactor",
                     4.4.8.1.5.  "ald.High.1 - ald.Low.1",
                     4.4.8.1.6.    TakeProfit,
                     4.4.8.1.7.    StopLoss;
            4.4.8.2.    :
                     4.4.8.2.1.     "Index.2",
                     4.4.8.2.2.    ,
                     4.4.8.2.3.   "aed.TrailFactor",
                     4.4.8.2.4.    -   ,
                     4.4.8.2.5.  "ald.High.2 - ald.Low.2",
                     4.4.8.2.6.    -,
                     4.4.8.2.7.    -  .


5. 

5.1.  ,      AIS2 Trading Robot.
5.2.      http://codebase.mql4.com/5421.




 1.    

1. .    1, 2.   ,  -,   .
2. . .  1.
3. . : 1)   ; 2)    .
4. . .
5. .
        5.1.        .
   5.2.      $100000.
   5.3.        20%.
   5.4. ,    $80000,   $20000.
   5.5.    .
   5.6.     $110000.
   5.7.     $88000,   $22000.
   5.8.     $105000.
   5.9.     $88000,   $17000.
   5.10.     $200000.
   5.11.     $160000,   $40000.
   5.12.     .
   5.13.    $180000    $160000,   $20000.
   5.14.    $170000    $160000,   $10000.
   5.15.    $160000    $160000,   ,  .
   5.16.         .
   5.17.       .
   5.18.       $170000,     $170000.
   5.19.  ,        .
   5.20.      .
6. . .
7. .
   7.1.        .
   7.2.          .
   7.3.       10%      20%.
   7.4.   1     2   .
   7.5.   ,    1      4   .
   7.6.        5%      20%.
   7.7.   1     4   .
   7.8.   ,    1      1   .
   7.9.         , ,     .
   7.10.          192-216.
8. . .     20%     4%.
9. .         1      $50000.
10. .  *******,  *******,  *******,  $100000,     .
11. . -  ,  - 1234.




 2.  

1.   AIS2 Trading Robot    :
   1.1.      ;
   1.2.        "-".
2.         14 :
   2.1.   - 10 :
        2.1.1. "ald.QuoteAsk"    -    Ask;
        2.1.2. "ald.QuoteBid"    -    Bid;
        2.1.3. "avd.QuoteSpread" -  ;
        2.1.4. "ald.Low.1"       -  Low     1  "Timeframe.1";
        2.1.5. "ald.High.1"      -  High    1  "Timeframe.1";
        2.1.6. "ald.Close.1"     -  Close   1  "Timeframe.1";
        2.1.7. "ald.Average.1"   -     1  "Timeframe.1";
        2.1.8. "ald.Range.1"     -      1  "Timeframe.1";
        2.1.9. "ald.QuoteTake"   -        TakeProfit;
        2.1.10. "ald.QuoteStop"  -        StopLoss;
   2.2.   - 4 :
        2.2.1. "ali.Command"   -   ;
        2.2.2. "ald.Price"     -  ;
        2.2.3. "ald.Stop"      -   StopLoss;
        2.2.4. "ald.Take"      -   TakeProfit.
3.  :
   3.1.   "ald.Close.1"            "ald.Average.1";
   3.2.    "ald.QuoteAsk"    "ald.High.1 + avd.QuoteSpread";
   3.3.          .
4.  :
   4.1.   "ald.Close.1"            "ald.Average.1";
   4.2.    "ald.QuoteBid"    "ald.Low.1";
   4.3.          .
5.   -  11 :
   5.1.   - 10 :
        5.1.1. "OrderType       ()" -   ;
        5.1.2. "OrderProfit     ()" -    ;
        5.1.3. "OrderTakeProfit ()" -    TakeProfit  ;
        5.1.4. "OrderStopLoss   ()" -    StopLoss    ;
        5.1.5. "ald.QuoteAsk"       -   ;
        5.1.6. "ald.QuoteBid"       -   ;
        5.1.7. "ald.QuoteStops"     -     -;
        5.1.8. "ald.Range.2"        -     1  "Timeframe.2";
        5.1.9. "ald.QuoteTrail"     -         StopLoss;
        5.1.10. "ald.TrailStep"     -    -;
   5.2.   - 1 :
        5.2.1. "ald.Stop"           -    StopLoss.
6.   -:
   6.1.    Buy  -  420-430  "AIS2TR.MQ4";
   6.2.    Sell -  432-442  "AIS2TR.MQ4".
7.    -:
   7.1.  "avd.Range.2"      1   "Timeframe.2";
   7.2.  "avd.QuoteTrail"    "avd.QuoteTrail = avd.Range.2 * aed.TrailFactor";
   7.3.       "avd.QuoteTrail".
8.          "ald.Stop".




 3.    

1.     c    "Timeframe.1"  "Timeframe.2" .
2.             :
   2.1. "aed.TakeFactor"  -     TakeProfit;
   2.2. "aed.StopFactor"  -     StopLoss;
   2.3. "aed.TrailFactor" -     -.
3.  ""          .
4.        .
5.    :
   5.1.     "Expert Properties/Testing"  "Initial deposit = 100000 USD";
   5.2.        36  "AIS2TR.MQ4" "aed.AccountReserve = 0.99 ;";
   5.3.  -    49  "aed.TrailFactor = 0.0 ;";
   5.4.  ;
   5.5.      "aed.TakeFactor"  "aed.StopFactor";
   5.6.   "aed.TakeFactor"  "aed.StopFactor"  ;
   5.7.  ;
   5.8.     "aed.TrailFactor";
   5.9.   "aed.TrailFactor"  ;
   5.10.    36    "double aed.AccountReserve = 0.20 ;";
   5.11.  .
6.  ,          " "  .
7.    .
