KagiChart

KagiChart[{{date1, p1}, {date2, p2}, ...}]
makes a Kagi chart with prices at date .

KagiChart[{"name", daterange}]
makes a Kagi chart of closing prices for the financial entity over the date range daterange.

KagiChart[{...}, rt]
makes a Kagi chart with reversal threshold rt.

Details and OptionsDetails and Options

  • A Kagi chart is drawn as a series of vertical lines connected by horizontal lines. Prices are drawn in a column until the price reverses by more than the threshold rt, when a new column is started with a horizontal line connecting to the previous column.
  • The style of the lines changes when the price rises above the high of the previous column or drops below the low of the previous column.
  • KagiChart[...] is equivalent to KagiChart[..., {"Relative", 0.02}] for a reversal threshold of 2% of the average price.
  • The following arguments can be used to specify the reversal threshold rt:
  • {"Percent",p}percent of previous price
    {"Relative",p}fraction of price range (default)
    {"Absolute",p}absolute price change
  • The dates are considered an ordered sequence of events and are not shown on an absolute time scale.
  • The date formats for are the same as used in DateListPlot.
  • The and daterange are the same as used in FinancialData.
  • Data elements for KagiChart can be given in the following forms:
  • {datei,pi}a pure date-price pair
    wi[{datei,pi},...]a date-price pair and wrapper
    formi->mia date-price pair with metadata
  • A line segment may represent several date-price pairs, and the corresponding wrappers will apply to the entire line segment.
  • Data not given in these is taken to be missing and typically is excluded when generating the chart.
  • Data for KagiChart can be given in the following forms:
  • {e1,e2,...}list of elements with or without wrappers
    w[{e1,e2,...}]wrapper applied to the whole data
  • The following wrappers can be used for data elements:
  • Annotation[e,label]provide an annotation
    Button[e,action]define an action to execute when the element is clicked
    EventHandler[e,...]define a general event handler for the element
    Hyperlink[e,uri]make the element act as a hyperlink
    Labeled[e,...]display the element with labeling
    PopupWindow[e,cont]attach a popup window to the element
    StatusArea[e,label]display in the status area when the element is moused over
    Style[e,opts]show the element using the specified styles
    Tooltip[e,label]attach an arbitrary tooltip to the element
  • In KagiChart, Labeled and Placed allow the following positions:
  • Above, Below, Before, Afterpositions outside point or figure
    {lx,ly}scaled position in the label
  • KagiChart has the same options as Graphics with the following additions and changes:
  • AspectRatio1/GoldenRatiooverall ratio of width to height
    AxesTruewhether to draw axes
    ChartBaseStyleAutomaticoverall style for bars
    DateFunctionAutomatichow to convert dates to standard form
    EventLabelsNoneevents to label
    GridLinesAutomaticgrid lines to draw
    GridLinesStyleAutomaticstyle for grid lines
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    TrendStyleAutomatichow to style up and down trends
    ScalingFunctionsNonehow to scale the y axis
  • With ScalingFunctions->sy, the function is applied to the prices. ScalingFunctions only affects the display and none of the controls.
  • Style and other specifications from options and other constructs in KagiChart are effectively applied in the order TrendStyle, Style and other wrappers, with later specifications overriding earlier ones.
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »