pinets 0.9.20 → 0.9.22

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.
@@ -115,6 +115,7 @@ export interface Order {
115
115
  _attachedAtReversal?: boolean;
116
116
  _isPersistent?: boolean;
117
117
  _callsiteId?: string;
118
+ _intended_trade_ids?: string[];
118
119
  }
119
120
  /**
120
121
  * Strategy state stored on the Context after a backtest run.
@@ -159,8 +159,12 @@ export declare function processExitOrders(context: any): void;
159
159
  * pessimistic broker model — the trader is assumed to be liquidated at
160
160
  * the worst intra-bar price, since intra-bar tick order is unknown.
161
161
  *
162
- * Skipped entirely when the position's `margin_pct >= 100` (no leverage)
163
- * or when there are no open positions.
162
+ * Runs for ALL margin percentages including 100%. At 100% margin the
163
+ * trader still needs full notional collateral; adverse price movement
164
+ * that drops account equity below the position's current notional
165
+ * triggers a margin call. This matches TV's broker-emulator behavior
166
+ * (the "Margin calls" stat in the Strategy Tester is non-zero on 100%
167
+ * margin runs whenever a position's mark-to-market loss exceeds equity).
164
168
  */
165
169
  export declare function processMarginCall(context: any): void;
166
170
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinets",
3
- "version": "0.9.20",
3
+ "version": "0.9.22",
4
4
  "description": "Run Pine Script anywhere. PineTS is an open-source transpiler and runtime that brings Pine Script logic to Node.js and the browser with 1:1 syntax compatibility. Reliably write, port, and run indicators or strategies on your own infrastructure.",
5
5
  "keywords": [
6
6
  "Pine Script",