feat: enhance strategy simulation with Inverse Perpetual support, effective leverage caps, and advanced charting
This commit is contained in:
@ -22,6 +22,7 @@ constructor() {
|
||||
this.summarySignal = null;
|
||||
this.lastCandleTimestamp = null;
|
||||
this.simulationMarkers = [];
|
||||
this.avgPriceSeries = null;
|
||||
|
||||
this.init();
|
||||
}
|
||||
@ -35,6 +36,18 @@ constructor() {
|
||||
this.simulationMarkers = [];
|
||||
this.updateSignalMarkers();
|
||||
}
|
||||
|
||||
setAvgPriceData(data) {
|
||||
if (this.avgPriceSeries) {
|
||||
this.avgPriceSeries.setData(data || []);
|
||||
}
|
||||
}
|
||||
|
||||
clearAvgPriceData() {
|
||||
if (this.avgPriceSeries) {
|
||||
this.avgPriceSeries.setData([]);
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
this.createTimeframeButtons();
|
||||
@ -128,6 +141,16 @@ constructor() {
|
||||
lastValueVisible: false,
|
||||
priceLineVisible: false,
|
||||
}, 0);
|
||||
|
||||
this.avgPriceSeries = this.chart.addSeries(LightweightCharts.LineSeries, {
|
||||
color: '#00bcd4',
|
||||
lineWidth: 1,
|
||||
lineStyle: LightweightCharts.LineStyle.Solid,
|
||||
lastValueVisible: true,
|
||||
priceLineVisible: false,
|
||||
crosshairMarkerVisible: false,
|
||||
title: '',
|
||||
});
|
||||
|
||||
this.currentPriceLine = this.candleSeries.createPriceLine({
|
||||
price: 0,
|
||||
|
||||
Reference in New Issue
Block a user