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

Robust EA Template - MetaTrader 4용 expert

조회수:
29755
평가:
(26)
게시됨:
2015.10.02 17:28
업데이트됨:
2016.11.22 07:32
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Real author:

Inovance - https://www.inovancetech.com/

A robust EA template to help correctly set take profit and stop loss levels, enter and exit positions, and handle terminal issues, such as crashes or disconnects.

To use, input your entry conditions at the bottom of the EA in the "Long and Short Entry Conditions" section. Input your long conditions to return "1" if a long signal is generated in the "LongSignal()" function and your short conditions to return "-1" if a short signal is generated in the "ShortSignal()" function.

A single Buy or Sell order will be placed if your conditions are met and no order will be placed if both long and short conditions are met. It will exit the trade if the take profit or stop loss is hit or if there is a signal in the opposite direction, in which case it will exit the existing trade and open a new one in the appropriate direction.

External Inputs

EA Inputs

"Long and Short Entry Conditions" section with example strategy shown (note:this is an arbitrary strategy for demonstration purposes only).

//+------------------------------------------------------------------+
//| Long and Short Entry Conditions                                  |
//+------------------------------------------------------------------+
int indCCI0period = 14; // Indicator 1 period
int indRSI1period = 14; // Indicator 2 period
//+------------------------------------------------------------------+
//| Long Entry(Return "1" for long entry, "0" for no entry)          |
//+------------------------------------------------------------------+
int LongSignal()
  {
   double CCI0 = iCCI(NULL,0,indCCI0period,PRICE_CLOSE,1);
   double RSI1 = iRSI(NULL,0,indRSI1period,PRICE_CLOSE,1);
   int match=0;
   if(CCI0>-200 && CCI0<=-150) match++;
   else if(CCI0>-100 && CCI0<=-50) match++;
   if(RSI1>0 && RSI1<=25) match++;
   if(match == 2) return 1;
   return 0;
  }
//+------------------------------------------------------------------+
//| Short Entry(Return "-1" for long entry, "0" for no entry)        |
//+------------------------------------------------------------------+
int ShortSignal()
  {
   double CCI0 = iCCI(NULL,0,indCCI0period,PRICE_CLOSE,1);
   double RSI1 = iRSI(NULL,0,indRSI1period,PRICE_CLOSE,1);
   int match=0;
   if(CCI0 > 50 && CCI0 <= 150) match++;
   if(RSI1 > 80 && RSI1 <= 100) match++;
   if(match == 2) return -1;
   return 0;
  }


Recommendations:

  • Works with 4- and 5- digit brokers.
  • Always test on a demo account.
  • Example strategy shown in template (note:this is an arbitrary strategy for demonstration purposes only).
Close symbol with profit or loss Close symbol with profit or loss

Easy EA for closing positions of the symbol with profit or loss. You can use it for hidden SL too.

Basic Trailing Stop Basic Trailing Stop

An EA template to add a simple trailing stop to your strategy.

Squeeze RA V1 Squeeze RA V1

My version of Squeeze Indicator for MetaTrader 4. This indicator is based on a strategy mentioned in John Carter's book, Mastering the Trade. It is also a fully improvised version of Squeeze_Break indicator by Des O'Regan.

Instant Execution New Instant Execution New

Instant execution button to close profit orders, close all orders, auto close by trailing parameter. Last update: 21 April 2016. Prev: 8 Dec 2015