taapi-strategies
Advanced tools
Comparing version 1.1.70 to 1.1.71
@@ -209,3 +209,3 @@ "use strict"; | ||
} | ||
getAllocationStats() { | ||
getAllocationStats(direction = null) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -221,6 +221,6 @@ let activeTradesCount = yield this.countActiveTrades(); | ||
let isMaxedOut = currentAllocation > allocationMaxTotal; | ||
if (allocationMaxLong > 0 && activeLongTradesCount >= allocationMaxLong) { | ||
if (direction == "long" && allocationMaxLong > 0 && activeLongTradesCount >= allocationMaxLong) { | ||
isMaxedOut = true; | ||
} | ||
if (allocationMaxShort > 0 && activeShortTradesCount >= allocationMaxShort) { | ||
if (direction == "short" && allocationMaxShort > 0 && activeShortTradesCount >= allocationMaxShort) { | ||
isMaxedOut = true; | ||
@@ -227,0 +227,0 @@ } |
@@ -209,3 +209,3 @@ "use strict"; | ||
} | ||
getAllocationStats() { | ||
getAllocationStats(direction = null) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -221,6 +221,6 @@ let activeTradesCount = yield this.countActiveTrades(); | ||
let isMaxedOut = currentAllocation > allocationMaxTotal; | ||
if (allocationMaxLong > 0 && activeLongTradesCount >= allocationMaxLong) { | ||
if (direction == "long" && allocationMaxLong > 0 && activeLongTradesCount >= allocationMaxLong) { | ||
isMaxedOut = true; | ||
} | ||
if (allocationMaxShort > 0 && activeShortTradesCount >= allocationMaxShort) { | ||
if (direction == "short" && allocationMaxShort > 0 && activeShortTradesCount >= allocationMaxShort) { | ||
isMaxedOut = true; | ||
@@ -227,0 +227,0 @@ } |
{ | ||
"name": "taapi-strategies", | ||
"version": "1.1.70", | ||
"version": "1.1.71", | ||
"description": "A TAAPI.IO Strategies framework and helper package", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
446398