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

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +16 -22
index.html CHANGED
@@ -1,15 +1,15 @@
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
  }
@@ -24,30 +24,25 @@
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,
@@ -55,17 +50,16 @@
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>
 
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
  width: 100%;
12
+ height: 100%;
13
  overflow: hidden;
14
  background: #000;
15
  }
 
24
 
25
  <script src="https://s3.tradingview.com/tv.js"></script>
26
  <script>
27
+ // You can change these defaults or pass via URL (?exchange=BINANCE&symbol=BTCUSDT&interval=1D)
28
+ const url = new URLSearchParams(location.search);
29
+ const exchange = url.get('exchange') || 'BINANCE';
30
+ const symbol = url.get('symbol') || 'BTCUSDT';
31
+ const intervalParam = (url.get('interval') || '1D').toUpperCase();
 
32
  const intervalMap = {
33
+ '1M':'1','3M':'3','5M':'5','15M':'15','30M':'30',
34
+ '1H':'60','2H':'120','4H':'240','1D':'D','D':'D','1W':'W','W':'W','1MO':'M','M':'M'
 
35
  };
36
+ const interval = intervalMap[intervalParam] || intervalParam;
 
 
37
 
38
  new TradingView.widget({
39
  autosize: true,
40
+ symbol: `${exchange}:${symbol}`,
41
  interval: interval,
42
  timezone: "Etc/UTC",
43
  theme: "dark",
44
  style: "1",
45
  locale: "en",
 
46
  enable_publishing: false,
47
  hide_top_toolbar: true,
48
  hide_legend: false,
 
50
  hide_volume: true,
51
  container_id: "tv_container",
52
 
 
53
  studies: [
54
  "PUB;p28oOtSBJQa8LJd6b1ytDsu8OUkNbzA1" // ADX
55
  ],
56
 
57
+ // Make the main price series invisible so only the ADX pane shows
 
 
58
  overrides: {
59
+ "mainSeriesProperties.visible": false,
60
+ "paneProperties.background": "#000000",
61
+ "paneProperties.vertGridProperties.color": "rgba(255,255,255,0.06)",
62
+ "paneProperties.horzGridProperties.color": "rgba(255,255,255,0.06)"
63
  }
64
  });
65
  </script>