This commit is contained in:
tim
2024-10-22 03:42:08 -04:00
parent 82fccc1be3
commit d33eca6931
12 changed files with 101 additions and 40 deletions

View File

@@ -26,11 +26,11 @@ function symbolChanged(symbol) {
if (symbol===null)
co.selectedSymbol = null
else {
updateFeeDropdown()
const info = lookupSymbol(symbol.ticker)
symbolChangedCbs.forEach((cb) => cb(info))
co.selectedSymbol = info
}
updateFeeDropdown()
}
@@ -109,7 +109,10 @@ export function updateFeeDropdown() {
const [_addr, fee] = p
return {
title: (fee / 10000).toFixed(2) + '%',
onSelect: fee === symbolItem.fee ? ()=>{} : () => selectPool(fee),
onSelect: ()=>{
if (fee !== symbolItem.fee)
selectPool(fee)
},
}
})
}
@@ -460,7 +463,7 @@ export function deleteShapeId(id) {
chart.removeEntity(id)
}
const MEAN_RANGE_MULTIPLIER = 10
const MEAN_RANGE_MULTIPLIER = 3
function chartMeanRange() {
let range = 0

View File

@@ -207,7 +207,7 @@ export class Shape {
// return an object with property defaults, e.g. { "linetoolhorzline.linecolor": "#7f11e0" }
// https://www.tradingview.com/charting-library-docs/latest/api/modules/Charting_Library#drawingoverrides
drawingOverrides() {
return this.colorProps()
return mixin(this.colorProps(), this.creationOptions)
}
create() {
@@ -547,8 +547,8 @@ export class DLine extends Line {
// Model
this.model.pointA = null // {time:..., price:...}
this.model.pointB = null
this.model.extendLeft = false
this.model.extendRight = false
this.model.extendLeft = true
this.model.extendRight = true
this.setModel(model) // call setModel at the end
}