Skip to main content

TradeExplanation

Why a bot took one trade.

type TradeExplanation {
tradeId: ID!
botId: ID!
pair: String!
timeframe: String!
isShort: Boolean!
openDate: Time!
closeDate: Time
enterTag: String!
exitReason: String!
entry: TradeExplanationBranch
exit: TradeExplanationBranch
signalCandleAt: Time
close: Float
values: [TradeIndicatorValue!]!
source: TradeExplanationSource!
replay: TradeReplayInfo
}

Fields​

TradeExplanation.tradeId ● ID! non-null scalar​

TradeExplanation.botId ● ID! non-null scalar​

TradeExplanation.pair ● String! non-null scalar​

TradeExplanation.timeframe ● String! non-null scalar​

TradeExplanation.isShort ● Boolean! non-null scalar​

TradeExplanation.openDate ● Time! non-null scalar​

TradeExplanation.closeDate ● Time scalar​

TradeExplanation.enterTag ● String! non-null scalar​

TradeExplanation.exitReason ● String! non-null scalar​

TradeExplanation.entry ● TradeExplanationBranch object​

The entry branch the enter tag names; null when it names none.

TradeExplanation.exit ● TradeExplanationBranch object​

The exit branch, for an exit on an exit signal; null for ROI, stoploss and the like.

TradeExplanation.signalCandleAt ● Time scalar​

Open time of the candle whose values fired the entry (the one before the entry candle).

TradeExplanation.close ● Float scalar​

The signal candle's close, when read.

TradeExplanation.values ● [TradeIndicatorValue!]! non-null object​

TradeExplanation.source ● TradeExplanationSource! non-null enum​

TradeExplanation.replay ● TradeReplayInfo object​

The trade's latest replay of the version the bot runs; null when none was asked for, or when the caller lacks workspace__strategy__read on the bot's strategy (the replay is that strategy's backtest).

Returned By​

explainTrade query