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

Crossing Moving Average - MetaTrader 5용 expert

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

The author of the idea: Scriptor

MQL5 code author: barabashkakvn

The EA only operates when a new bar appears. Position volume is always fixed and set in the Lots parameter. Stop Loss, Take Profit and Trailing Stop parameters can be disabled - to do this, set the appropriate value to "0.0". The last Trailing Step parameter - trailing step.

Two Moving Averages (First and Second) are used. The crossing is defined in a very simple way (this is not the most accurate method, but it is the easiest one) - by analyzing the indicators values on two adjacent bars:

//--- Buy Signal
   if(MA_First[1]>MA_Second[1]+ExtMA_MinimumDistance && MA_First[2]<MA_Second[2]-ExtMA_MinimumDistance)
...
//--- Sell signal
   if(MA_First[1]<MA_Second[1]-ExtMA_MinimumDistance && MA_First[2]>MA_Second[2]+ExtMA_MinimumDistance)
...

where:

  • MA_First[1] - First indicator value on bar #1;
  • MA_First[2] - First indicator value on bar #2;
  • MA_Second[1] - Second indicator value on bar #1;
  • MA_Second[2] - Second indicator value on bar #2;
  • ExtMA_MinimumDistance - calculated parameter of the minimum distance between the indicators (Minimum distance between MA's). This parameter can be completely disabled: to do this, set the parameter to "0.0" in the inputs.

Then each signal is checked by the filter using the Momentum indicator - the Momentum filter parameter override is checked.

Visually, this looks as follows:

Crossing Moving Average Algorithm

Test on EURUSD M15:

Crossing Moving Average

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

Rj_SlidingRangeRj_Digit_System_HTF Rj_SlidingRangeRj_Digit_System_HTF

The Rj_SlidingRangeRj_Digit_System indicator with the timeframe selection option available in the input parameters.

Rj_SlidingRangeRj_Digit_System Rj_SlidingRangeRj_Digit_System

The indicator paints candles going beyond the Rj_SlidingRangeRj_Digit channel.

Separate Trade Separate Trade

iATR (Average True Range, ATR) and iStdDev (Standard Deviation, StdDev) indicators are configured for crossing of the two iMAs (Moving Average, MA) plus for Buy and Sell separately.

IdeaTrend IdeaTrend

IdeaTrend is meant for checking a trend defining idea.