project-nv / night-vision

Highly customizable charting library, created for professional traders
https://nightvision.dev
MIT License
252 stars 58 forks source link

The indicator chart is incorrect. #116

Closed oxxxxxy closed 4 months ago

oxxxxxy commented 9 months ago

Describe the bug

image

I expect a MACD chart, but i can't see its chart draw, it has generated title thing only. One value is in its overlay dataset( chart object via console ) only.

Main overlay has klines, they are okay. I didn't forget about this thing chart.se.uploadAndExec(), nothing changes.

Did I misunderstand how the indicator script works or didn't i read docs enough? Should indicator chart be drawn completely by script or should i have to somehow calculate, collect the values and draw it by myself? :sweat_smile: :sweat_smile: :sweat_smile: For example, make predefined overlay with range and insert into it calculated values.

So... sir ples du help


{
  "panes": [
    {
      "overlays": [
        {
          "name": "dbPairId88",
          "type": "Candles",
          "main": true,
          "data": [
            [1707892200000, 0.08221, 0.08226, 0.08214, 0.0822, 600614],
            ........
            [1707534000000, 0.07945, 0.07979, 0.07941, 0.07953, 3825781]
          ],
          "settings": {},
          "props": {
            "showVolume": false
          }
        }
      ]
    },
    {
      "overlays": [],
      "scripts": [
        {
          "type": "MACD",
          "props": {},
          "settings": {}
        }
      ]
    }
  ]
}

Reproduction

https://codesandbox.io/p/devbox/3yk8x6?migrateFrom=6kfp8c&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clt68p5380006206827ojvzxh%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clt68p53800022068l49wgk86%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clt68p538000420681rvg2qjp%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clt68p53800052068pprwret0%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clt68p53800022068l49wgk86%2522%253A%257B%2522id%2522%253A%2522clt68p53800022068l49wgk86%2522%252C%2522tabs%2522%253A%255B%255D%257D%252C%2522clt68p53800052068pprwret0%2522%253A%257B%2522id%2522%253A%2522clt68p53800052068pprwret0%2522%252C%2522activeTabId%2522%253A%2522clt68r12l00ja2068gv70d939%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A5173%252C%2522id%2522%253A%2522clt68r12l00ja2068gv70d939%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%257D%252C%2522clt68p538000420681rvg2qjp%2522%253A%257B%2522id%2522%253A%2522clt68p538000420681rvg2qjp%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clt68p53800032068lne53543%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clt68omh8000bdcf85ako14bo%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clt68p53800032068lne53543%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

Steps to reproduce

Just open link)))

Javascript Framework

no-framework (vanilla-js)

Logs

No response

Validations

oxxxxxy commented 9 months ago

ping...

oxxxxxy commented 9 months ago

N

oxxxxxy commented 9 months ago

I

oxxxxxy commented 9 months ago

ce :+1:

oxxxxxy commented 9 months ago

hey, you, who looking for answer.

this is it https://github.com/wrule/tulip-wasm-old

if you want to calc all that shit in client.

oxxxxxy commented 9 months ago

lan, pohuy... ya uje neskolko raz izmenil, ne fakt chto est dannie dlya otrabotki. krch... tam escho takaya huynya vilezla, chto ne mogu zoomit' blije, tolko dalshe, v chem delo hz. svechi s primera zoomyatsya, a tekuschie svechi net...

ochen' jal', mne proekt za svoyu prostotu och ponravilsya. It's a pity, I really liked the project for its simplicity.

image

oxxxxxy commented 8 months ago

image image

how about that?

oxxxxxy commented 8 months ago

image oh my goooooood guess what. yes, there is problem with zooming. and this problem is BIG AS F... Finsteraarhorn ( mountain ).

oxxxxxy commented 8 months ago

вот что реально круто у либы твоей, так это простота.

mrzafod commented 6 months ago

вот что реально круто у либы твоей, так это простота.

Салам алейкум! Я так понял ты уже какое-то время используешь этот пакет. Можешь дать обратку? Стоит ее форкать и ковырять или лучше делать свое решение?