Graphics.Rendering.Chart.Plot.Candle

Chart-1.9.5: A library for generating 2D Charts and Plots

Copyright | (c) Tim Docker 2006 2014
License | BSD-style (see chart/COPYRIGHT)
Safe Haskell | None
Language | Haskell98

Graphics.Rendering.Chart.Plot.Candle

Description

Candlestick charts for financial plotting

Synopsis

- data PlotCandle x y = PlotCandle {
  - _plot_candle_title :: String
  - _plot_candle_line_style :: LineStyle
  - _plot_candle_fill :: Bool
  - _plot_candle_rise_fill_style :: FillStyle
  - _plot_candle_fall_fill_style :: FillStyle
  - _plot_candle_tick_length :: Double
  - _plot_candle_width :: Double
  - _plot_candle_centre :: Double
  - _plot_candle_values :: [Candle x y]
  }
- data Candle x y = Candle {
  - candle_x :: x
  - candle_low :: y
  - candle_open :: y
  - candle_mid :: y
  - candle_close :: y
  - candle_high :: y
  }
- plot_candle_title :: forall x y f. Functor f => (String -> f String) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_line_style :: forall x y f. Functor f => (LineStyle -> f LineStyle) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_tick_length :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_width :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_centre :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_fill :: forall x y f. Functor f => (Bool -> f Bool) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_rise_fill_style :: forall x y f. Functor f => (FillStyle -> f FillStyle) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_fall_fill_style :: forall x y f. Functor f => (FillStyle -> f FillStyle) -> PlotCandle x y -> f (PlotCandle x y)
- plot_candle_values :: forall x1 y1 x2 y2 f. Functor f => ([Candle x1 y1] -> f [Candle x2 y2]) -> PlotCandle x1 y1 -> f (PlotCandle x2 y2)

# Documentation

data PlotCandle x y #

Value defining a financial interval: opening and closing prices, with maxima and minima; and a style in which to render them. By convention, there are different fill styles depending on whether the price rises (open < close) or falls (close < open). (This plot type can also be re-purposed for statistical intervals, e.g. minimum, first quartile, median, third quartile, maximum.)

Constructors

PlotCandle |
Fields _plot_candle_title :: String _plot_candle_line_style :: LineStyle _plot_candle_fill :: Bool _plot_candle_rise_fill_style :: FillStyle _plot_candle_fall_fill_style :: FillStyle _plot_candle_tick_length :: Double _plot_candle_width :: Double _plot_candle_centre :: Double _plot_candle_values :: [Candle x y]

#### Instances

Instances details

ToPlot PlotCandle # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Candle Methods toPlot :: PlotCandle x y -> Plot x y #
Default (PlotCandle x y) # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Candle Methods def :: PlotCandle x y #

data Candle x y #

A Value holding price intervals for a given x-coord. An alternative view is that these are statistical intervals: the 0th, 25th, 50th, 75th, and 100th percentiles.

Constructors

Candle |
Fields candle_x :: x candle_low :: y candle_open :: y candle_mid :: y candle_close :: y candle_high :: y

#### Instances

Instances details

(Show x, Show y) => Show (Candle x y) # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Candle Methods showsPrec :: Int -> Candle x y -> ShowS # show :: Candle x y -> String # showList :: [Candle x y] -> ShowS #

plot_candle_title :: forall x y f. Functor f => (String -> f String) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_line_style :: forall x y f. Functor f => (LineStyle -> f LineStyle) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_tick_length :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_width :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_centre :: forall x y f. Functor f => (Double -> f Double) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_fill :: forall x y f. Functor f => (Bool -> f Bool) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_rise_fill_style :: forall x y f. Functor f => (FillStyle -> f FillStyle) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_fall_fill_style :: forall x y f. Functor f => (FillStyle -> f FillStyle) -> PlotCandle x y -> f (PlotCandle x y) #

plot_candle_values :: forall x1 y1 x2 y2 f. Functor f => ([Candle x1 y1] -> f [Candle x2 y2]) -> PlotCandle x1 y1 -> f (PlotCandle x2 y2) #