Closed jadeja-rajdeep closed 1 year ago
Here is an example for a moving average chart: https://jsfiddle.net/TradingView/537kjtfg/
What you need to do within your code is remove the first 10 items from the EMA10
data set. You should only pass the points you want to plot to the setData()
method.
For example: If you have a dataset of 20 points and you want to plot the EMA10 then you should expect the lengths of the data sets to be:
because the first 10 points of the EMA10 will be zero.
Simplest fix for your code would be something like this:
// instead of this:
// emaLineSeries.setData(ema10Data);
// do this:
emaLineSeries.setData(ema10Data.slice(10));
If you are unable to resolve your issue and still believe that there is a bug, then can you please reply with a jsFiddle (or other code sandbox) and we will reopen the issue.
thank you very much for the help and guide.
Lightweight Charts Version: 3.8
Actual behavior: currently its display long line from 0 to the first available line series value. for example if i add 10 days ema on chart its display vertical line from bottom 0 to the 10 days ema first value.
Expected behavior:
it should be not display until the first value is provided or is there any kind of option available ?
Screenshots: