So I am working on this trading view chart in which the data is coming from API and the attributes are Open, Close, Low, High, Volume, Time. The candles are being plotted on this data now I want to add bonus and dividend mark on each candle just like you can see in the image below.
I have the dividend and the bonus data in my database. I want to display on my chart.
The code below is initializing the chart on the data from the API.
function initOnReady() {
var widget = window.tvWidget = new TradingView.widget({
debug: true, // uncomment this line to see Library errors and warnings in the console
fullscreen: true,
symbol: '<?php echo $stock_symbol; ?>',
interval: '1D',
container_id: "tv_chart_container",
timezone:"Asia/Ashkhabad",
has_intraday: 'true',
supports_marks: true,
supports_timescale_marks: true,
supports_group_request: false,
resolutions: ['1', '5', '15', '30', '60', '240', 'D', 'W', 'M', '6M', '12M'],
datafeed: new Datafeeds.UDFCompatibleDatafeed(api),
library_path: "charting_library/",
locale: getParameterByName('lang') || "en",
disabled_features: ["use_localstorage_for_settings"],
enabled_features: ["study_templates"],
charts_storage_url: "*" ,
charts_storage_api_version: "1.1",
client_id: '*',
user_id: '<?php echo $session_user_id; ?>',
theme: getParameterByName('theme'),
});
};