Range candles in OsEngine.

Range candles in OsEngine.

Range candles, or range bars, are one of the methods of representing market data on charts, different from traditional Japanese candles or bars. Unlike time-based candles, which are formed based on a time interval, range candles are formed based on price movement. In this article, we will take a detailed look at what they represent, their history, ways of application in trading, the process of setting them up on a spot account when connecting to an exchange. We will also discuss where to find the source code for building this type of candles and the basic principles of their calculation.

 

1. History of the emergence of Range candles.

Range candles were first proposed by American trader V. Schönau (Vincent Schönau) in the late 1990s. His idea was to eliminate market "noise" from charts, which often hinders trading decisions. V. Schönau believed that fixing a price increase or decrease gives a clearer representation of market directions and trends than traditional time charts.

 

2. Calculation of Range candles.

The formation of a range candle is based on a fixed price range. When the price drops below or goes above the established range, a new candle is formed. Let's give an example for understanding.

Suppose you set a range of 10 points for a Range candle:

1. If prices rise by 10 points from the candle opening, a new candle is formed. Green.

2. Similarly, if prices drop by 10 points from the candle opening, a new candle is formed. Red.

Thus, the formula for forming a new Range candle is simple - a new candle appears when market prices move a fixed amount of points up or down from the previous candle. This eliminates periods of low volatility and allows focusing only on significant price changes.

 

3. How to trade with Range candles.

Range candles can be used in various trading strategies.

Like Renko candles, these candles are ideal for trading trend-following algorithms. With or without other indicators.

By focusing only on the movement, they allow analyzing the chart:

 

4. How to enable Range candles in OsEngine.

Open the main menu in OsEngine and go to "Bot Station Light".

Connect to the connector:

Then create a trading robot, in this case, it will be Bollinger Revers.

Now go to the menu to connect the data stream to the robot:

Choose any instrument from the list:

1. Choose a connection.

2. Choose a stock.

3. Choose the Range candle type.

4. Choose the movement size type for closing the candle. Options include percentages or absolute values.

5. Set the movement size to close the candle.

After the settings, you will see a chart with "Range candles":

 

5. Where to find the source code for building Range candles in OsEngine.

The code for Range candles is available on the GitHub platform.

By downloading the OsEngine project to your PC, you can find the source code for Range candles here:

Successful algorithms!

OsEngine Support.