Questions tagged [lightweight-charts]

Lightweight Charts is a JavaScript library created by TradingView for displaying financial charts.

Lightweight Charts is a JavaScript library created by TradingView for displaying financial charts.

126 questions
2
votes
1 answer

how to make same chart with lightweight chart with javascript

I am use https://github.com/tradingview/lightweight-charts javascript package. As you can see in the picture, orders are shown in green boxes on the bitmex exchange. I want to learn how I can do this in my own table. I could not find a similar…
2
votes
1 answer

How to give a single line serie multiple colors with Tradingview Lightweight charts in Javascript?

This image below is what I have at this moment. This image below is what I want. (1st image from my code, second from tradingview). To be clear: I want a single line to have multiple colors. For my situation I need only two colors. I need each new…
Allart
  • 830
  • 11
  • 33
1
vote
1 answer

i want to update crosshair lightweight-chart data with new data on scroll

iam using subscribeVisibleLogicalRangeChange() function to listen to the chart range and successfully request new data , but after setting new data the chart is rendered and return to start point , i want to request and set new data without return…
Omar mero
  • 11
  • 1
1
vote
1 answer

How to remove non market hrs/time on trading view lightweight-chart?

I'm new to lightweight-chart and have data that 5 minutes apart on each row. Now I need to remove the non market hours - See below. Any option to remove this? Screenshot Current chart option const chart = createChart(chartContainerRef.current, { …
1
vote
1 answer

Draw price line onClick event

I am using lightweight-charts. I looked over the documentation bellow and the library documentation and I don't seem to find onClick or similar events for the charts. Am I missing something? I am trying to add line to my chart at a crosshair…
Dawit
  • 591
  • 8
  • 24
1
vote
2 answers

How to draw line in lightweight-charts or embed code with js code?

I need draw line, text, shape and... in chart with javascript code but I can't find anyway for this I find all setting in for chenge backcolor in website (https://www.tradingview.com) but I can't find draw shape in chart this image is example: this…
1
vote
1 answer

Detect if Crosshair is present/visible - TradingView Lightweight Charts

Is there a way to detect whether the crosshair is currently visible/shown on the chart? I see these options that set crosshair settings, but no boolean/API to detect whether the crosshair is currently shown. Any ideas? Should I simply detect using…
willbeing
  • 393
  • 2
  • 14
1
vote
1 answer

How to set custom width between vertical grids in Lightweight Chart

I want to set a width between vertical grid or time interval, in my case I wish to set it to 15 seconds per grid on lightweight chart. I have gone through the documentation thoroughly and tried manipulating between barSpacing, minBarSpacing with //…
1
vote
1 answer

TradingView - Lightweight charts - Realtime histogram ( volume indicator)

I managed to get the real time example to work: https://jsfiddle.net/TradingView/yozeu6k1/ I tried to get a real time histogram underneath, as the usual volume indicator and the behavior is random. A snapshot of the chart: enter image description…
1
vote
2 answers

Can't get Lightweight-charts to display via javascript file

I can't get lightweight-charts to display when I'm using my javascript file. I see some folks put the JS code into their .html files but I would like my code inside my .js file. I must be missing something or have coded something incorrectly. Thank…
user1292275
  • 47
  • 1
  • 5
1
vote
2 answers

How to get lightweight-charts to draw session breaks

I'm able to use lightweight-charts to display price and volume just fine. When the data is for multiple days, I want the chart to also show session break vertical lines (like it does in TradingView app). I looked through the Chart Options and API…
Curious101
  • 1,538
  • 2
  • 18
  • 36
1
vote
1 answer

How can i draw a straight vertical line on tradingview chart library

I'm using the Tradingview LightWeight Chart library, I would like to draw a vertical line just like the one in the image below, how do I go about it? I've tried setting the chart to show only one date and activate the grid but I also don't know how…
Paul Caleb
  • 177
  • 1
  • 4
  • 12
1
vote
1 answer

How to focus visibilty to specific time set in lightweight charts?

As the subject goes: How to focus visibilty to specific time set in lightweight charts? Im running this script to do backtesting and its a true pain to find certain markers (im on the 1 minute so i have 1000+ rows of price rows) I know the time of…
Viking
  • 465
  • 3
  • 15
1
vote
1 answer

Python and Bridge for JS

Im starting a new project for personal porpuse! Im working personally in finance, I decided to create personal chart viewing software to suit my needs. I thought I'd create a good part of the backend in Python as it is a language I know quite well.…
1
vote
1 answer

Lightweight chart (js) price scale issue

I'm using Lightweight charts js - https://github.com/tradingview/lightweight-charts I am loading coins on my website and trying to switch between coins but running into issue when altering the price scale of the current chart. Wihtout touching the…
1
2
3
8 9