PlotVarColor CC – plot() with a variable color input (like on TradingView)

0 766 Views 1 Comment 2 years ago
  • When converting from PineScript to HaasScript, it’s pretty common to find colors changing on some condition.

    This function imitates TV’s variable color plotting (including the weird color extension backward when a new colored datapoint comes in).

    Also has built-in PlotCircle and PlotBars capability as an optional parameter.
    PlotHistogram may require some tinkering.

    Accepts LineOptions() with a variable color inside.

    Best when used inside an OptimizedForInterval function, which will significantly speed up the calculation time.

    HaasScript Code
    Sign in or Register to download for free
  • HaasOnline Black Friday Sale Promotion Type: Sale Expires: December 7, 2023 24:00 UTC
    For a limited-time get up to 50% off monthly and 30% off annual plans.
  • Bybit
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free