Hunter on the channel breakout Bot
Hunter on the channel breakout Bot
The Expert Advisor places the necessary amount of BuyStop and SellStop pending orders with predefined StopLoss and TakeProfit levels at the specified time daily.
The EA calculates the channel width using the ZigZag indicator and sets a grid of BuyStop and SellStop pending orders according to the specified settings. The first pair of BuyStop and SellStop pending orders is placed at a predetermined distance from the channel borders. The distance is set in the percentage of the calculated channel width. The channel width is calculated by the specified amount of the ZigZag peaks. StopLoss and TakeProfit levels are set for each order (specified in the parameters). The next pair of orders is set at the TakeProfit level of the previous one.
Pending order placing time is set in the EA parameters. The time of non-activated pending order removal is also specified in the parameters.
The EA distinguishes between 2-3 and 4-5-digit quotes. Parameters' values are set in points (the second or the fourth decimal place).
The EA works on any symbol and timeframe (TF).
You can set a special number to distinguish the EA's orders from orders of other tools. You can attach the EA to different charts with same instrument but different parameters. In this case, you should set different numbers for each chart. You do not have to change a number if charts have different instruments. There won't be any confusion.
- Size of the bet, lots - bet size of each grid order in lots
- TakeProfit level, pips - profit for each grid order in points
- StopLoss level, pips - stop level for each grid order in points
- Number of bets in the series - number of orders in each series (1 is a single pair of orders - one BuyStop and one SellStop)
- Indentation from the channel to % - indentation of the first pair of pending orders from the channel border in percentage of the channel width
- Time of placing trades - pending order placement time (hour:min) - server time
- Time of removal deals - pending order removal time (hour:min) - server time
- Waiting time of the orders, min - order send waiting time in minutes
- To send the expiry date - send pending order expiration time to the server (set to False in case of error 147)
- Number of calculation points zigzag - number of the ZigZag reference points for plotting the channel
- Slippage - slippage (parameter for placing orders)
- Room Advisor - EA's magic number
- Depth - the setting of the zigzag indicator - Depth ZigZag indicator parameter (see below)
- Deviation - the setting of the zigzag indicator - Deviation ZigZag indicator parameter (see below)
- Backstep - the setting of the zigzag indicator - Backstep ZigZag indicator parameter (see below)
- Arrow color orders BuyStop(Blue) - BuyStop order arrow color (no arrows by default)
- Arrow color orders SellStop(Red) - SellStop order arrow color (no arrows by default)
Depth is a minimum amount of bars that will not have the second maximum/minimum less/more by Deviation pips than the previous one. Backstep is a minimum number of bars between maximums/minimums.
It is reasonable to set the indentation of the first pair of pending orders by Fibonacci levels - 23.6, 38.2, 50.0, 61.8.
The EA shows the following data in the upper left corner of the active chart:
- the EA name and its basic parameters
- calculated channel width
- calculated indentation of the first pair of orders
The EA can be used instead of the Hunter on the channel breakout BuyStop SellStop script for the automated setting of an order grid.
Figures indicate an example of the EA setting and its testing in the strategy tester. The last six months are used for the test. The parameters are set with no selection and optimization: Parameters Lots=0.1; TakeProfit=48; StopLoss=48; QuantityLots=10; PriceSpanPercent=32; TimeStart="01:00"; TimeEnd="23:30"; UseExpiration=true; ZigzagCount=3.