In this article, we will explore Heiken Ashi candles in the context of the algorithmic trading platform OsEngine. We will discuss the history of these candles, trading strategies using them, as well as the process of setting them up in Os Engine. Additionally, we will talk about where to find the source code for building this type of candles and explain the method of their creation.
1. History of Heiken Ashi candles.
"Heiken Ashi" candles, which translates from Japanese as "average bar," were first introduced by the Japanese trader Munehisa Homma in the 18th century. This trader is considered one of the pioneers in the field of price analysis using candlestick charts. The main purpose of developing Heiken Ashi was to create a visually smoothed chart that would help traders ignore market "noise" and better identify trends.
2. Calculation of this type of candles.
To understand how Heiken Ashi candles are calculated, let's look at the main elements of a standard candle: opening price, closing price, high and low prices.
1. The opening price for the current candle is taken as the average between the opening and closing prices of the previous candle.
2. The closing price is the average of the opening price, closing price, high price, and low price of the current candle.
3. The high price for the current candle is taken from the maximum value between the current high price, opening price, and closing price.
4. The low price for the current candle is taken from the minimum value between the current low price, opening price, and closing price.
3. How to trade with them. Options.
1. Trend following.
Generally, it is believed that these candles help to more clearly identify trends due to their smoothing effect. And building indicators based on the candle body may provide robots with entry points different from classical ones.
4. How to enable this type of candles in OsEngine.
Open the main menu in Os Engine and go to "Bot Station Light".
Connect to the "Alor" connector or any other one:
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:
1. Select the connection.
2. Choose the security.
3. Select the type of Heiken Ashi candles.
4. Choose the candle timeframe. They are built over a specific timeframe, like Japanese candles.
After the settings, we see a chart with "Heiken Ashi candles":
5. Where to find the source code for building Heiken Ashi candles in OsEngine.
You can find the code for Heiken Ashi open-sourced on the GitHub platform.
In the OsEngine project, when you download it, you can find the implementation of Heiken Ashi candles here:
Successful algorithms!