hedgequantx 2.9.252 → 2.9.253

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.252",
3
+ "version": "2.9.253",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -60,6 +60,11 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
60
60
  let running = true, stopReason = null, startingPnL = null;
61
61
  let currentPosition = 0, pendingOrder = false, tickCount = 0, lastBias = 'FLAT';
62
62
 
63
+ // Clear any stale position data at startup
64
+ if (service.positions) {
65
+ service.positions.clear();
66
+ }
67
+
63
68
  // HFT: Use CircularBuffer for O(1) tick storage (replaces O(n) shift())
64
69
  const recentTicksBuffer = new CircularBuffer(100);
65
70
  const recentSignalsBuffer = new CircularBuffer(10);