Firetron’s Candle

3 197 Views 2 Comments 7 months ago
  • Creates and returns a Candle Class instance. Note that every property is a getter function.

    Test Script

    function Test()
      local closePrices = ClosePrices()
      local highPrices  = HighPrices()
      local lowPrices   = LowPrices()
      local openPrices  = OpenPrices()
      local candle      = CC_Candle(openPrices, highPrices, lowPrices, closePrices)
      Log('-----------')
      Log('Next Candle')
      Log('-----------')
      Log('IsGreen: '..Parse(candle.IsGreen(), StringType))
      Log('IsRed: '..Parse(candle.IsRed(), StringType))
      Log('IsDoji: '..Parse(candle.IsDoji(), StringType))
      Log('IsDragonfly: '..Parse(candle.IsDragonfly(), StringType))
      Log('IsGravestone: '..Parse(candle.IsGravestone(), StringType))
      Log('IsLongLegged: '..Parse(candle.IsLongLegged(), StringType))
      Log('Full: '..candle.Full())
      Log('Body: '..candle.Body())
      Log('Wicks: '..candle.Wicks())
      Log('TopWick: '..candle.TopWick())
      Log('BottomWick: '..candle.BottomWick())
      Log('WithoutTopWick: '..candle.WithoutTopWick())
      Log('WithoutBottomWick: '..candle.WithoutBottomWick())
    end
    OptimizedForInterval(360, Test)
    • This topic was modified 6 months, 3 weeks ago by Firetron. Reason: Renamed IsDojiStar to IsLongLegged
    • This topic was modified 6 months, 3 weeks ago by Firetron. Reason: Renamed wicks to shadows. Change parameters from NumberType to ListNumberType
    • This topic was modified 6 months, 3 weeks ago by Firetron. Reason: Changed Index from ListNumberType to NumberType
    • This topic was modified 6 months, 2 weeks ago by Firetron. Reason: Renamed shadows to wicks
    • This topic was modified 6 months, 2 weeks ago by Firetron. Reason: Updated test script
    HaasScript Code
    Sign in or Register to view
    • #1615
      Kobalt
      Basic
      Up
      1
      Down

      KABOOM! great!

    • #1619
      pshai
      Admin
      Up
      1
      Down

      Nice work! This is great for breaking down candles.

Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free