trendy-tech / yii2-tradingview-widget
TradingView Charting Library wrapper for Yii2
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-29 06:02:30 UTC
README
TradingView Charting Library wrapper for Yii2.
Installation
Before install, you need to get access to the private repository "https://github.com/tradingview/charting_library": https://tradingview.com/HTML5-stock-forex-bitcoin-charting-library/
git clone https://github.com/tradingview/charting_library.git vendor/tradingview/charting_library/
composer require trendy-tech/yii2-tradingview-widget dev-master
Usage
use TrendyTech\TradingView;
use yii\web\JsExpression;
echo TradingView::widget([
'options' => [
//'debug' => true, // uncomment this line to see Library errors and warnings in the console
'fullscreen' => true,
'symbol' => 'AAPL',
'interval' => 'D',
'datafeed' => new JsExpression('new Datafeeds.UDFCompatibleDatafeed("https://demo_feed.tradingview.com")'),
'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']]],
'disabled_features' => ['use_localstorage_for_settings'],
'enabled_features' => ['study_templates'],
'charts_storage_url' => 'http://saveload.tradingview.com',
'charts_storage_api_version' => '1.1',
'client_id' => 'tradingview.com',
'user_id' => 'public_user_id'
]
]);