-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
67 lines (55 loc) · 1.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<H1>Welcome to R2-Cryp2</H1>
<!--
Visit the <a href="https://docs.google.com/spreadsheets/d/1sUwcHvQTOSjsFBk8ec6lfU0RCD0hANBGAlQOu8MBIKE/edit#gid=1474406379">Crypto R2-Bot</a>.
<br><br>
-->
<a href="#" id="binanceLink" target="_blank">Trade <span id="ticker"></span> on Binance</a>
<H2>Trading View Indicators</H2>
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
var parseQueryString = function(url) {
var urlParams = {};
url.replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) {
urlParams[$1] = $3;
}
);
return urlParams;
}
var urlToParse = location.search;
var params = parseQueryString(urlToParse);
var pair = params.pair;
var name = params.name;
var tradingView = "Binance:" + params.name + params.pair;
var binance = params.name + "_" + params.pair
var interval = "5"
if (params.interval != undefined) interval = params.interval
var binanceURL = "https://www.binance.com/trade.html?symbol=" + binance;
document.getElementById('binanceLink').href = binanceURL;
document.getElementById("ticker").textContent=binance;
new TradingView.widget({
"width": 980,
"height": 610,
"interval": interval.toString(),
"timezone": "Etc/UTC",
"theme": "Light",
"style": "1",
"locale": "en",
"symbol": tradingView,
"toolbar_bg": "#f1f3f6",
"enable_publishing": true,
"withdateranges": true,
"allow_symbol_change": true,
"news": [
"headlines"
],
"hideideasbutton": false,
"hideideas": true,
"studies": [
"RSI@tv-basicstudies",
"MACD@tv-basicstudies"
],
"referral_id": "8610"
});
</script>