Interface HighestProfitContract

Contract for highest profit updates emitted by the framework. This contract defines the structure of the data emitted when a new highest profit is achieved for an open position. It includes contextual information about the strategy, exchange, frame, and the associated signal. Consumers can use this information to implement custom logic based on profit milestones (e.g. trailing stops, partial profit-taking). The backtest flag allows consumers to differentiate between live and backtest updates for appropriate handling.

interface HighestProfitContract {
    backtest: boolean;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    signal: IPublicSignalRow;
    strategyName: string;
    symbol: string;
    timestamp: number;
}

Properties

backtest: boolean

Indicates if the update is from a backtest or live trading (true for backtest, false for live)

currentPrice: number

Current price at the time of the highest profit update

exchangeName: string

Exchange name for context

frameName: string

Frame name for context (e.g. "1m", "5m")

Public signal data for the position associated with this highest profit update

strategyName: string

Strategy name for context

symbol: string

Trading symbol (e.g. "BTC/USDT")

timestamp: number

Timestamp of the highest profit update (milliseconds since epoch)