getMarkerColor function

Color getMarkerColor(
  1. MarkerProps props,
  2. MarkerStyle style
)

Returns the appropriate color of the marker based on its running state and profit/loss status.

Implementation

Color getMarkerColor(MarkerProps props, MarkerStyle style) {
  if (props.isRunning) {
    return style.lineDefaultColor;
  }
  return props.isProfit ? style.lineProfitColor : style.lineLossColor;
}