/******************************************************************************/
/******* *******/
/******* *******/
/******* ﺑﺴﻢ ﷲ ﺍﻟﺮﺣﻣﻦ ﺍﻟﺮﺣﻴﻢ *******/
/******* *******/
/******* *******/
/******************************************************************************/
================================================================================
AIS TRADING ROBOT MT5
VERSION 1.4
INSTRUCTION
CONTENT
CHAPTER 1> OVERVIEW
CHAPTER 2> QUICK START
CHAPTER 3> TERMS AND CONVENTIONS
CHAPTER 4> STRATEGY CODE
CHAPTER 5> STRATEGY SETTINGS
CHAPTER 6> TRAILING
CHAPTER 7> DETECTOR OF METASTABLE LEVELS
CHAPTER 8> RISK MANAGEMENT
CHAPTER 9> SPREAD CONTROL
CHAPTER 10> MAGIC NUMBER
================================================================================
================================================================================
CHAPTER 1> OVERVIEW
<1>
The key feature is the strategy =A SYSTEM: EURUSD DAILY METRICS=
Robots with this strategy have over 100,000 downloads from mql5.com Code Base
Origin => AIS1 TRADING ROBOT www.mql5.com/en/code/8700
<2>
This robot has extended logic of the strategy
New module =Detector of Metastable Levels= significantly improves robot behavior
This version 1.3 has extended control of this new module
================================================================================
================================================================================
CHAPTER 2> QUICK START
<1> Set
=> TAKE: TIMEFRAME = M1
=> TAKE: RANGE MULTIPLIER = 0
=> TAKE: CONSTANT POINTS = 100
=> STOP: TIMEFRAME = any
=> STOP: RANGE MULTIPLIER = 0
=> STOP: CONSTANT POINTS = 100
=> TRAIL: TIMEFRAME = any
=> TRAIL: DISTANCE MULTIPLIER = 0
=> TRAIL: CONSTANT POINTS = 0
<2> Leave the other parameters as they are
<3> Run
================================================================================
================================================================================
CHAPTER 3> TERMS AND CONVENTIONS
<1> TERMS
1> ROBOT <=> CURRENT VERSION OF AIS TRADING ROBOT MT5
2> GAIN <=> PROFIT
3> RANGE <=> HIGH - LOW
4> AVERAGE <=> ( HIGH + LOW ) / 2
5> ORDER SIZE <=> ORDER VOLUME
6> BAR <=> CANDLE <=> FRAME <=> TIME FRAME
7> VARIABLE_N <=> VALUE FOR BAR NUMBER N
8> METASTABLE LEVEL <=> PRICE RANGE WITH SIGNIFICANT LIFETIME
<2> ABBREVIATIONS
1> EA <=> EXPERT ADVISOR <=> ROBOT
2> TF <=> TIME FRAME
3> TP <=> TAKE PROFIT
4> SL <=> STOP LOSS
5> MCS <=> MICROSECONDS
6> MSEC <=> MILLISECONDS
================================================================================
================================================================================
CHAPTER 4> STRATEGY CODE
<1> SIGNAL =BUY=
---------------------------------------------------------
IF ( CLOSE_1 > AVERAGE_1 ) AND ( ASK > HIGH_1 + SPREAD )
---------------------------------------------------------
<2> SIGNAL =SELL=
---------------------------------------------------------
IF ( CLOSE_1 < AVERAGE_1 ) AND ( BID < LOW_1 )
---------------------------------------------------------
================================================================================
================================================================================
CHAPTER 5> STRATEGY SETTINGS
<1> EA attempts to trade when detects signal BUY or SELL
<2> There are the following parameters
=> TAKE: TIMEFRAME
=> TAKE: RANGE MULTIPLIER
=> TAKE: CONSTANT POINTS
=> STOP: TIMEFRAME
=> STOP: RANGE MULTIPLIER
=> STOP: CONSTANT POINTS
<3> TIMEFRAME parameters define the working timeframes
to compute Ranges of Bars 1 of selected timeframes
<4> DISTANCE MULTIPLIER and CONSTANT POINTS parameters define the distances
=> TAKE_DISTANCE = TAKE_RANGE_1 * TAKE_DISTANCE_MULTIPLIER
+ TAKE_CONSTANT_POINTS
=> STOP_DISTANCE = STOP_RANGE_1 * STOP_DISTANCE_MULTIPLIER
+ STOP_CONSTANT_POINTS
<5> TP and SL computing
=> for BUY position => TAKE = ASK + TAKE_DISTANCE
STOP = BID - STOP_DISTANCE
=> for SELL position => TAKE = BID - TAKE_DISTANCE
STOP = ASK + STOP_DISTANCE
================================================================================
================================================================================
CHAPTER 6> TRAILING
<1> EA attempts to trail when Position Profit > 0
<2> There is the following pair of parameters
=> TRAIL: TIMEFRAME
=> TRAIL: DISTANCE MULTIPLIER
=> TRAIL: CONSTANT POINTS
<3> TRAIL: TIMEFRAME defines working TF
<4> Then EA computes Range of Bar 1 of selected TF
=> RANGE_TRAIL = HIGH_1 - LOW_1
<5> TRAIL: DISTANCE MULTIPLIER and TRAIL: CONSTANT POINTS
define distance for new SL price
=> DISTANCE_TRAIL = RANGE_TRAIL * TRAIL_DISTANCE_MULTIPLIER
+ TRAIL_CONSTANT_POINTS
<6> New SL price computing
=> for Buy position => NEW_STOP = BID - DISTANCE_TRAIL
=> for Sell position => NEW_STOP = ASK + DISTANCE_TRAIL
================================================================================
================================================================================
CHAPTER 7> DETECTOR OF METASTABLE LEVELS
<1> Metastable levels are price ranges with significant lifetime
To detect metastable levels robot counts bars with common price from bar 1
<2> Metastable levels of market are displayed by AIS SUPER INDICATOR
This indicator is made for AIS SUPER ROBOT <expected soon>
<3> The new module =Detector of Metastable Levels= generates 2 signals
=1= signal =ALLOW= that allows trading operations
=2= signal =FORBID= that forbids trading operations
<4> Parameters for each signal
=1= TIMEFRAME => timeframe to count common bars
=2= LEVEL BARS => limit of common bars <value 0 turns off control>
=3= CODE SIGN BUY => see Code Sign Table <value 0 turns off control>
=4= CODE SIGN SELL => see Code Sign Table <value 0 turns off control>
<5> Code Sign Table
=1= Code "1" Sign ">>" Means "Price Greater than Total High"
=2= Code "2" Sign "=>" Means "Price Between Common High and Total High"
=3= Code "3" Sign "==" Means "Price Between Common High and Common Low"
=4= Code "4" Sign "=<" Means "Price Between Common Low and Total Low"
=5= Code "5" Sign "<<" Means "Price Less than Total Low"
<6> Signals of this new module filter signals of the strategy <CHAPTERS 4 and 5>
The strategy signals BUY or SELL must comply the signals of this new module
<7> When this module is turned off then robot works with the core strategy only
================================================================================
================================================================================
CHAPTER 8> RISK MANAGEMENT
<1> "RISK: % FOR DEPOSIT" <=> RISK LIMIT FOR DEPOSIT
1> "RISK: % FOR DEPOSIT" defines maximum allowed equity drawdown
2> "RISK: % FOR DEPOSIT = 20" means that
maximum equity drawdown is 20%
and if equity falls to 80% of the maximum
then trade will stop
<2> "RISK: % FOR 1 ORDER" <=> RISK LIMIT FOR 1 ORDER
1> “RISK: % FOR 1 ORDER” defines the risk value for 1 order
2> “RISK: % FOR 1 ORDER = 1” means that
the robot will calculate the order volume so that
loss for 1 order did not exceed 1% of equity
<3> "CONSTANT LOTS" is the additional component for the order size
To trade with constant risk set CONSTANT LOTS = 0
To trade with constant lots set CONSTANT LOTS = 0.01 <for example>
================================================================================
================================================================================
CHAPTER 9> SPREAD CONTROL
<1> This version has new parameter => "MAX ALLOWED SPREAD"
<2> "MAX ALLOWED SPREAD = 9" <for example> prevents trading spread > 9 points
<3> "MAX ALLOWED SPREAD = -1" turns OFF spread control
================================================================================
================================================================================
CHAPTER 10> MAGIC NUMBER
<1> This version does not control Magic Numbers
<2> Multiple copies of robot instances per account are not yet allowed
================================================================================
================================================================================
MAIN LINK => AIS TRADING ROBOT MT5 https://www.mql5.com/en/market/product/51306
================================================================================
================================================================================
TIME STAMP 2022-02-18 22:55
================================================================================
/******************************************************************************/
/******* *******/
/******* AIS AIRAT SAFIN (C) 2022 *******/
/******* *******/
/******* WWW.MQL5.COM/EN/USERS/AIS *******/
/******* *******/
/******************************************************************************/