I'm trying to override the default configuration on the Advanced Real-Time Chart TradingView Widget.
I added a simple moving average on which I managed to set the period (from default 9 to 200).
I would like to change the color, but I didn't find any documentation on how to achieve that?
Question 1 : Is there any documentation on how to customize the widget?
Question 2 : Is it possible / how to change the indicators colors?
Here is a snippet of what I'm trying to achieve:
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_f7f00"></div>
<div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/NASDAQ-AAPL/" rel="noopener" target="_blank"><span class="blue-text">AAPL Chart</span></a> by TradingView</div>
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
new TradingView.widget(
{
"width": 980,
"height": 610,
"symbol": "NASDAQ:AAPL",
"interval": "D",
"timezone": "Etc/UTC",
"theme": "light",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
// ==================== BEGIN ====================
"studies": [
{
id: "MASimple@tv-basicstudies",
// This sets the period
inputs: {
length: 200,
},
// This doesn't work...
styles: {
color: '#ff0000',
}
},
],
// ==================== END ====================
"container_id": "tradingview_f7f00"
}
);
</script>
</div>
<!-- TradingView Widget END -->
