Skip to main content

Bollinger Bands

Bollinger Bands serve as a technical analysis tool that aids in determining relative high and low prices. This knowledge enables you to potentially purchase at lower rates and sell at increased values.

The indicator is made up of three lines: the center line represents a simple moving average, while the remaining two lines are placed above and below it at a specific distance. This gap is determined by standard deviation, which gauges the variation of the price from its mean value over a set timeframe. The greater the space between the upper and lower bands, the higher the price volatility.

In Gunbot, Bollinger Bands can be utilized to configure the percentage for trade triggering. You can establish the percentage from the lower Bollinger Band for buying and the percentage from the upper Bollinger Band for selling. Gunbot will automatically place orders once the prices reach the pre-defined distance from the bands.

Working with Bollinger Bands

Gunbot initiates one position, either long or short, and closes this position upon achieving the target. If a stop is reached before successfully closing a trade, Gunbot sets a stop order at a loss. After closing a position, Gunbot seeks to open a fresh long or short position. Gunbot does not augment existing open positions.

Refrain from manually increasing or decreasing positions opened by Gunbot, unless you cease running Gunbot on this trading pair until the position is closed.

Buy method conditions

A long position is permitted when the ask price falls below LOW_BB and LONG_LEVEL. In the illustration above, LOW_BB would be set to 0, signifying the actual lower Bollinger Band. By changing values, you can establish a target above (positive value) or below (negative value) the lower band.

Sell method conditions

A short position is permissible when the bid price surpasses HIGH_BB and SHORT_LEVEL. In the example above, HIGH_BB would be set to 0, representing the actual upper Bollinger Band. By modifying values, you can determine a target below (positive value) or above (negative value) the upper band.

Conditions to close

Position is closed when the preferred ROE (return on equity) is attained. This percentage is calculated from the entry point, taking leverage into account.

Conditions to stop

A position is closed at a loss when negative ROE achieves the STOP_LIMIT objective.