Skip to main content

HX112 - Chart Tools, Exports, and Bar Types

HyperionX charts are not just a candle surface. They carry utility windows, export paths, scale controls, drawing state, indicator output, and a bar-building engine. This lesson connects those features so a user can debug what the chart is showing and a script author can choose the right data foundation.

Goals

After this lesson you should be able to:

  • Use the chart utility windows without changing the strategy or indicator.
  • Export a reproducible chart dataset for research or support.
  • Export logs that include build, debug, and strategy output.
  • Pick the correct built-in bar type for the question being tested.
  • Understand where a custom bar builder fits in the platform.

Chart Utility Windows

Data Box

The Data Box is a read-only inspection window. It follows the chart context and shows the current date plus values grouped by chart panel, plot, and item. Use it when a plotted value looks wrong and you need to inspect the exact value under the cursor instead of guessing from the visual line.

The Data Box is useful for:

  • Checking OHLC and indicator values at a specific bar.
  • Verifying whether a plot is outputting zero, NaN, or a valid value.
  • Comparing multiple panel values without changing indicator code.

Chart Options

Chart Options is the visual control surface for the chart. It includes:

  • Chart style and chart style name.
  • Bar width.
  • Up/down body, outline, and wick colors.
  • Outline/wick dash style and width.
  • Auto scale.
  • Chart background presets.
  • Text, grid, marker, price line, and separator colors.
  • Price line visibility and style.
  • Scale justification.
  • Execution plotting colors and mode.

These settings belong in platform options, not inside indicator code. A good indicator should respect the chart theme and only own the visuals that are unique to that indicator.

Right Scale Properties

Right Scale Properties controls the price scale behavior for a chart pane. The current surface supports:

  • Automatic or fixed range.
  • Automatic, fixed, or hidden horizontal grid lines.
  • Grid spacing in points, ticks, or percent.
  • Fixed maximum and minimum values.
  • Horizontal and vertical grid colors and opacity.
  • Linear scale type.

Use fixed range only when the chart needs a controlled comparison. For normal trading and research, automatic range is safer because indicators, drawings, and price action can move outside a stale fixed scale.

Dataset Export

Chart Dataset Export writes the loaded chart candles and indicator outputs to CSV. The export is intended for research, debugging, model training, or support cases where someone must reproduce the exact chart state.

The exported base columns are:

  • symbol
  • timeframe
  • time
  • open
  • high
  • low
  • close
  • volume
  • bid_volume
  • ask_volume
  • trade_count
  • is_closed

HyperionX then appends indicator columns from loaded indicator plots. Column names are sanitized and made unique, so repeated indicators do not overwrite each other.

Export rules:

  • The chart must have loaded candles.
  • Indicator values are exported only when the series has a valid finite value for that bar.
  • Empty indicator cells are expected when a plot has not warmed up yet.
  • Export files are written as CSV and default to the user's HyperionX exports folder.

Log Export

Export Logs creates a support archive with the active platform logs. It includes:

  • Main log lines.
  • System debug lines.
  • Strategy output lines.
  • Build and error lines filtered from the combined logs.
  • A manifest with export time, app folder, log counts, and current file-log path.
  • Recent external log files found in HyperionX, Downloads, and Desktop locations.

Use this when diagnosing:

  • Code Lab compile failures.
  • Indicator or strategy exceptions.
  • Import freezes or long-running data tasks.
  • Workspace restore issues.
  • AI action failures.

Built-In Bar Types

The bar engine uses a registry of built-in and custom bar builders. Each builder publishes metadata so the Data Series window can know what source data is required and what default settings make sense.

Current built-in bar types:

Bar typeBuilt fromSource requirementNotes
TimeMinute base bars or ticksBase barsStandard time-based charting.
Heiken AshiMinute base barsBase barsTransforms normal candles into Heiken Ashi candles.
UniRenkoTick dataTrade ticksSupports replacing/removing the live brick while it forms.
RangeTick dataTrade ticksUses data series value as range ticks.
VolumeTick dataTrade ticksUses data series value as volume threshold.
Classic RenkoTick dataTrade ticksUses data series value as brick ticks.

This matters because a strategy can test very differently depending on the source requirement:

  • Time and Heiken Ashi can be built from minute-based data.
  • Renko, range, and volume bars need trade ticks to behave correctly.
  • Builders that support live-bar replacement can change the last bar while data is still forming.

Custom Bar Builders

Custom bar builders are platform extensions, not normal indicators. A custom builder implements IBarBuilder or derives from BarTypeBase.

The core methods are:

public override IReadOnlyList<BarUpdate> ProcessBaseBar(ICandle candle)
{
// Convert an incoming base candle into zero or more bar updates.
}

public override IReadOnlyList<BarUpdate> ProcessTick(MarketTick tick)
{
// Convert an incoming trade tick into zero or more bar updates.
}

public override IReadOnlyList<BarUpdate> Flush()
{
// Publish or close any pending bar when the stream ends.
}

A builder returns BarUpdate.Add, BarUpdate.UpdateLast, BarUpdate.ReplaceLast, or BarUpdate.RemoveLast. Those update types are important because the chart and calculation engine need to know whether a new bar was added or whether the current live bar changed.

Good custom builder rules:

  • Keep the builder deterministic for the same input sequence.
  • Do not perform network calls, file IO, sleeps, or WPF work inside bar processing.
  • Use instrument tick size from the builder context when converting ticks to price ranges.
  • Set metadata accurately, especially source requirement and default data series value.
  • Test with short histories and live-forming bars.

Acceptance Checklist

A chart or bar-type workflow is ready when:

  • The chart utility window shows the expected data without theme or selection problems.
  • Dataset export includes the expected candles and indicator columns.
  • Log export produces an archive that can be attached to a support issue.
  • The selected bar type matches the available historical data.
  • Tick-built bars are not tested from only minute data.
  • Any custom builder can process short, empty, and live-updating input without exceptions.