Watch how to download trading robots for free
Find us on Telegram!
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_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Views:
2363
Rating:
(8)
Published:
2018.08.23 13:04
\MQL5\Include\ \MQL5\Indicators\
Ang_Zad_C.mq5 (18.43 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

A trading system using the Ang_Zad_C trend-following indicator with the possibility to set a strict trading time interval and change the volume of a forthcoming trade depending on the results of the previous trades.

A trade decision is made when the indicator cloud changes its color.

It is possible to specify trading time in input parameters to trade in the specified time interval:

input bool TimeTrade=true; //Permission to trade by time interval
input HOURS StartH=ENUM_HOUR_0; //Trading start (hours)
input MINUTS StartM=ENUM_MINUT_0; //Trading start (minutes)
input HOURS EndH=ENUM_HOUR_23; //Trading end (hours)
input MINUTS EndM=ENUM_MINUT_59; //Trading end (minutes)

Two variables for hours and minutes are provided for each of trading start and trading end times.

Default settings enable the Expert Advisor to trade the whole trading session from 0:00, while all positions are closed at 23:59.

If the start time in the EA's settings is later than the specified trading end time, the EA will close the opened positions at the specified time next day.

The block of input EA variables is added for managing volumes of opened positions:

input uint    BuyLossMMTriger=2;  //number of loss-making Buy trades to decrease MM
input uint    SellLossMMTriger=2; //number of loss-making Sell trades to decrease MM
input double  Small_MM=0.01;      //Share of financial resources from the deposit used in a trade in case of losses
input double  MM=0.1;             //Share of financial resources from the deposit used in a trade in case of normal trading
input MarginMode MMMode=LOT;      //lot size calculation method

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.

This Expert Advisor requires the compiled indicator file Ang_Zad.ex5 in order to run. Place it in <terminal_data_folder>\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 deals on the chart. Trading only in the time intervals set in the inputs is disabled.

Fig. 1. Examples of deals on the chart. Trading only in the time intervals set in the inputs is disabled

Testing results for 2017 at EURUSD H12:

Fig. 2. Testing results chart

Fig. 2. Test results chart

Fig. 3. Examples of deals on the chart. Trading only in the time intervals set in the inputs is enabled.

Fig. 3. Examples of deals on the chart. Trading only in the time intervals set in the inputs is enabled

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

Differential_Average_By_Sultonov Differential_Average_By_Sultonov

Smoothed differential indicator by Sultonov.

Doji_Arrows Doji_Arrows

The indicator finds Doji candlesticks and highlights them on the chart.

Return Strategy Return Strategy

Working with pending Buy Limit and Sell Limit orders. Grid of pending orders.

Gann_Multi_Trend Gann_Multi_Trend

Gann_Multi_Trend indicator defines a short, middle and long-term trends.