Displaying Strategy Targets
Effortlessly track your custom trading strategy by showcasing targets as lines on the chart within the user interface.
This functionality enables swift and convenient monitoring of your strategy's performance in real-time, empowering you to fine-tune as needed. By displaying targets on the chart, deviations from expected results are easily identified, allowing for timely corrective actions.
Simple Approach
When setting any of the listed targets below to a specific price, it is automatically illustrated on the chart.
gb.data.pairLedger.customBuyTarget
gb.data.pairLedger.customSellTarget
gb.data.pairLedger.customStopTarget
gb.data.pairLedger.customCloseTarget
gb.data.pairLedger.customTrailingTarget
gb.data.pairLedger.customDcaTarget
// example:
gb.data.pairLedger.customSellTarget = 1000000
Comprehensive Control
As an alternative to the 'simple' approach, chart lines can be specified in the pair ledger as an array of objects offering more properties than just price. Modify the number of lines or line properties at will; the chart updates within seconds to reflect the changes.
gb.data.pairLedger.customChartTargets = [
{
text: 'some custom target line', /
price: 20000,
quantity: '10',
lineStyle: 1,
lineLength: 5,
extendLeft: false,
bodyBackgroundColor: 'rgba(255, 255, 255, 0)',
bodyTextColor: 'rgba(0, 0, 0, 0.7)',
bodyBorderColor: 'rgba(34, 116, 165, 0)',
quantityBackgroundColor: 'rgba(34, 116, 165, 0)',
lineColor: 'rgba(34, 116, 165, 0)',
}
]