Skip to main content

beforePlaceOrder

Called on the entry path right before connector order placement. This hook fires for both signal and no-signal entries.

Params

{
ctx: StrategyHookCtx;
market: {
candle: KlineChartItem;
btcCandle: KlineChartItem;
};
decision: EntryDecision;
entry: StrategyHookEntryContext;
policy: StrategyHookPolicyContext;
ml?: StrategyHookMlContext;
ai?: StrategyHookAiContext;
}

Use entry.context instead of a separate top-level entryContext alias.

Output

ReturnType
No return valuevoid or Promise<void>

This hook cannot block runtime flow. If it throws, the error is logged, onRuntimeError is called, and the runtime continues.