mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
Ensure stop line is visible for new trades
This commit is contained in:
parent
c1e447e163
commit
bc88cd16d0
|
@ -163,10 +163,13 @@ export function generateTradeSeries(
|
|||
// Show distance to stoploss
|
||||
if (openTrades.length > 0) {
|
||||
// Ensure to import and "use" whatever feature in candleChart! (MarkLine, MarkArea, ...)
|
||||
// Offset to avoid having the line at the very end of the chart
|
||||
const offset = dataset.timeframe_ms * 10;
|
||||
|
||||
tradesSeries.markLine = {
|
||||
symbol: 'none',
|
||||
itemStyle: {
|
||||
color: '#ff000055',
|
||||
color: '#ff0000AA',
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
|
@ -180,7 +183,10 @@ export function generateTradeSeries(
|
|||
{
|
||||
name: 'Stoploss',
|
||||
yAxis: t.stop_loss_abs,
|
||||
xAxis: t.open_timestamp,
|
||||
xAxis:
|
||||
dataset.data_stop_ts - offset > t.open_timestamp
|
||||
? t.open_timestamp
|
||||
: dataset.data_stop_ts - offset,
|
||||
},
|
||||
{
|
||||
yAxis: t.stop_loss_abs,
|
||||
|
|
Loading…
Reference in New Issue
Block a user