Firetron’s Candle

3 506 Views 2 Comments 2 years 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 2 years, 5 months ago by Firetron. Reason: Renamed IsDojiStar to IsLongLegged
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Renamed wicks to shadows. Change parameters from NumberType to ListNumberType
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Changed Index from ListNumberType to NumberType
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Renamed shadows to wicks
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Updated test script
    HaasScript Code
    Sign in or Register to download for free
  • Mandala Trading Competition Promotion Type: contest Expires: June 9, 2023 Exclusive
    Trading volume competition, win up to $10,000 USDT and bounties.
  • Earn Up to 200 BMEX Tokens Promotion Type: contest Expires: March 31, 2023
    15 BMEX @ $20,000, 25 BMEX @ $50,000, 50 [email protected] $200,000, 100 BMEX @ $400,000, 200 BMEX @ $600,000 in monthly derivatives volume
    • #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