I am using the tradingview embed with notion. On notion I have different pages for different stocks and i am embedding it there. I am then changing the embed to reflect the particular stock. However, when I am closing the page and coming back to it, it is reverting back to the default stock.
Is there a way in which I can get each embed to reflect a certain stock unless I change it?
I am hosting the code on github and then embedding the github link on notion.
The following is the code:
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_9d064"></div>
<div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/NSE-ROHLTD/" rel="noopener" target="_blank"><span class="blue-text">ROHLTD 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(
{
"autosize": true,
"symbol": "BSE:SBIN",
"interval": "D",
"timezone": "Asia/Kolkata",
"theme": "light",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
"studies": [
{
id: "MAExp@tv-basicstudies",
inputs: {
length: 10
}
},
{
id: "MAExp@tv-basicstudies",
inputs: {
length: 20
}
},
{
id: "MAExp@tv-basicstudies",
inputs: {
length: 50
}
},
{
id: "MASimple@tv-basicstudies",
inputs: {
length: 100
}
},
{
id: "MASimple@tv-basicstudies",
inputs: {
length: 200
}
}
],
"container_id": "tradingview_9d064"
}
);
</script>
</div>
<!-- TradingView Widget END -->