Cannot show empty chart with empty bar data #1424 Rebuild of bars is enabled when using timeframes #1414 Drawings are not loaded in 1.8 #1410 Ichimoku Cloud not found #1409 Trading Platform: Invoking the error callback in resolveSymbol() causes symbol search to break #1406 Unsubscribe error when using custom series #1405 Error in SymbolsStorage._requestFullSymbolsList (datafeed.js) when fetching /symbol_info #1402 Cannot create horizontal_line #1399 Add Williams Fractal indicator #1398 Loading chart problem in the new 1.8 version #1391 Reset cache when symbol is changed #1376 Objects created in one resolution are often not visible in another resolution #1336 Improvements for Gann Box and Gann Square #1335 Trading Platform improvements #1261 Scroll to the objects tree #1185 Load chart dialog doesn't fit on mobile #1147 Save chart dialog doesn't work on mobile #1146 Ichimoku Cloud - Cloud Body should be 2 colors #1140 Adding a security for compare doesn't trigger the exceeded limit dialog #1110 insertIndicator panel too big for some mobiles #881 Can't draw programatically vertical line in future #181
77 lines
2.4 KiB
HTML
77 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<title>TradingView Charting Library demo</title>
|
|
|
|
<!-- Fix for iOS Safari zooming bug -->
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
|
|
|
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.2.min.js"></script>
|
|
<script type="text/javascript" src="charting_library/charting_library.min.js"></script>
|
|
<script type="text/javascript" src="charting_library/datafeed/udf/datafeed.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
TradingView.onready(function()
|
|
{
|
|
var widget = new TradingView.widget({
|
|
fullscreen: true,
|
|
symbol: 'AAPL',
|
|
interval: 'D',
|
|
container_id: "tv_chart_container",
|
|
// BEWARE: no trailing slash is expected in feed URL
|
|
datafeed: new Datafeeds.UDFCompatibleDatafeed("https://demo_feed.tradingview.com"),
|
|
library_path: "charting_library/",
|
|
locale: "en",
|
|
// Regression Trend-related functionality is not implemented yet, so it's hidden for a while
|
|
drawings_access: { type: 'black', tools: [ { name: "Regression Trend" } ] },
|
|
enabled_features: ["chart_property_page_trading"],
|
|
disabled_features: ["use_localstorage_for_settings"],
|
|
charts_storage_url: 'http://saveload.tradingview.com',
|
|
charts_storage_api_version: "1.1",
|
|
client_id: 'tradingview.com',
|
|
user_id: 'public_user_id'
|
|
|
|
});
|
|
|
|
widget.onChartReady(function() {
|
|
var position = widget.createPositionLine()
|
|
.onReverse(function(text) {
|
|
})
|
|
.onClose(function(text) {
|
|
})
|
|
.setText("PROFIT: 71.1 (3.31%)")
|
|
.setQuantity("8.235")
|
|
.setLineLength(3);
|
|
position.setPrice(position.getPrice() - 2);
|
|
|
|
var order = widget.createOrderLine()
|
|
.onCancel(function(text) {
|
|
})
|
|
.setText("STOP: 73.5 (5,64%)")
|
|
.setLineLength(3)
|
|
.setQuantity("2");
|
|
order.setPrice(order.getPrice() - 2.5);
|
|
|
|
widget.createExecutionShape()
|
|
.setText("@1,320.75 Limit Buy 1")
|
|
.setTextColor("rgba(255,0,0,0.5)")
|
|
.setArrowSpacing(25)
|
|
.setArrowHeight(25)
|
|
.setArrowColor("#F00")
|
|
.setTime(new Date("3 Dec 2014 00:00:00 GMT+0").valueOf() / 1000)
|
|
.setPrice(15.5);
|
|
});
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body style="margin:0px;">
|
|
<div id="tv_chart_container"></div>
|
|
</body>
|
|
|
|
</html> |