거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

ExpertClor_v01 - MetaTrader 5용 expert

게시자:
Vladimir Karputov
조회수:
3947
평가:
(27)
게시됨:
2017.08.10 12:55
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Author of the idea — John Smithauthor of the MQL5 code — barabashkakvn.

An assistant Expert Advisor. Only CLOSING positions:

ExpertClor_v01

Positions are moved to Breakeven, Stop Loss is calculated based on the StopATR_auto indicator, positions are closed at the intersection of two MAs (Moving Averages).

In order to provide conditions for the EA operation, you should add the compiled StopATR_auto indicator file to the folder MQL5\Indicators\Downloads:

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
...
//--- create handle of the indicator iCustom
   handle_iCustom=iCustom(m_symbol.Name(),TimeFrame,"Downloads\\StopATR_auto",
                          CountBarsForAverage,
                          Target
                          );

Although this Expert Advisor only closes positions, I have added a small code part for opening positions:

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   if(MQLInfoInteger(MQL_DEBUG) || MQLInfoInteger(MQL_PROFILER) || 
      MQLInfoInteger(MQL_TESTER) || MQLInfoInteger(MQL_OPTIMIZATION))
     {
      static long counter=-50;
      static bool trade_buy=true;

      if(counter==0)
         m_trade.Buy(m_symbol.LotsMin());
      else if(counter%1500==0)
        {
         if(RefreshRates())
           {
            if(trade_buy)
              {
               OpenBuy(m_symbol.LotsMin());
               trade_buy=false;
              }
            else
              {
               OpenSell(m_symbol.LotsMin());
               trade_buy=true;
              }
           }
         else
            counter=counter-9;
        }

      counter++;
     }
//---

This unit only works when you test or optimize this Expert Advisor. Buy or Sell is opened after every 1,500 ticks.

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

StopATR_auto StopATR_auto

Automated calculation of Stop Loss levels based on the ATR indicator.

Expert_RSI_Stochastic_MA Expert_RSI_Stochastic_MA

The Expert Advisor uses three indicators: MA(150), RSI(3) with levels 80 and 20, Stochastic(6, 3, 3) with levels 70 and 30.

EURUSD breakout EURUSD breakout

The EA trades during two trading sessions, starting at the specified session beginning time. Stop Loss. Take Profit.

Trailing_Profit Trailing_Profit

Closing all open positions with the specified profit percent.