Bollinger Bands Example
Add Bollinger Bands around the price series.
Code
tsx
import 'react-candlesticks/style.css';
import {
BollingerBands,
Candlesticks,
Chart,
Panel,
exampleData,
} from 'react-candlesticks';
export default function App() {
return (
<div style={{ width: '100vw', height: '100vh' }}>
<Chart data={exampleData} granularity="d1" theme="dark">
<Panel heightRatio={3}>
<Candlesticks />
<BollingerBands period={20} standardDeviations={2} />
</Panel>
</Chart>
</div>
);
}