@pipsend/charts 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pipsend-charts.development.mjs +45 -17
- package/dist/pipsend-charts.production.mjs +2 -2
- package/dist/pipsend-charts.standalone.development.js +45 -17
- package/dist/pipsend-charts.standalone.development.mjs +45 -17
- package/dist/pipsend-charts.standalone.production.js +2 -2
- package/dist/pipsend-charts.standalone.production.mjs +2 -2
- package/dist/typings.d.ts +20 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license
|
|
3
|
-
* Pipsend Charts v0.0.
|
|
3
|
+
* Pipsend Charts v0.0.14
|
|
4
4
|
* Copyright (c) 2026 Pipsend
|
|
5
5
|
* Licensed under MIT License
|
|
6
6
|
* Built on TradingView Lightweight Charts™ (Apache 2.0)
|
|
@@ -15605,6 +15605,8 @@
|
|
|
15605
15605
|
exit: options?.shortColors?.exit ?? '#26a69a',
|
|
15606
15606
|
},
|
|
15607
15607
|
defaultSize: options?.defaultSize ?? 1,
|
|
15608
|
+
entryOffset: options?.entryOffset ?? 0,
|
|
15609
|
+
exitOffset: options?.exitOffset ?? 0,
|
|
15608
15610
|
};
|
|
15609
15611
|
this._private__markersPlugin = createSeriesMarkers(series);
|
|
15610
15612
|
}
|
|
@@ -15629,6 +15631,22 @@
|
|
|
15629
15631
|
this._private__positions = [...positions];
|
|
15630
15632
|
this._private__updateMarkers();
|
|
15631
15633
|
}
|
|
15634
|
+
/**
|
|
15635
|
+
* Cierra una posición abierta agregando el punto de salida
|
|
15636
|
+
*/
|
|
15637
|
+
closePosition(id, exit, exitText) {
|
|
15638
|
+
const position = this._private__positions.find(p => p.id === id);
|
|
15639
|
+
if (position) {
|
|
15640
|
+
position.exit = exit;
|
|
15641
|
+
if (exitText && position.text) {
|
|
15642
|
+
position.text.exit = exitText;
|
|
15643
|
+
}
|
|
15644
|
+
else if (exitText) {
|
|
15645
|
+
position.text = { exit: exitText };
|
|
15646
|
+
}
|
|
15647
|
+
this._private__updateMarkers();
|
|
15648
|
+
}
|
|
15649
|
+
}
|
|
15632
15650
|
/**
|
|
15633
15651
|
* Elimina una posición por ID
|
|
15634
15652
|
*/
|
|
@@ -15668,6 +15686,12 @@
|
|
|
15668
15686
|
if (options.defaultSize !== undefined) {
|
|
15669
15687
|
this._private__options.defaultSize = options.defaultSize;
|
|
15670
15688
|
}
|
|
15689
|
+
if (options.entryOffset !== undefined) {
|
|
15690
|
+
this._private__options.entryOffset = options.entryOffset;
|
|
15691
|
+
}
|
|
15692
|
+
if (options.exitOffset !== undefined) {
|
|
15693
|
+
this._private__options.exitOffset = options.exitOffset;
|
|
15694
|
+
}
|
|
15671
15695
|
this._private__updateMarkers();
|
|
15672
15696
|
}
|
|
15673
15697
|
/**
|
|
@@ -15682,10 +15706,11 @@
|
|
|
15682
15706
|
(isLong ? this._private__options.longColors.entry : this._private__options.shortColors.entry);
|
|
15683
15707
|
const exitColor = position.color?.exit ??
|
|
15684
15708
|
(isLong ? this._private__options.longColors.exit : this._private__options.shortColors.exit);
|
|
15709
|
+
// Entry marker (always present)
|
|
15685
15710
|
const entryMarker = {
|
|
15686
15711
|
time: position.entry.time,
|
|
15687
15712
|
position: 'atPriceMiddle',
|
|
15688
|
-
price: position.entry.price,
|
|
15713
|
+
price: position.entry.price + this._private__options.entryOffset,
|
|
15689
15714
|
shape: isLong ? 'arrowUp' : 'arrowDown',
|
|
15690
15715
|
color: entryColor,
|
|
15691
15716
|
size: size,
|
|
@@ -15697,21 +15722,24 @@
|
|
|
15697
15722
|
entryMarker.id = `${position.id}-entry`;
|
|
15698
15723
|
}
|
|
15699
15724
|
markers.push(entryMarker);
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
|
|
15712
|
-
|
|
15725
|
+
// Exit marker (only if position is closed)
|
|
15726
|
+
if (position.exit) {
|
|
15727
|
+
const exitMarker = {
|
|
15728
|
+
time: position.exit.time,
|
|
15729
|
+
position: 'atPriceMiddle',
|
|
15730
|
+
price: position.exit.price + this._private__options.exitOffset,
|
|
15731
|
+
shape: isLong ? 'arrowDown' : 'arrowUp',
|
|
15732
|
+
color: exitColor,
|
|
15733
|
+
size: size,
|
|
15734
|
+
};
|
|
15735
|
+
if (position.text?.exit) {
|
|
15736
|
+
exitMarker.text = position.text.exit;
|
|
15737
|
+
}
|
|
15738
|
+
if (position.id) {
|
|
15739
|
+
exitMarker.id = `${position.id}-exit`;
|
|
15740
|
+
}
|
|
15741
|
+
markers.push(exitMarker);
|
|
15713
15742
|
}
|
|
15714
|
-
markers.push(exitMarker);
|
|
15715
15743
|
}
|
|
15716
15744
|
return markers;
|
|
15717
15745
|
}
|
|
@@ -17286,7 +17314,7 @@
|
|
|
17286
17314
|
* Returns the current version as a string. For example `'1.0.0'`.
|
|
17287
17315
|
*/
|
|
17288
17316
|
function version() {
|
|
17289
|
-
return "0.0.
|
|
17317
|
+
return "0.0.14";
|
|
17290
17318
|
}
|
|
17291
17319
|
|
|
17292
17320
|
var PipsendChartsModule = /*#__PURE__*/Object.freeze({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license
|
|
3
|
-
* Pipsend Charts v0.0.
|
|
3
|
+
* Pipsend Charts v0.0.14
|
|
4
4
|
* Copyright (c) 2026 Pipsend
|
|
5
5
|
* Licensed under MIT License
|
|
6
6
|
* Built on TradingView Lightweight Charts™ (Apache 2.0)
|
|
@@ -15602,6 +15602,8 @@ class PositionMarkersManager {
|
|
|
15602
15602
|
exit: options?.shortColors?.exit ?? '#26a69a',
|
|
15603
15603
|
},
|
|
15604
15604
|
defaultSize: options?.defaultSize ?? 1,
|
|
15605
|
+
entryOffset: options?.entryOffset ?? 0,
|
|
15606
|
+
exitOffset: options?.exitOffset ?? 0,
|
|
15605
15607
|
};
|
|
15606
15608
|
this._private__markersPlugin = createSeriesMarkers(series);
|
|
15607
15609
|
}
|
|
@@ -15626,6 +15628,22 @@ class PositionMarkersManager {
|
|
|
15626
15628
|
this._private__positions = [...positions];
|
|
15627
15629
|
this._private__updateMarkers();
|
|
15628
15630
|
}
|
|
15631
|
+
/**
|
|
15632
|
+
* Cierra una posición abierta agregando el punto de salida
|
|
15633
|
+
*/
|
|
15634
|
+
closePosition(id, exit, exitText) {
|
|
15635
|
+
const position = this._private__positions.find(p => p.id === id);
|
|
15636
|
+
if (position) {
|
|
15637
|
+
position.exit = exit;
|
|
15638
|
+
if (exitText && position.text) {
|
|
15639
|
+
position.text.exit = exitText;
|
|
15640
|
+
}
|
|
15641
|
+
else if (exitText) {
|
|
15642
|
+
position.text = { exit: exitText };
|
|
15643
|
+
}
|
|
15644
|
+
this._private__updateMarkers();
|
|
15645
|
+
}
|
|
15646
|
+
}
|
|
15629
15647
|
/**
|
|
15630
15648
|
* Elimina una posición por ID
|
|
15631
15649
|
*/
|
|
@@ -15665,6 +15683,12 @@ class PositionMarkersManager {
|
|
|
15665
15683
|
if (options.defaultSize !== undefined) {
|
|
15666
15684
|
this._private__options.defaultSize = options.defaultSize;
|
|
15667
15685
|
}
|
|
15686
|
+
if (options.entryOffset !== undefined) {
|
|
15687
|
+
this._private__options.entryOffset = options.entryOffset;
|
|
15688
|
+
}
|
|
15689
|
+
if (options.exitOffset !== undefined) {
|
|
15690
|
+
this._private__options.exitOffset = options.exitOffset;
|
|
15691
|
+
}
|
|
15668
15692
|
this._private__updateMarkers();
|
|
15669
15693
|
}
|
|
15670
15694
|
/**
|
|
@@ -15679,10 +15703,11 @@ class PositionMarkersManager {
|
|
|
15679
15703
|
(isLong ? this._private__options.longColors.entry : this._private__options.shortColors.entry);
|
|
15680
15704
|
const exitColor = position.color?.exit ??
|
|
15681
15705
|
(isLong ? this._private__options.longColors.exit : this._private__options.shortColors.exit);
|
|
15706
|
+
// Entry marker (always present)
|
|
15682
15707
|
const entryMarker = {
|
|
15683
15708
|
time: position.entry.time,
|
|
15684
15709
|
position: 'atPriceMiddle',
|
|
15685
|
-
price: position.entry.price,
|
|
15710
|
+
price: position.entry.price + this._private__options.entryOffset,
|
|
15686
15711
|
shape: isLong ? 'arrowUp' : 'arrowDown',
|
|
15687
15712
|
color: entryColor,
|
|
15688
15713
|
size: size,
|
|
@@ -15694,21 +15719,24 @@ class PositionMarkersManager {
|
|
|
15694
15719
|
entryMarker.id = `${position.id}-entry`;
|
|
15695
15720
|
}
|
|
15696
15721
|
markers.push(entryMarker);
|
|
15697
|
-
|
|
15698
|
-
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15722
|
+
// Exit marker (only if position is closed)
|
|
15723
|
+
if (position.exit) {
|
|
15724
|
+
const exitMarker = {
|
|
15725
|
+
time: position.exit.time,
|
|
15726
|
+
position: 'atPriceMiddle',
|
|
15727
|
+
price: position.exit.price + this._private__options.exitOffset,
|
|
15728
|
+
shape: isLong ? 'arrowDown' : 'arrowUp',
|
|
15729
|
+
color: exitColor,
|
|
15730
|
+
size: size,
|
|
15731
|
+
};
|
|
15732
|
+
if (position.text?.exit) {
|
|
15733
|
+
exitMarker.text = position.text.exit;
|
|
15734
|
+
}
|
|
15735
|
+
if (position.id) {
|
|
15736
|
+
exitMarker.id = `${position.id}-exit`;
|
|
15737
|
+
}
|
|
15738
|
+
markers.push(exitMarker);
|
|
15710
15739
|
}
|
|
15711
|
-
markers.push(exitMarker);
|
|
15712
15740
|
}
|
|
15713
15741
|
return markers;
|
|
15714
15742
|
}
|
|
@@ -17283,7 +17311,7 @@ const customSeriesDefaultOptions = {
|
|
|
17283
17311
|
* Returns the current version as a string. For example `'1.0.0'`.
|
|
17284
17312
|
*/
|
|
17285
17313
|
function version() {
|
|
17286
|
-
return "0.0.
|
|
17314
|
+
return "0.0.14";
|
|
17287
17315
|
}
|
|
17288
17316
|
|
|
17289
17317
|
export { areaSeries as AreaSeries, barSeries as BarSeries, baselineSeries as BaselineSeries, candlestickSeries as CandlestickSeries, ColorType, CrosshairMode, DraggablePriceLine, histogramSeries as HistogramSeries, InteractiveLineManager, LastPriceAnimationMode, lineSeries as LineSeries, LineStyle, LineType, MismatchDirection, PositionMarkersManager, PriceLineSource, PriceScaleMode, TickMarkType, TrackingModeExitMode, applyATR, applyBollingerBands, applyEMA, applyMACD, applyOBV, applyRSI, applySMA, applyStochastic, applyVolume, applyWMA, createChart, createChartEx, createImageWatermark, createInteractiveLineManager, createOptionsChart, createPositionMarkers, createSeriesMarkers, createTextWatermark, createTradingLine, createUpDownMarkers, createYieldCurveChart, customSeriesDefaultOptions, defaultHorzScaleBehavior, isBusinessDay, isUTCTimestamp, setOBVVolumeData, setVolumeData, version };
|