거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
9211
평가:
(33)
게시됨:
업데이트됨:
MT45.mq4 (5.44 KB) 조회
MT45.mq5 (5.44 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Trading Strategy

After a losing trade, the МТ45 EA opens the next trade with a higher lot.

The first deal is always a Buy operation, after that positions alternate, i.e. buying-selling-buying.

The EA opens positions at the candlestick opening.

After a Stop Loss, the EA increases the lot by KL coefficient until it reaches the maximum value of ML. Then the lot is reset to the initial one, LТ.

EURUSD, the Н1 timeframe. The EA is optimized at an interval of 11.01.2014-09.09.2017


Expert Advisor Settings

input int    Stop = 600;  // Stop Loss
input int    Take = 700;  // Take Profit
input int    Slip = 100;  // Slippage
input int    MN   = 123;  // Magic
input double LT   = 0.01; // Lot
input double KL   = 2;    // Lot increase ratio
input double ML   = 10;   // Maximum lot


Features

The cross-platform mode is implemented using preprocessor directives. An example of the Martingale function:

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double Lot()
  {
   double lot=LT;
//---  MQL4
#ifdef __MQL4__
   if(OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
     {
      if(OrderProfit()>0) lot=LT;
      if(OrderProfit()<0) lot=OrderLots()*KL;
     }
#endif

//---  MQL5
#ifdef __MQL5__
   if(HistorySelect(0,TimeCurrent()))
     {
      double profit=HistoryDealGetDouble(HistoryDealGetTicket(HistoryDealsTotal()-1),DEAL_PROFIT);
      double LastLot=HHistoryDealGetDouble(HistoryDealGetTicket(HistoryDealsTotal()-1),DEAL_VOLUME);
      if(profit>0) lot=LT;
      if(profit<0) lot=LastLot*KL;
     }
#endif

   if(lot>ML)lot=LT;
   return(lot);
  }


Backtests

The МetaТrader 4 terminal:

The МetaТrader 5 terminal:


Tips

  • It is recommended to use this EA only as a basis for your own strategy.

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/19102

Anubis Anubis

The Expert Advisor trades using the signals of the following indicators: iStdDev (two indicators), iMACD, iCCI, iATR. Moving positions to breakeven.

OpenTime OpenTime

Opening and closing positions at a specified time.

Multi Time Frame Trader Multi Time Frame Trader

The Expert Advisor trades based on the i-Regr indicator signals.

SubWindow SubWindow

A library for working with chart subwindows.