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

Three independent trading systems using XWAMI indicators within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system. Trading signals are formed at the bar close, provided that the trend has changed (which is indicated by a change in the color of any of the three indicators).

The blocks of the Expert Advisor inputs have been added for managing volumes of opened positions. For example, for the first system:

input uint    A_BuyTotalMMTriger=5; //A number of the last Buy deals to calculate stop loss
input uint    A_BuyLossMMTriger=3;  //A number of losing Buy deals to reduce MM
input uint    A_SellTotalMMTriger=5;//A number of the last Sell deals to calculate stop loss
input uint    A_SellLossMMTriger=3; //A number of losing Sell deals to reduce MM
input double  A_SmallMM=0.01;       //A share of a deposit in a deal in case of loss
input double  A_MM=0.1;             //A share of a deposit in a deal during normal trading
input MarginMode A_MMMode=LOT;      //A lot setting mode

In case of such inputs and when selecting from the last five trades, three of which are loss-making in a single direction, the EA opens the next trade in the same direction having the volume of 0.01 lot. If there are less than three loss-making trades out of the last five ones, the position volume is 0.1.

The similar inputs are available for the second trading system:

input uint    B_BuyTotalMMTriger=5; //B number of the last Buy deals to calculate stop loss
input uint    B_BuyLossMMTriger=3;  //B number of losing Buy deals to reduce MM
input uint    B_SellTotalMMTriger=5;//B number of the last Sell deals to calculate stop loss
input uint    B_SellLossMMTriger=3; //B number of losing Sell deals to reduce MM
input double  B_SmallMM=0.01;       //B share of a deposit in a deal in case of loss
input double  B_MM=0.1;             //B share of a deposit in a deal during normal trading

The C_ prefix is used in the inputs for the third system.

The most optimal option for setting up such an EA is configuring it on each trading system separately disabling other two applying the appropriate switches in the form of the following parameters:

input bool    B_BuyPosOpen=true;    //B permission to enter long positions
input bool    B_SellPosOpen=true;   //B permission to enter short positions

by setting them to false.

For the generated EA to operate correctly, the compiled XWAMI.ex5 indicator file should be available under the <terminal_data_directory>\MQL5\Indicators folder.

Default Expert Advisor's input parameters with stops have been used during tests shown below.

Fig. 1. Example trades on the chart

Fig. 1. Example trades on the chart

Test results for GBPJPY H1, H4 and H8 over the year 2016.

Fig. 2. Test results chart

Fig. 2. Test results chart

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

SilverTrend_HTF SilverTrend_HTF

The SilverTrend indicator with the ability to change the indicator timeframe using the input parameters.

BrainTrend2_V2_HTF BrainTrend2_V2_HTF

The BrainTrend2_V2 indicator with the ability to change the indicator timeframe using the input parameters.

Expert Ichimoku Expert Ichimoku

An Expert Advisor based on the iIchimoku (Ichimoku Kinko Hyo) indicator.

PFE PFE

The Polarized Fractal Efficiency (PFE) indicator is designed for identifying trends.