I'm attempting to give the TradingView widget my own custom parameters, and then take a screenshot or convert it to a png somehow.
Here is the tool from TradeView to customize their advanced chart widget.
I've thought about applying the same variables from the widget to the normal URL, and using puppeteer to take a screenshot.
Example. (https://www.tradingview.com/chart/?symbol=tsla&interval=60&width=400&container_id=tradingview_e6bca)
Although it doesn't seem to work the same way. Only the changing the symbol and interval works, but not changing width or container_id(to remove watchlist).
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_c04cc"></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:TSLA",
"interval": "60",
"timezone": "Etc/UTC",
"theme": "light",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"hide_side_toolbar": false,
"allow_symbol_change": true,
"container_id": "tradingview_e6bca"
}
);
</script>
</div>
<!-- TradingView Widget END -->