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

MACDCCI - MetaTrader 5용 expert

게시자:
Vladimir Karputov
조회수:
5291
평가:
(23)
게시됨:
2017.01.26 09:29
업데이트됨:
2017.03.13 09:17
MACDCCI.mq5 (22.19 KB) 조회
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Author of the idea — Hazemauthor of the MQL5 code — barabashkakvn

Works based on two indicators: iCCI (Commodity Channel Index, CCI) and iMACD (Moving Average Convergence/Divergence, MACD). OnTradeTransaction(). 

As the CCI and MACD indicators have different scales of measurement, a conversion ratio has been introduced:

input int      macd_coefficient=10000;       // alignment of cci and macd

The values are aligned here:

void OnTick()
  {
//---
   double cci=iCCIGet(back);
   double macd=iMACDGet(MAIN_LINE,back)*macd_coefficient;
   Comment("cci: ",DoubleToString(cci,2),"\n",
           "macd: ",DoubleToString(macd,Digits()+1),"\n",
           "buyLevel: ",buyLevel);

The clear information on the obtained values is displayed here right away - for visual inspection.

Also, an interesting idea has been implemented — the EA (in the OnTradeTransaction() function) performs the summation of unprofitable and profitable trades (the "Number_of_losses" variable). If closed with a loss — "Number_of_losses" increases by "1"; if closed with profit, "Number_of_losses" decreases by "1". When opening a position, the lot is calculated as: if "Number_of_losses">"0" (this means that currently there are more positions closed with loss than with profit) increase the lot by the "increase" coefficient. If "Number_of_losses"<"0" (this means that currently there are more positions closed with profit than with loss) — the lot size is taken from the coefficient:

      if(Number_of_losses>0.0)
         ExtLot=InpLot*MathPow(2,increase);
      else
         ExtLot=InpLot;

Testing results on EURUSD,M30 from 2016.06.09 to 2016.12.04, initial deposit - 3000:

MACDCCI tester 

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

ZeroLagEA-AIP v0.0.4 ZeroLagEA-AIP v0.0.4

Trading based on the ZeroLag MACD custom indicator.

FT BillWillams Trader FT BillWillams Trader

The Expert Advisor based on the iAlligator (Alligator), iMA (Moving Average) indicators.

RideAlligator RideAlligator

Trading based on two indicators: iAlligator (Alligator).

DayPositionsCount DayPositionsCount

The function returns the number of positions opened by an Expert Advisor for the day.