An open API service indexing awesome lists of open source software.

https://github.com/duart38/console-candlestick-chart

Japanese candlesticks charts in the console for TypeScript/JavaScript projects.
https://github.com/duart38/console-candlestick-chart

candlestick candlestick-chart chart deno javascript javascript-library trading typescript typescript-library

Last synced: about 2 months ago
JSON representation

Japanese candlesticks charts in the console for TypeScript/JavaScript projects.

Awesome Lists containing this project

README

        

# Render candlestick charts within your terminal
> This is still work in progress. There's quite some issues with some missing candles due to lack of checks for some small granular candles. Performance can also significantly be improved.

- Adjusts based on terminal width and height automatically
- Customizable symbols
- Ability to change candle color (e.g., when a pattern is to be displayed in the terminal)

## Example usage
```TypeScript
const data: Array = [...] // your data here
const chart = new Chart(data);

// (COMMENTED) example of how to apply an effect to a candle.
// chart.getActiveCandles()[3].addEffect(Color.bgBlue);

// rendering of the terminal
console.log(chart+"");

// executes callback when terminal size changes
chart.onConsoleSizeChange((e)=>{
// clear the terminal
Deno.stdout.write(new TextEncoder().encode(`\x1B[2J`));
// re-print the chart
console.log(""+chart);
});
```