-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtickertape.py
98 lines (93 loc) · 3.66 KB
/
tickertape.py
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
def tickertape_company_profile(st, components, exchange, symbol):
st.write("### Company Profile")
components.html(
"""
<div class="tradingview-widget-container">
<div class="tradingview-widget-container__widget"></div>
<div class="tradingview-widget-copyright">
<a href="https://in.tradingview.com/symbols/$$exchange$$-$$symbol$$/" rel="noopener" target="_blank">
<!-- <span class="blue-text">$$symbol$$ Profile</span></a> Powered by TradingView -->
</div>
<script type="text/javascript"
src="https://s3.tradingview.com/external-embedding/embed-widget-symbol-profile.js" async>
{
"symbol": "$$exchange$$:$$symbol$$",
"width": "100%",
"height": 300,
"colorTheme": "dark",
"isTransparent": false,
"locale": "in"
}
</script>
</div>
""".replace(
"$$symbol$$", symbol
).replace(
"$$exchange$$", exchange
),
height=300,
scrolling=True,
)
def tickertape_technical_analysis(st, components, exchange, symbol):
st.write("### Technical Analysis")
components.html(
"""
<div class="tradingview-widget-container">
<div class="tradingview-widget-container__widget"></div>
<div class="tradingview-widget-copyright">
<a href="https://in.tradingview.com/symbols/$$exchange$$-$$symbol$$/technicals/"
rel="noopener" target="_blank">
</div>
<script type="text/javascript"
src="https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js" async>
{
"interval": "1m",
"width": "100%",
"isTransparent": false,
"height": 500,
"symbol": "$$exchange$$:$$symbol$$",
"showIntervalTabs": true,
"locale": "in",
"colorTheme": "dark"
}
</script>
</div>
""".replace(
"$$symbol$$", symbol
).replace(
"$$exchange$$", exchange
),
height=450,
scrolling=True,
)
def tickertape_fundamental_data(st, components, exchange, symbol):
st.write("### Fundamental Data")
components.html(
"""
<div class="tradingview-widget-container">
<div class="tradingview-widget-container__widget"></div>
<div class="tradingview-widget-copyright">
<a href="https://in.tradingview.com/symbols/$$exchange$$-$$symbol$$/financials-overview/" rel="noopener" target="_blank">
</div>
<script type="text/javascript"
src="https://s3.tradingview.com/external-embedding/embed-widget-financials.js" async>
{
"symbol": "$$exchange$$:$$symbol$$",
"colorTheme": "dark",
"isTransparent": false,
"largeChartUrl": "",
"displayMode": "regular",
"width": "100%",
"height": 450,
"locale": "in"
}
</script>
</div>
""".replace(
"$$symbol$$", symbol
).replace(
"$$exchange$$", exchange
),
height=450,
scrolling=True,
)