tvjsx / trading-vue-js

💹 Hackable charting lib for traders. You can draw literally ANYTHING on top of candlestick charts. [Not Maintained]
https://tvjsx.github.io/trading-vue-demo/
MIT License
2.09k stars 638 forks source link

Example SMA DataHelper test #128

Closed adsonvinicius closed 4 years ago

adsonvinicius commented 4 years ago

On DataHelper.vue it uses a SMA for onchart property, as shown below:

Captura de Tela 2020-08-07 às 12 16 51

First: Why it was used that condition if this.chart.data is set otherwise uses data parameter.

Second: Why the first index of ohlcv is ignored (var i starts from 26 and buff's first value is 26-25 ignoring 0 index data

adsonvinicius commented 4 years ago

@C451 I understand is not related to the proper functionality of your library but it was used in your test code and I didn't understand why. Threatening this question as garbage is a little excessive, don't you think?