Created
November 20, 2024 15:32
-
-
Save Fyzu/42bf2ae5d4c1b09f6dcb565b27f85f53 to your computer and use it in GitHub Desktop.
dxLink CHART JS API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dxScriptCodeList = [ | |
```in depth = 10 | |
out sma = sma(close, depth) | |
```, | |
```in depth = 10 | |
out sma = sma(open, depth) | |
```, | |
```in depth = 10 | |
out sma = sma(high, depth) | |
``` | |
] | |
const chart = new DXLinkChart({ indicators: dxScriptCodeList }) | |
chart.addIndicatorsCompileResultsListener((compileResults) => { | |
// ... | |
if (compileResults.error) { | |
// ... | |
} | |
}) | |
chart.configure({ | |
subscription: { | |
symbol: "AAPL{=d}", | |
fromTime: 0, | |
}, | |
indicatorsParamaters: [{ | |
depth: 14 | |
}, { some: 4 }] | |
}) | |
chart.addScriptErrorListener((script, error) => { | |
}) | |
chart.addCandleSnapshotListener((candles, indicators) => { | |
// ... | |
}) | |
chart.addCandleUpdateListener((candles, indicators) => { | |
// ... | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment