engine/formula/formula_ast library

Classes

AssignmentNode
Represents a variable assignment in a script: basis = sma(close, 20).
BinaryOpNode
Represents binary operators (+, -, *, /, %, ^, >, <, >=, <=, ==, !=, and, or).
ColorLiteralNode
Represents a color literal (e.g. #00E676, #FF5252).
FormulaNode
Base abstract class for all nodes in the Formula Abstract Syntax Tree (AST).
FunctionCallNode
Represents a function invocation (e.g. sma(close, 20), rsi(close, 14)).
HistoryOffsetNode
Represents historical bar indexing (e.g. close[1], high[2]).
NumberLiteralNode
Represents a numeric literal (e.g. 20, 3.14, -1.5).
PlotNode
Represents a plot(series, title="...", color=...) statement.
ScriptNode
Represents a complete multi-statement script.
SeriesVarNode
Represents a reference to a candle series variable (e.g. close, open, high, low, volume, hl2, hlc3, ohlc4).
StringLiteralNode
Represents a string literal (e.g. "Upper Band").
TernaryNode
Represents ternary conditional expressions: condition ? ifTrue : ifFalse.
UnaryOpNode
Represents unary prefix operators (e.g. -x, +x, not x, !x).