Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

Exp_Skyscraper_Fix_ColorAML_MMRec - expert for MetaTrader 5

Views:
2341
Rating:
(10)
Published:
2018.10.25 18:08
\MQL5\Include\ \MQL5\Indicators\
ColorAML.mq5 (15.22 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Two independent trading systems using Skyscraper_Fix and ColorAML 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 when a bar closes if a trend has changed (which is displayed by any of the two indicators changing its color).

The blocks of input EA variables are added for managing volumes of opened positions. For example, for a system applying the Skyscraper_Fix indicator:

input uint    A_BuyLossMMTriger=2;  //A number of losing Buy deals to reduce MM
input uint    A_SellLossMMTriger=2; //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

In case of such inputs and if the last two trades in one direction were loss-making, the EA opens the next trade in the same direction having the volume of 0.01 lot. If at least one of the two last trades is not loss-making, the position volume is 0.1.

The similar inputs are also available for the trading system using ColorAML:

input uint    B_BuyLossMMTriger=2;  //B number of losing Buy deals to reduce MM
input uint    B_SellLossMMTriger=2; //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

For the generated EA to operate correctly, the compiled files of the Skyscraper_Fix.ex5 and ColorAML.ex5 indicators should be present in the <terminal_data_directory>\MQL5\Indicators.

Default Expert Advisor's input parameters have been used during tests shown below. Stop Loss and Take Profit have not been used during the tests.

Fig. 1. Examples of trades on the chart

Fig. 1. Examples of trades on the chart

Test results for GBPJPY H4 over the year 2016:

Fig. 2. Test results chart

Fig. 2. Test results chart

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/22372

Skyscraper_Fix_Cld_HTF Skyscraper_Fix_Cld_HTF

Skyscraper_Fix_Cld indicator with the timeframe selection option available in input parameters

Breakout_RSI Breakout_RSI

Breakout RSI indicator

Average_True_Range_Bands Average_True_Range_Bands

Average True Range Bands indicator

AhrensMACD AhrensMACD

Ahrens MACD