I'm trying to add "Advanced Real Time chart" widget from tradinview. I'm able to add indicator Exponential moving average and Simple moving average. But it takes default 9 days length. I want to change that.
I tried as below but it does not work. Could somebody please help. Thanks a lot in advance.
widget = new TradingView.widget(
{
"width": 1200,
"height": 700,
"symbol": "NSE:DRREDDY",
"interval": "D",
"timezone": "Asia/Kolkata",
"theme": "Dark",
"style": "1",
"locale": "in",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"hide_side_toolbar": false,
"allow_symbol_change": true,
"details": true,
"studies_overrides": {
"moving average exponential.length": 20
},
"studies": [
"MAExp@tv-basicstudies"
],
"container_id": "tradingview_f6d89"
}
Customize Widget Once you've selected a widget, you will need to customize it (Click 'Get Widget' on TradingView). Configure the on-screen widget options within TradingView. Once you're done click 'Apply'.
Display up to 5 simple moving average on your chart. If you want to display less than 5, you can hide as much as you want in the indicator settings. If you prefer to use exponential moving average , you can find the same indicator with EMA on my profile page.
Here's the way to do it :
"studies": [
{
"id": "MAExp@tv-basicstudies",
"version": 60,
"inputs": {
"length": 20
}
},
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With