Работа завершена
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Техническое задание
I need a robot based on 2 indicators
- SMA: Simple moving average It determines the big trend to send orders
- RaitisCyFilter: It determines small trends to send orders
The robot must be tested much more on the median renko graph
Robot settings
- SMA: 50 (default value)
- Daily robot operating hours: Start time – End time (default: 08:00 – 21:00)
The robot opens orders only in this daily time slot
- Number of successive witness candles: 0 (default value)
The number of successive witness candles at the end of which the order is triggered The witness candle is the candle when it closes, directly triggers the opening of the order
- Number of orders authorized per small trend: 1 (default value)
A small downtrend starts with a sell signal from the RaitisCyFilter indicator and ends with an opposite signal from the latter
A small uptrend begins with a buy signal from the RaitisCyFilter indicator and ends with an opposite signal from the latter
A small trend can have several order signals, when the value is 1 as above, it means that the robot can only open one order on this small trend When the order is opened and closed, the robot can only open a next order only on a next small trend
- Lot size: fixed or percentage per SL
- Fixed: 0.01 (default)
- Percentage: 1% (default)
- TP: in pips
- SL: in pips
- Trailling stop: 10 pips (default), 0 = no trailing stop
- Daily target: Fixed or percentage of balance
If Fixed = 100, means when the sale of the account on the trading day has already made a profit of $100 or more, the robot stops trading until the next day; the robot every time an order is closed, calculates the daily profit, if the daily profit is equal to or greater than 100, the robot stops trading until the next day
If sell percentage = 2%, means when the account balance on the trading day has already made a profit equivalent to 2% or more of the account balance the robot stops trading until the next day, if the daily profit is equal to or greater than 2% of the account balance, the robot stops trading until the next day
- Max Spread: in PIPS. When the spread reaches this value, the robot does not open a position
Purchase order :
The Robot opens a buy order when:
- When the open signal is above the SMA
- When the opening signal is in a small uptrend (RaitisCyFilter Indicator)
If Number of consecutive witness candles = 1
- A buy open signal is identified by:
A bearish candle directly followed by a bullish candle, this last candle is the “witness candle”
If Number of consecutive candles before witness = 2
- A buy open signal is identified by:
A bearish candle directly followed by two consecutive bullish candles, the second bullish candle in this case is the “witness candle”
- The closing of the witness candle immediately triggers the opening of the order
Sell order:
The Robot opens a sell order when:
- When the open signal is below the SMA
- When the opening signal is in a small downtrend (RaitisCyFilter Indicator)
If Number of consecutive witness candles = 1
- A sell open signal is identified by:
A bullish candle directly followed by a bearish candle, this last candle is the “witness candle”
If Number of consecutive witness candles = 2
- A sell open signal is identified by:
A bullish candle directly followed by two consecutive bearish candles, the second bearish candle in this case is the “witness candle”
- The closing of the witness candle immediately triggers the opening of the order