true when called during a backtest run — adapter should skip exchange calls
Strategy/exchange/frame routing context
Current market price at the moment breakeven is triggered
New stop-loss price = effectivePriceOpen (the position's effective entry price)
Effective take-profit price = _trailingPriceTakeProfit ?? priceTakeProfit (unchanged by breakeven)
Position direction
Trading pair symbol, e.g. "BTCUSDT"
// LONG: entry=100, currentPrice=100.5, newSL=100 (entry), newTP=110 (unchanged)
const payload: BrokerBreakevenPayload = {
symbol: "BTCUSDT",
currentPrice: 100.5,
newStopLossPrice: 100,
newTakeProfitPrice: 110,
context: { strategyName: "my-strategy", exchangeName: "binance", frameName: "1h" },
backtest: false,
};
Payload for a breakeven operation broker event.
Forwarded to the registered IBroker adapter via
onBreakevenCommit. Called explicitly after all validations pass, beforestrategyCoreService.breakeven().newStopLossPriceequalseffectivePriceOpen(entry price).newTakeProfitPriceequals_trailingPriceTakeProfit ?? priceTakeProfit(TP is unchanged).