Make screenshot button icon look like on tradingview.com #819 Volume labels on Y axis are scaled wrong #809 custom_css_url option in chart widget constructor #806 Load doesn't work when symbol is different from ticker #805 Drawings are placed incorrectly when changing resolution #797 Cannot read property 'supported_resolutions' of null #793 widget.setVisibleRange call does not work #789 Events onLoad and onSave (load/save api) #787 snapshot_url on v1.4 unstable #777 Allow disable undo for position and order lines #771 Option to disable Undo for API created drawings #760 Down button doesn't work when multiple indicators are shown #759 Symbol not loaded after repeated setSymbol/load #757 Number Format support in chart #747 Bar countdown not working #743 Change style of custom Indicators #725 Cannot update positionLine text too quickly #717 Execution shape is not displayed #685 Chart is throwing an error: No real bars known, cannot extrapolate anything #674 DataFeed object not released after widget removal #666 Timescale marks in the future are shifted with overnight symbols #663 Incorrect ToolTip on Show/Hide Left Toolbar panel <Minor one> #648 Volume Indicator - Moving Average to be made configurable #635 Chart Events for UI actions #605 Cannot return back to previous symbol after loading the saved chart #604 ATR indicator result differs from metastock result #586 Uncaught RangeError: Maximum call stack size exceededProperty @ tv-chart.html #570 Do not trim text in menus #560 Review widget API #520 Content popup by marks can't disappear automatic #517 Execution shape is not visible until first symbol/interval change #462 Sub-minute resolution #387 Improvement/Solution: postMessageWrapper() does not work after iframe refresh #237 Time label not update #209 Convert png icons to svgs #32
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: 'AA',
|
|
interval: 'D',
|
|
container_id: "tv_chart_container",
|
|
// BEWARE: no trailing slash is expected in feed URL
|
|
datafeed: new Datafeeds.UDFCompatibleDatafeed("http://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> |