UNPKG

@thuantan2060/technicalindicators

Version:
50 lines (49 loc) 2.18 kB
import StockData from '../StockData'; import ShootingStar, { IShootingStarConfig } from './ShootingStar'; /** * Configuration interface for ShootingStarUnconfirmed pattern. * Extends ShootingStar configuration. */ export interface IShootingStarUnconfirmedConfig extends IShootingStarConfig { } /** * Default configuration for ShootingStarUnconfirmed pattern. */ export declare const DEFAULT_SHOOTING_STAR_UNCONFIRMED_CONFIG: IShootingStarUnconfirmedConfig; export default class ShootingStarUnconfirmed extends ShootingStar { constructor(config?: IShootingStarUnconfirmedConfig); logic(data: StockData): boolean; upwardTrend(data: StockData, confirm?: boolean): boolean; includesInvertedHammer(data: StockData, confirm?: boolean): any; } /** * Detects ShootingStarUnconfirmed candlestick pattern in the provided stock data. * * A ShootingStarUnconfirmed is a bearish reversal pattern that appears at the end of an uptrend. * Unlike the confirmed version, this pattern doesn't require confirmation from the next candle. * It consists of: * 1. An uptrend in the first 3 candles * 2. An inverted hammer-like candle (small body with long upper shadow) at the 4th position * * This pattern suggests potential bearish reversal but is less reliable than the confirmed version. * * @param data - Stock data containing OHLC values for at least 4 periods * @param config - Configuration object for pattern detection * @param config.scale - Scale parameter for approximateEqual function precision (default: 0.001) * @returns True if ShootingStarUnconfirmed pattern is detected, false otherwise * * @example * ```typescript * // Using default configuration * const hasShootingStarUnconfirmedPattern = shootingstarunconfirmed(stockData); * * // Using custom configuration * const hasShootingStarUnconfirmedPattern = shootingstarunconfirmed(stockData, { * scale: 0.002 * }); * * // Backward compatibility with scale parameter * const hasShootingStarUnconfirmedPattern = shootingstarunconfirmed(stockData, { scale: 0.002 }); * ``` */ export declare function shootingstarunconfirmed(data: StockData, config?: IShootingStarUnconfirmedConfig): any;