Update index.html
Browse files- index.html +63 -19
index.html
CHANGED
|
@@ -1,19 +1,63 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TradingView Chart</title>
|
| 7 |
+
<style>
|
| 8 |
+
body, html {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
width: 100%;
|
| 12 |
+
height: 100%;
|
| 13 |
+
overflow: hidden;
|
| 14 |
+
}
|
| 15 |
+
#tradingview_widget_container {
|
| 16 |
+
width: 100%;
|
| 17 |
+
height: 100vh;
|
| 18 |
+
}
|
| 19 |
+
</style>
|
| 20 |
+
</head>
|
| 21 |
+
<body>
|
| 22 |
+
<div id="tradingview_widget_container"></div>
|
| 23 |
+
|
| 24 |
+
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
|
| 25 |
+
<script type="text/javascript">
|
| 26 |
+
// Parse URL parameters
|
| 27 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 28 |
+
|
| 29 |
+
// Get symbol from URL or default to BTCUSDT
|
| 30 |
+
const symbol = urlParams.get('symbol') || 'BTCUSDT';
|
| 31 |
+
|
| 32 |
+
// Get timeframe from URL or default to 1D
|
| 33 |
+
const interval = urlParams.get('interval') || '1D';
|
| 34 |
+
|
| 35 |
+
// Get exchange from URL or default to BINANCE
|
| 36 |
+
const exchange = urlParams.get('exchange') || 'BINANCE';
|
| 37 |
+
|
| 38 |
+
// Create the full symbol string
|
| 39 |
+
const fullSymbol = exchange + ":" + symbol;
|
| 40 |
+
|
| 41 |
+
// Initialize TradingView widget
|
| 42 |
+
new TradingView.widget({
|
| 43 |
+
"autosize": true,
|
| 44 |
+
"symbol": fullSymbol,
|
| 45 |
+
"interval": interval,
|
| 46 |
+
"timezone": "Etc/UTC",
|
| 47 |
+
"theme": "dark",
|
| 48 |
+
"style": "1",
|
| 49 |
+
"locale": "en",
|
| 50 |
+
"toolbar_bg": "#f1f3f6",
|
| 51 |
+
"enable_publishing": false,
|
| 52 |
+
"hide_top_toolbar": false,
|
| 53 |
+
"hide_legend": false,
|
| 54 |
+
"save_image": false,
|
| 55 |
+
"container_id": "tradingview_widget_container",
|
| 56 |
+
"studies": [
|
| 57 |
+
"RSI@tv-basicstudies",
|
| 58 |
+
"MASimple@tv-basicstudies"
|
| 59 |
+
]
|
| 60 |
+
});
|
| 61 |
+
</script>
|
| 62 |
+
</body>
|
| 63 |
+
</html>
|