API documentation for tradeexecutor.visual.single_pair.visualise_single_pair Python function.
- visualise_single_pair(state, candle_universe, start_at=None, end_at=None, pair_id=None, height=800, axes=True, technical_indicators=True, title=True, theme='plotly_white', volume_bar_mode=VolumeBarMode.overlay, vertical_spacing=0.05, subplot_font_size=11, relative_sizing=None, volume_axis_name='Volume USD', candle_decimals=4, detached_indicators=True)#
Visualise single-pair trade execution.
The recorded state of the strategy execution.
You must give either state or positions.
The visualised pair in the case the strategy contains trades for multiple pairs.
If the strategy contains trades only for one pair this is not needed.
height – Chart height in pixels
axes – Draw axes labels
Extract technical indicators from the state and overlay them on the price action.
Only makes sense if the indicators were drawn against the price action of this pair.
Draw the chart title.
Set to string to give your own name.
Set True to use the state name as a title. TODO: True is a legacy option and will be removed.
theme – Plotly colour scheme to use
volume_bar_mode – How to draw the volume bars
vertical_spacing – Vertical spacing between the subplots. Default is 0.05.
subplot_font_size – Font size of the subplot titles. Default is 11.
Optional relative sizes of each plot. Starts with first main candle plot, then the volume plot if it is detached, then the other detached technical indicators.
e.g. [1, 0.2, 0.3, 0.3] would mean the second plot is 20% the size of the first, and the third and fourth plots are 30% the size of the first.
Remember to account for whether the volume subplot is detached or not. If it is detached, it should take up the second element in the list.
volume_axis_name (str) – Name of the volume axis. Default is “Volume USD”.
candle_decimals (int) – Number of decimal places to round the candlesticks to. Default is 4.
detached_indicators (bool) – If set, draw detached indicators. Has no effect if technical_indicators is False.
- Return type: