Iam building a website for bitcoin exchange. I want to use trading view charting library I extracted it in my workspace. I want to know how to give my own datafeed. Which format should datafeed file be in (like php,js,json) ?
var _datafeed = new Datafeeds.UDFCompatibleDatafeed("http://localhost/workspace/charting");
//var _datafeed = new Datafeeds.UDFCompatibleDatafeed("https://demo_feed.tradingview.com");
TradingView.onready(function () {
var widget = window.tvWidget = new TradingView.widget({
debug: true, // uncomment this line to see Library errors and warnings in the console
fullscreen: false,
symbol: 'A',
interval: 'D',
timezone: "America/New_York",
container_id: "tv_chart_container",
locale: getParameterByName('lang') || "en",
datafeed: _datafeed,
library_path: "charting_library/",
});
});
In above code the charts are plotted with demo link. when I change it to my path, I get 'invalid symbol' error. Where do I specify config and symbol_info and what's their file format? Iam a total newbie. Please help .
Any suggestion to move in the right way is appreciated. I am STUCK!!