Ethereum: Trading view vs Binance DMI calculation?

Here is a design article on the calculation of Ethereum directional movement indicators using the Binance DMI (directional movement display) API:

Calculation of the directional movement indicators for Ethereum

As an investor, understanding the trends and patterns of your cryptocurrency portfolio is of crucial importance. A powerful instrument in this arsenal is the Directoral Movement Indicator (DMI), which identifies the director of the price movement. In this article we will examine how the DMI is calculated with the Binance -API.

Understanding the 288 values ​​

To create a 5-minute trade view for Ethereum in Binance, you have to use 288 values: high, open, low and close. Here is a letter overview or every value:

High : The highest price level reached a duration in a bar.

* Open : The lowest price level reached a pole.

* Low : The lowest price level reached a duration in one bar.

* Close

: The highest price level reached a pole.

Calculate the BSM (a balanced regulatory signal)

Before you immerse yourself in DMI, we start with the basic moving average (BSM). With an average of 12 percent of high and low prices, the BSM can be used. Like: How:

  • Call up the high and low values ​​for each bar with the Binance -API.

  • Calculate the BSM by average the high and low prices about a period of time (e.g. 12 bar).

  • Use the BSM as a filter to select only heights, low lows and closures.

Calculation of the area

Next we calculate the average actual area (ATR) with the alligator indicators of Alpha Vantage. This will help us identify the volatility of Ethereum’s price movements.

  • Call up all 288 values ​​for each bar.

  • Calculate the average true area by taking the average of the high areas.

3 .. Use the ATR to filter out heights, low lows and closures with high real areas (i.e. high -volatility).

Calculation of the BSI (Balance signal display)

Now let us create a balance signal indicator (BSI) by calculating the ratio of high prices at low prices.

  • Call up all 288 values ​​for each bar.

  • Calculate the ratio of high prices over a period of time (e.g. 12 bars).

3 .. Use the BSI as an indicator to signal potential purchase or sales options based on highs, low lows and closures with high conditions.

Calculation of the RSI

Finally, we calculate the relative strength index (RSI) using the high and low values.

  • Call up all 288 values ​​for each bar.

  • Calculate the RSI by taking the average of the ratio of high prices at low prices by a period (e.g. 14 days).

3 .. Use the RSI as an additional indicator to signal potential purchase or sales options based on highs, low lows and closures with low conditions.

put together everything

To create your trading view, use the Binance API to access the calculated indicators for each bar:

`JavaScript

Const Axios = Require (‘Axios’);

Asynchrical function calculatedmi () {

// Call all 288 values ​​for each beam

Const apiresponse = waiting axios.get ({ethsymbol} & inval = 5m);

If (Apiresponse.Status! == 200) return;

Const data = apiresponse.data;

Const Hochvalues ​​= data.highestprecices.map ((value, index) => ({value}));

Contepvalues ​​= data.

Const lowvalues ​​= data.lowestprecices.map ((value, index) => ({value}));

Const Closevalues ​​= Data.cleseprices.map ((value, index) => ({value}));

// calculate BSM

Const bsmvalues ​​= Hohe Values.Reduce ((a, b) => a + B.Value, 0) / bsmvalues.length;

console.log (bsmvalues);

// calculate areon

Constit atrvalues ​​= Closevalues.map ((value, index) => {

if (index % 10 === 9 && value

Else IF (Index % 10!

Otherwise if (index % 10! == 9 && value

Leave a Reply

Your email address will not be published. Required fields are marked *