From 3725b4895c8e1a6dad27ba04272fc234b5e82f0e Mon Sep 17 00:00:00 2001 From: NguyenNguyen Date: Wed, 28 Jun 2023 16:20:22 +0700 Subject: [PATCH] Update hanging-man.js --- candlestick-pattern/hanging-man.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candlestick-pattern/hanging-man.js b/candlestick-pattern/hanging-man.js index a7ba03a..9c8b8f2 100644 --- a/candlestick-pattern/hanging-man.js +++ b/candlestick-pattern/hanging-man.js @@ -2,7 +2,7 @@ const BEARD_FACTOR = 3 const isHangingManPattern = async (input) => { try { - const last = input.open.length - 1 + const last = input.open.length - 2 // confirmed candle : last - 2 if (last < 4) { console.error(`Require OHLCV of last 5 candles`) return false