intro vid on homepage
This commit is contained in:
@@ -39,7 +39,7 @@ export const ShapeType = {
|
||||
}
|
||||
|
||||
|
||||
export function allocationText(buy, weight, amount, symbol, separator = ' ') {
|
||||
export function allocationText(buy, weight, amount, symbol, separator = ' ', inSymbol=null) {
|
||||
// set breakout=true for a buy breakout and breakout=false for a sell breakout
|
||||
const hasAmount = amount !== null && amount !== undefined && amount > 0
|
||||
if (hasAmount)
|
||||
@@ -56,6 +56,8 @@ export function allocationText(buy, weight, amount, symbol, separator = ' ') {
|
||||
if (hasAmount && hasSymbol) {
|
||||
if (hasWeight)
|
||||
text += separator
|
||||
if (inSymbol)
|
||||
text += `${inSymbol} worth `
|
||||
text += `${amount.toPrecision(3).toLocaleString('fullwide')} ${symbol}`
|
||||
}
|
||||
return text
|
||||
@@ -324,11 +326,11 @@ export class Shape {
|
||||
}
|
||||
|
||||
// diagonals need to override this to adjust their price as well.
|
||||
pointsToTvOhlcStart(points, periodSeconds=null) {
|
||||
return points === null ? null : points.map((p) => {
|
||||
return {time: nearestOhlcStart(p.time, periodSeconds), price: p.price}
|
||||
})
|
||||
}
|
||||
pointsToTvOhlcStart(points, periodSeconds = null) {
|
||||
return points === null ? null : points.map((p) => {
|
||||
return {time: nearestOhlcStart(p.time, periodSeconds), price: p.price}
|
||||
})
|
||||
}
|
||||
|
||||
onPoints(points) {} // the control points of an existing shape were changed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user