chartPatternBullish function
Which way a chart pattern conventionally resolves — drives its color. Symmetrical triangles can break either way.
Implementation
bool? chartPatternBullish(ChartPatternType t) => switch (t) {
ChartPatternType.doubleBottom ||
ChartPatternType.inverseHeadAndShoulders ||
ChartPatternType.ascendingTriangle ||
ChartPatternType.fallingWedge ||
ChartPatternType.bullFlag ||
ChartPatternType.cupAndHandle => true,
ChartPatternType.doubleTop ||
ChartPatternType.headAndShoulders ||
ChartPatternType.descendingTriangle ||
ChartPatternType.risingWedge ||
ChartPatternType.bearFlag => false,
ChartPatternType.symmetricalTriangle => null,
};