Skip to content

Instantly share code, notes, and snippets.

@erysaj
Last active May 3, 2025 11:58
Show Gist options
  • Save erysaj/ee1b40e8b8e34ca74a0bb30ddae35009 to your computer and use it in GitHub Desktop.
Save erysaj/ee1b40e8b8e34ca74a0bb30ddae35009 to your computer and use it in GitHub Desktop.
Embed TradingView chart widget
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
height: 100%;
width: 100%;
}
</style>
<title>Chart Demo</title>
</head>
<body>
<!-- TradingView Widget BEGIN -->
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
new TradingView.widget({
"autosize": true,
"symbol": "BITSTAMP:BTCUSD",
"interval": "D",
"timezone": "Etc/UTC",
"theme": "Light",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
"hideideas": true
});
</script>
<!-- TradingView Widget END -->
</body>
</html>
@webtech2412
Copy link

How to use this with own data ?

@nickkostov
Copy link

For a few days I have been asking myself that question as well :D

@ablgmv
Copy link

ablgmv commented Mar 21, 2021

Does someone know why adding props below do not affect?

'enabled_features': [
'header_saveload',
]

@sahaveer
Copy link

Thq so much for this. integrated this code into streamlit webapp.
Is there a way to assign a variable to the "symbol" in <script>

This gives us a beautiful way to make this code dynamic based on the text input.

@Cyberghost5
Copy link

Thq so much for this. integrated this code into streamlit webapp. Is there a way to assign a variable to the "symbol" in <script>

This gives us a beautiful way to make this code dynamic based on the text input.

If you us PHP, yes, there is a way you can assign a variable to the symbol

@Arpit-tomer263
Copy link

I want to use custom build indicators in that widget how can i do that custom build Indicator means that is published on tradingview indicators list but not showing on the Api indicator list please help me

@Jhayrolandero
Copy link

can't customize panel and toolbar with this one

@Arpit-tomer263
Copy link

Nope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment