March 09, 2019

Hunter on the channel breakout BuyStop

Script - hunting for the channel breakout

This script is designed for semi-automated trading. It is able to place the required number Of BuyStop pending orders with the specified StopLoss and TakeProfit levels at a time.

The script calculates the channel width based on the ZigZag indicator and sets the grid of pending BuyStop orders according to the specified settings. The first pending order BuyStop is placed at a specified distance from the channel boundaries. This distance is specified in the parameters as a percentage of the calculated channel width. The channel width is calculated by the specified number of vertices of the ZigZag indicator. For each order, StopLoss and TakeProfit levels are set at once (set in the parameters). The next order is placed at the TakeProfit level of the previous pair of orders.


The script distinguishes between two-three and five-four-digit quotes. In the parameters, the values are specified in points (this is the second or fourth decimal place).

Use:

Drag the script name from the Navigator panel to the chart and specify the necessary parameters in the appeared settings window.

Don't forget to check if trading is allowed - there should be a check mark in the second tab. Otherwise, orders will not be issued!

Configurable parameter:

  • The size of the bet - is the rate size according to each warrant of a grid in lots
  • The TakeProfit level - is the profit size for each warrant of a grid in points
  • The StopLoss level - is the stop size for each warrant of a grid in points
  • The number of bets in the series - is the number of warrants in a series
  • The indentation from the channel to of % - is a space of the first couple of postponed warrants from border of the channel percentage of width of the channel
  • Number of calculation points zigzag - is quantity of reference points of a zigzag for creation of the channel
  • Depth - the setting of the zigzag indicator - indicator parameter Depth zigzag (see below)
  • Deviation - the setting of the zigzag indicator - indicator parameter Deviation zigzag (see below)
  • Backstep - the setting of the zigzag indicator - indicator parameter Backstep zigzag (see below)
  • To create the signal line Up - the alarm Up line - the horizontal line with the corresponding name used for visual control of the calculated border of the channel on the indicator a zigzag (true - to create, there is no false-)
  • Slippage - is slipping (parameter for drawing of warrants)
  • Arrow color orders BuyStop(Blue) - color of an arrow of the warrant BuyStop - by default without arrows

To a word: Depth is the minimum number of bars on which there will be no second maximum / minimum Deviation of pips less/more, than previous. Backstep is the minimum quantity of bars between maxima/minima.

The alarm Up line can be used by the expert utility Signal on breakdown of the channel for the notification of the trader about crossing of the calculated border of the channel.

It makes sense to expose the shift (space) of the first postponed warrant on Fibonacci's levels - 23.6, 38.2, 50.0, 61.8.

Comment:

The script outputs the following comment in the left top corner of the active schedule:
  • name of a script and its key parameters
  • the calculated width of the channel
  • the calculated shift of the first warrant

Alternative use:

The script can be used instead of the adviser of News Hunter Bot OneTime for manual drawing of warrants before a news, or directly at the time of release at publication of results and expectation of growth of quotation.

Similar development:

To set a grid of pending orders SellStop use the script Hunter on the channel breakout SellStop.

To set the grid of pending orders BuyStop and SellStop use the script Hunter on the channel breakout BuyStop SellStop.




Trading Platform: MetaTrader 4
Category: Scripts

No comments: