Versions in this module Expand all Collapse all v1 v1.1.0 Nov 17, 2026 Changes in this version + const BacktestReasonDailyLimit + const BacktestReasonHours + const BacktestReasonLimit + const BacktestReasonMarket + const BacktestReasonStopEntry + const BacktestReasonStopLoss + const BacktestReasonStopOut + const BacktestReasonTakeProfit + const BacktestStatusBudgetExhausted + const BacktestStatusCanceled + const BacktestStatusFailed + const BacktestStatusSucceeded + const DefaultPair + const EnvAPIKey + const EnvAgent + const EnvToken + const EnvURL + const ExposurePath + const KindDecision + const KindDiscard + const KindJournal + const KindOrder + const KindPromptStatus + const MT5MaxComment + const MaxBody + const MaxTradingWindows + const Prefix + const PrintWarmupFlag + func DefaultStrategy(kind string) string + func HoursWindows(windows []ui.TradingWindow, start, end string, flatten, cancelPending bool) []ui.TradingWindow + func MT5BridgeKey(raw string) string + func MT5Comment(comment, name string) string + func MT5Magic(magic int64, comment string) int64 + func MT5Pairs(value string) []string + func SameMT5Bridge(a, b string) bool + func SameWindow(a, b ui.TradingWindow) bool + func SortedWindows(windows []ui.TradingWindow) []ui.TradingWindow + func TradingWindow(start, end string, at time.Time, zone *time.Location) (open bool, next time.Time) + func TradingWindows(windows []ui.TradingWindow, at time.Time, zone *time.Location) (open, upcoming int, next time.Time) + func ValidClock(text string) bool + func WindowAllows(w ui.TradingWindow, name string) bool + func WindowEnd(w ui.TradingWindow, openedAt time.Time, zone *time.Location) time.Time + func WindowLabel(w ui.TradingWindow) string + func WindowPairsReason(w ui.TradingWindow) string + func WindowsFor(windows []ui.TradingWindow, name string) []ui.TradingWindow + func WindowsProblem(windows []ui.TradingWindow) string + type Account struct + BridgeToken string + BridgeURL string + Comment *string + Magic *int64 + RealAllowed bool + type Attachment struct + Data []byte + MediaType string + type BacktestConfig struct + Agent string + Balance float64 + Conservative bool + DailyGain float64 + DailyLoss float64 + Fee float64 + From int64 + GapFills bool + Hours *ui.BacktestHours + LLMMaxCalls int + LLMMaxCost float64 + LLMPriceInput float64 + LLMPriceOutput float64 + Leverage float64 + Progress bool + Protection *ui.ProtectionSettings + References map[string]string + Releases map[string][]BacktestRelease + Report string + Run int64 + Segment string + SlippagePoints float64 + SpreadPoints float64 + Symbols map[string]BacktestSymbol + To int64 + func ReadBacktestConfig(path string) (BacktestConfig, error) + func (c *BacktestConfig) Validate() error + type BacktestOpen struct + Entry float64 + Mark float64 + OpenedAt int64 + Pair string + Profit float64 + Quantity float64 + Side string + type BacktestPoint struct + Time int64 + Value float64 + type BacktestRelease struct + Code string + Currency string + Importance int + Name string + Tentative bool + Time int64 + Timed bool + type BacktestReport struct + Assumptions BacktestConfig + Candles int + Currency string + DataFrom int64 + DataTo int64 + Equity []BacktestPoint + Error string + Extra json.RawMessage + From int64 + Open []BacktestOpen + Pairs []string + Processed int + Status string + Summary BacktestSummary + Timeframe string + To int64 + Trades []BacktestTrade + Warnings []string + type BacktestSummary struct + Fees float64 + FinalEquity float64 + Gross float64 + InitialBalance float64 + MaxDrawdown float64 + MaxDrawdownPct float64 + OpenProfit float64 + ProtectionMoves int + Realized float64 + Refused int + Trades int + type BacktestSymbol struct + Point float64 + SpreadPoint float64 + VolumeMin float64 + VolumeStep float64 + type BacktestTrade struct + ClosedAt int64 + Entry float64 + EntryReason string + Exit float64 + ExitReason string + Fees float64 + Gross float64 + Net float64 + OpenedAt int64 + Pair string + Quantity float64 + Side string + type Config struct + APIAddress string + Account *Account + BotStopped bool + ID int64 + Kind string + LLM *LLM + Mode string + Name string + News *News + Params map[string]string + Prompt *Prompt + Reanalysis bool + TelegramControl bool + TradePanel bool + func (c Config) CheckMT5Book(book MT5Book) error + func (c Config) MT5Book() MT5Book + func (cfg Config) Args() []string + type DecisionLink struct + DecisionID string + OrderID int64 + type DecisionRecord struct + Attachments []Attachment + Decision ui.Decision + type Entries struct + EntriesBlocked bool + EntriesPairs []string + EntriesReason string + EntriesRevision int64 + Exposure bool + PairsReason string + type ExposureAnswer struct + Granted bool + Reason string + type ExposureClaim struct + Pair string + Side string + type JournalRecord struct + At time.Time + Decision json.RawMessage + Error string + ID string + Input json.RawMessage + LatencyMS int64 + Model string + Pair string + Prompt *ui.DecisionPrompt + RequestedBy string + Trigger string + type LLM struct + APIKey string + BaseURL string + MaxTokens int + Model string + Params map[string]string + Provider string + ReasoningEffort string + type MT5Book struct + Bridge string + Comment string + Magic int64 + Pairs []string + func NewMT5Book(kind string, params map[string]string, account *Account) MT5Book + func (b MT5Book) Common(o MT5Book) []string + func (b MT5Book) Overlaps(o MT5Book) bool + type News struct + BlockAfter int + BlockBefore int + BlockImportance string + Enabled bool + Token string + URL string + type OrderIDs struct + First int64 + Last int64 + type OrderIDsRequest struct + Count int64 + type OutboxError struct + Error string + Index int + type OutboxRequest struct + Held int + NextAt time.Time + Pending int + Records []Record + SetApart int + type OutboxResponse struct + Acked uint64 + type PairGate struct + func (g *PairGate) Allows(pair string) (bool, string) + func (g *PairGate) Set(revision int64, pairs []string, reason string) bool + type Prompt struct + Content string + type PromptRef struct + ID int64 + Name string + Version int + type PromptStatus struct + Applied bool + At time.Time + Error string + Name string + PromptID int64 + Version int + type Protection struct + DailyStops []ui.DailyStop + ProtectionArms []ui.ProtectionArm + ProtectionSettings *ui.ProtectionSettings + type Record struct + At time.Time + Key string + Kind string + Payload json.RawMessage + Seq uint64 + type Remembered struct + Action string + At time.Time + Candle time.Time + Confidence float64 + Pair string + Reason string + type Runtime struct + News *News + Prompt *PromptRef + Reanalysis bool + TelegramControl bool + TradePanel bool + Version int64 + type Warmup struct + Candles int + References []string + Releases bool + Timeframe string