CORVO-AI commited on
Commit
6da6219
·
verified ·
1 Parent(s): 27f489b

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +60 -74
index.html CHANGED
@@ -1,87 +1,73 @@
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
- // Get symbol from URL or default to BTCUSDT
29
- const symbol = urlParams.get('symbol') || 'BTCUSDT';
 
30
 
31
- // Get timeframe from URL or default to 1D
32
- let interval = urlParams.get('interval') || '1D';
 
 
 
 
33
 
34
- // Improved interval conversion that handles a wider range of formats
35
- const intervalMap = {
36
- '1m': '1',
37
- '3m': '3',
38
- '5m': '5',
39
- '5min': '5',
40
- '15m': '15',
41
- '15min': '15',
42
- '30m': '30',
43
- '30min': '30',
44
- '1h': '60',
45
- '2h': '120',
46
- '4h': '240',
47
- '1d': 'D',
48
- '1D': 'D',
49
- 'D': 'D',
50
- '1W': 'W',
51
- 'W': 'W',
52
- '1M': 'M',
53
- 'M': 'M'
54
- };
55
 
56
- // Convert interval if it's in the map
57
- interval = intervalMap[interval] || interval;
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- // Get exchange from URL or default to BINANCE
60
- const exchange = urlParams.get('exchange') || 'BINANCE';
61
- // Create the full symbol string
62
- const fullSymbol = exchange + ":" + symbol;
63
 
64
- // Initialize TradingView widget
65
- new TradingView.widget({
66
- "autosize": true,
67
- "symbol": fullSymbol,
68
- "interval": interval,
69
- "timezone": "Etc/UTC",
70
- "theme": "dark",
71
- "style": "1",
72
- "locale": "en",
73
- "toolbar_bg": "#f1f3f6",
74
- "enable_publishing": false,
75
- "hide_top_toolbar": false,
76
- "hide_legend": false,
77
- "save_image": false,
78
- "hide_volume": true, // This hides the volume indicator
79
- "container_id": "tradingview_widget_container",
80
- "studies": [
81
- "PUB;ae9bc503c1604345bb8b6968d92f466c", // Ultimate RSI [OMAR]
82
- "PUB;p28oOtSBJQa8LJd6b1ytDsu8OUkNbzA1", // ADX
83
- ]
84
- });
85
- </script>
86
  </body>
87
  </html>
 
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>ADX Only</title>
7
+ <style>
8
+ html, body {
9
+ margin: 0;
10
+ padding: 0;
11
+ height: 100%;
12
+ width: 100%;
13
+ overflow: hidden;
14
+ background: #000;
15
+ }
16
+ #tv_container {
17
+ width: 100%;
18
+ height: 100vh;
19
+ }
20
+ </style>
21
  </head>
22
  <body>
23
+ <div id="tv_container"></div>
24
 
25
+ <script src="https://s3.tradingview.com/tv.js"></script>
26
+ <script>
27
+ // Optional: read symbol/interval from URL. Defaults provided.
28
+ const urlParams = new URLSearchParams(window.location.search);
29
+ const exchange = urlParams.get('exchange') || 'BINANCE';
30
+ const symbol = urlParams.get('symbol') || 'BTCUSDT';
31
+ let interval = (urlParams.get('interval') || '1D').toUpperCase();
32
 
33
+ const intervalMap = {
34
+ '1M': '1', '3M': '3', '5M': '5', '15M': '15', '30M': '30',
35
+ '1H': '60', '2H': '120', '4H': '240',
36
+ '1D': 'D', 'D': 'D', '1W': 'W', 'W': 'W', '1MO': 'M', '1MONTH': 'M', 'M': 'M'
37
+ };
38
+ interval = intervalMap[interval] || interval;
39
 
40
+ const fullSymbol = `${exchange}:${symbol}`;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
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: "#0b0f14",
51
+ enable_publishing: false,
52
+ hide_top_toolbar: true,
53
+ hide_legend: false,
54
+ save_image: false,
55
+ hide_volume: true,
56
+ container_id: "tv_container",
57
 
58
+ // Only ADX study
59
+ studies: [
60
+ "PUB;p28oOtSBJQa8LJd6b1ytDsu8OUkNbzA1" // ADX
61
+ ],
62
 
63
+ // Layout tweaks: show indicator pane prominently
64
+ // The price chart cannot be fully removed, but we minimize its presence:
65
+ studies_overrides: {},
66
+ overrides: {
67
+ "paneProperties.topMargin": 100, // pushes price chart up
68
+ "mainSeriesProperties.visible": false // hide main price candles/line
69
+ }
70
+ });
71
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </body>
73
  </html>