Skip to content

Commit 88fd690

Browse files
committed
add accepted ratchet strategy adapter
1 parent 87a3217 commit 88fd690

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {
2+
compareTradeWithRatchet5m,
3+
summarizeCorrectedRatchetCandidate
4+
} from "./target-triggered-ratchet-corrected-tools.mjs";
5+
6+
export const ACCEPTED_RATCHET = Object.freeze({
7+
id: "touch-2.00-lock-0.00",
8+
activationAtr: 2,
9+
floorAtr: 0
10+
});
11+
12+
export function applyAcceptedRatchet5m(
13+
trade,
14+
stopUpdates,
15+
candleByTimestamp,
16+
costs
17+
) {
18+
return compareTradeWithRatchet5m(
19+
trade,
20+
stopUpdates,
21+
candleByTimestamp,
22+
ACCEPTED_RATCHET,
23+
costs
24+
);
25+
}
26+
27+
export function summarizeAcceptedRatchet(comparisons) {
28+
return summarizeCorrectedRatchetCandidate(comparisons);
29+
}

0 commit comments

Comments
 (0)