-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,042 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 160, | ||
"semi": false | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from './harmonics' | ||
export * from './marketProfile' | ||
export * from './orderflow' | ||
export * from './fibonacci' | ||
export * from './signals' | ||
export * from './time' | ||
export * from './harmonics'; | ||
export * from './marketProfile'; | ||
export * from './orderflow'; | ||
export * from './fibonacci'; | ||
export * from './signals'; | ||
export * from './time'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './stackedImbalances.ts' | ||
export * from './stackedImbalances.ts'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from './lib' | ||
export * as constants from './constants' | ||
export * as types from './types' | ||
export * as utils from './utils' | ||
export * from './lib'; | ||
export * as constants from './constants'; | ||
export * as types from './types'; | ||
export * as utils from './utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import { EXCESS_TAIL_LENGTH_SIGNIFICANCE } from '../../constants/marketProfile' | ||
import { ICandle } from '../../types/candle.types' | ||
import { EXCESS_TAIL_LENGTH_SIGNIFICANCE } from '../../constants/marketProfile'; | ||
import { ICandle } from '../../types/candle.types'; | ||
|
||
/** | ||
* Determines whether a candle is an excess candle. | ||
* An excess candle is identified by the length of its tails relative to its body. | ||
* | ||
* | ||
* @param candle - The candle to check for excess. | ||
* @returns True if the candle is an excess candle, otherwise false. | ||
* | ||
* | ||
* @example | ||
* ```typescript | ||
* import { CandlestickPatterns } from '@focus1691/chart-patterns'; | ||
* | ||
* | ||
* // Assuming 'candle' is an ICandle object | ||
* const isExcessCandle: boolean = CandlestickPatterns.isExcess(candle); | ||
* ``` | ||
*/ | ||
export const isExcess = (candle: ICandle): boolean => { | ||
const open: number = candle.open | ||
const high: number = candle.high | ||
const low: number = candle.low | ||
const close: number = candle.close | ||
const klineLength: number = Math.abs(close - open) | ||
const klineUpperTail: number = Math.abs(close - high) | ||
const klineLowerTail: number = Math.abs(close - low) | ||
const open: number = candle.open; | ||
const high: number = candle.high; | ||
const low: number = candle.low; | ||
const close: number = candle.close; | ||
const klineLength: number = Math.abs(close - open); | ||
const klineUpperTail: number = Math.abs(close - high); | ||
const klineLowerTail: number = Math.abs(close - low); | ||
|
||
const isUpperTailExcess: boolean = klineUpperTail / klineLength > EXCESS_TAIL_LENGTH_SIGNIFICANCE | ||
const isLowerTailExcess: boolean = klineLowerTail / klineLength > EXCESS_TAIL_LENGTH_SIGNIFICANCE | ||
const isUpperTailExcess: boolean = klineUpperTail / klineLength > EXCESS_TAIL_LENGTH_SIGNIFICANCE; | ||
const isLowerTailExcess: boolean = klineLowerTail / klineLength > EXCESS_TAIL_LENGTH_SIGNIFICANCE; | ||
|
||
return isUpperTailExcess || isLowerTailExcess | ||
} | ||
return isUpperTailExcess || isLowerTailExcess; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './engulfing' | ||
export * from './excess' | ||
export * from './engulfing'; | ||
export * from './excess'; |
Oops, something went wrong.