ofc_candle.php 658 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. include_once 'ofc_bar_base.php';
  3. class candle_value
  4. {
  5. /**
  6. *
  7. */
  8. function candle_value( $high, $open, $close, $low )
  9. {
  10. $this->high = $high;
  11. $this->top = $open;
  12. $this->bottom = $close;
  13. $this->low = $low;
  14. }
  15. function set_colour( $colour )
  16. {
  17. $this->colour = $colour;
  18. }
  19. function set_tooltip( $tip )
  20. {
  21. $this->tip = $tip;
  22. }
  23. }
  24. class candle extends bar_base
  25. {
  26. function candle($colour, $negative_colour=null)
  27. {
  28. $this->type = "candle";
  29. parent::bar_base();
  30. $this->set_colour( $colour );
  31. if(!is_null($negative_colour))
  32. $this->{'negative-colour'} = $negative_colour;
  33. }
  34. }