Update BB volume protection
This commit is contained in:
@@ -658,13 +658,13 @@ const TradeChart = ({
|
||||
// @ts-ignore
|
||||
volatilityWidthSeries.setData(volatilityWidthData)
|
||||
|
||||
// Add confidence range lines (0.02 - 0.10)
|
||||
const confidenceMinLine = chart.current.addLineSeries({
|
||||
color: '#16A34A', // Green for confidence range minimum
|
||||
// Add confidence range lines with clear range indicators
|
||||
const highConfidenceMinLine = chart.current.addLineSeries({
|
||||
color: '#16A34A', // Green for high confidence zone
|
||||
lineWidth: 1,
|
||||
priceLineVisible: true,
|
||||
priceLineWidth: 1,
|
||||
title: 'Conf Min (2%)',
|
||||
title: 'High: 1% → 2.5%',
|
||||
pane: paneCount,
|
||||
lineStyle: LineStyle.Dashed,
|
||||
priceFormat: {
|
||||
@@ -674,12 +674,27 @@ const TradeChart = ({
|
||||
},
|
||||
})
|
||||
|
||||
const highMediumThresholdLine = chart.current.addLineSeries({
|
||||
color: '#CA8A04', // Yellow/Amber to separate High from Medium confidence
|
||||
lineWidth: 1,
|
||||
priceLineVisible: true,
|
||||
priceLineWidth: 1,
|
||||
title: 'Medium: 2.5% → 3.5%',
|
||||
pane: paneCount,
|
||||
lineStyle: LineStyle.Dotted,
|
||||
priceFormat: {
|
||||
minMove: 0.001,
|
||||
precision: 3,
|
||||
type: 'price',
|
||||
},
|
||||
})
|
||||
|
||||
const confidenceMaxLine = chart.current.addLineSeries({
|
||||
color: '#16A34A', // Green for confidence range maximum
|
||||
lineWidth: 1,
|
||||
priceLineVisible: true,
|
||||
priceLineWidth: 1,
|
||||
title: 'Conf Max (10%)',
|
||||
title: 'Max: 3.5%',
|
||||
pane: paneCount,
|
||||
lineStyle: LineStyle.Dashed,
|
||||
priceFormat: {
|
||||
@@ -689,30 +704,45 @@ const TradeChart = ({
|
||||
},
|
||||
})
|
||||
|
||||
// Create horizontal lines for confidence range
|
||||
// Create horizontal lines for confidence zones
|
||||
// High confidence: 1% - 2.5%
|
||||
// Medium confidence: 2.5% - 3.5%
|
||||
const bollingerBands = indicatorsValues.BollingerBandsVolatilityProtection.bollingerBands
|
||||
if (bollingerBands && bollingerBands.length > 0) {
|
||||
const confidenceMinData = [
|
||||
const highConfidenceMinData = [
|
||||
{
|
||||
time: moment(bollingerBands[0].date).unix(),
|
||||
value: 0.02, // Confidence minimum threshold
|
||||
value: 0.01, // High confidence minimum threshold (1%)
|
||||
},
|
||||
{
|
||||
time: moment(bollingerBands[bollingerBands.length - 1].date).unix(),
|
||||
value: 0.02, // Confidence minimum threshold
|
||||
value: 0.01, // High confidence minimum threshold (1%)
|
||||
}
|
||||
]
|
||||
// @ts-ignore
|
||||
confidenceMinLine.setData(confidenceMinData)
|
||||
highConfidenceMinLine.setData(highConfidenceMinData)
|
||||
|
||||
const highMediumThresholdData = [
|
||||
{
|
||||
time: moment(bollingerBands[0].date).unix(),
|
||||
value: 0.025, // High/Medium confidence threshold (2.5%)
|
||||
},
|
||||
{
|
||||
time: moment(bollingerBands[bollingerBands.length - 1].date).unix(),
|
||||
value: 0.025, // High/Medium confidence threshold (2.5%)
|
||||
}
|
||||
]
|
||||
// @ts-ignore
|
||||
highMediumThresholdLine.setData(highMediumThresholdData)
|
||||
|
||||
const confidenceMaxData = [
|
||||
{
|
||||
time: moment(bollingerBands[0].date).unix(),
|
||||
value: 0.10, // Confidence maximum threshold
|
||||
value: 0.035, // Confidence maximum threshold (3.5%)
|
||||
},
|
||||
{
|
||||
time: moment(bollingerBands[bollingerBands.length - 1].date).unix(),
|
||||
value: 0.10, // Confidence maximum threshold
|
||||
value: 0.035, // Confidence maximum threshold (3.5%)
|
||||
}
|
||||
]
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user