ADX / index.html
CORVO-AI's picture
Update index.html
b7c740d verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>ADX Fullscreen Only</title>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: #000;
}
#tv_container {
width: 100%;
height: 100vh;
}
</style>
</head>
<body>
<div id="tv_container"></div>
<script src="https://s3.tradingview.com/tv.js"></script>
<script>
// Defaults (can pass ?exchange=BINANCE&symbol=BTCUSDT&interval=1D)
const p = new URLSearchParams(location.search);
const exchange = p.get('exchange') || 'BINANCE';
const symbol = p.get('symbol') || 'BTCUSDT';
const imap = { '1M':'1','3M':'3','5M':'5','15M':'15','30M':'30','1H':'60','2H':'120','4H':'240','1D':'D','D':'D','1W':'W','W':'W','1MO':'M','M':'M' };
const interval = imap[(p.get('interval') || '1D').toUpperCase()] || (p.get('interval') || 'D');
const widget = new TradingView.widget({
autosize: true,
symbol: `${exchange}:${symbol}`,
interval: interval,
timezone: "Etc/UTC",
theme: "dark",
style: "1",
locale: "en",
hide_top_toolbar: true,
hide_legend: false,
hide_volume: true,
enable_publishing: false,
container_id: "tv_container",
// Only ADX study
studies: [
"STD;Auto%1Fib%1Retracement%1"
],
// Hide main price series and collapse its pane
overrides: {
"mainSeriesProperties.visible": false,
"paneProperties.background": "#000000",
"paneProperties.legendProperties.showStudyArguments": false,
"paneProperties.legendProperties.showStudyTitles": true,
"scalesProperties.lineColor": "rgba(255,255,255,0.2)",
"paneProperties.vertGridProperties.color": "rgba(255,255,255,0.06)",
"paneProperties.horzGridProperties.color": "rgba(255,255,255,0.06)",
// Collapse the main (price) pane to zero height
"paneProperties.separatorRelatedProperties.style": 0,
"paneProperties.topMargin": 0,
"paneProperties.bottomMargin": 0,
"mainSeriesProperties.statusViewStyle.showInterval": false,
"mainSeriesProperties.statusViewStyle.showSymbol": false
}
});
// After the widget is ready, force-collapse the main pane so only the ADX pane remains visible.
widget.onChartReady(() => {
const chart = widget.activeChart();
// Remove all drawings/indicators from main pane if any stray
// Ensure main pane height is 0 and indicator pane takes all space
try {
const panes = chart.getPanes();
// panes[0] is main price pane, panes[1] is ADX pane
if (panes.length > 1) {
chart.setPaneHeight(panes[0].id, 0); // collapse main pane
chart.setPaneHeight(panes[1].id, 1000); // give ADX all the space
}
} catch (e) {
// Silently ignore if API differs
}
});
</script>
</body>
</html>