-
-
Notifications
You must be signed in to change notification settings - Fork 192
Settings
Jonte edited this page Nov 15, 2023
·
2 revisions
The library has settings (global variables). These might change during an update, but have been fairly stable over time.
significant_decimals = 8 # how many digits to show
significant_eps = 1e-8 # default Y-step
max_zoom_points = 20 # number of visible candles when maximum zoomed in
axis_height_factor = {0: 2} # top axis is twice as tall as the others
clamp_grid = True # clamp crosshair by default, press g to toggle
right_margin_candles = 5 # whitespace at the right-hand side
side_margin = 0.5 # show half a period on each side of the center of a candle
lod_candles = 3000 # when to start sampling candles
lod_labels = 700 # when to start sampling candles
cache_candle_factor = 3 # factor extra candles rendered to buffer
y_pad = 0.03 # 3% padding at top and bottom of autozoom plots
y_label_width = 65 # Y-axis width
long_time = 2*365*24*60*60*1e9 # when X-axis skips over to showing years
display_timezone = None # default to local
winx,winy,winw,winh = 400,300,800,400 # (non-maximized) window positions
legend_border_color = '#777'
legend_fill_color = '#6668'
legend_text_color = '#ddd6'
soft_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']
hard_colors = ['#000000', '#772211', '#000066', '#555555', '#0022cc', '#ffcc00']
colmap_clash = ColorMap([0.0, 0.2, 0.6, 1.0], [[127, 127, 255, 51], [0, 0, 127, 51], [255, 51, 102, 51], [255, 178, 76, 51]])
foreground = '#000'
background = '#fff'
odd_plot_background = '#fff'
candle_bull_color = '#26a69a'
candle_bear_color = '#ef5350'
candle_bull_body_color = background
volume_bull_color = '#92d2cc'
volume_bear_color = '#f7a9a7'
volume_bull_body_color = volume_bull_color
volume_neutral_color = '#bbb'
poc_color = '#006'
band_color = '#d2dfe6'
cross_hair_color = '#0007'
draw_line_color = '#000'
draw_done_color = '#555'
They control the guts of the lib.
app = None # PyQt app
windows = [] # holds all active windows
timers = [] # holds all active timers
sounds = {} # holds all active sounds
epoch_period = 1e30 # default time between candles to something large
last_ax = None # always assume we want to plot in the last axis, unless explicitly specified
overlay_axs = [] # for keeping track of candlesticks in overlays
viewrestore = False # controlled via autoviewrestore()
master_data = {} # lookup if embedding in your own PyQt window
- Finance Plot
- Examples
-
Snippets
- Background color
- Unordered time series
- Restore the zoom at startup
- Time zone
- Scatter plot with X-offset
- Align X-axes
- Disable zoom/pan sync between axes
- Move viewport along X-axis (and autozoom)
- Place Region of Interest (ROI) markers
- More than one Y-axis in same viewbox
- Plot non-timeseries
- Custom crosshair and legend
- Custom axes ticks
- Saving screenshot
- Scaling plot heights
- Threading
- Titles on axes
- Fixing auto-zoom on realtime updates
- Playing sound
- Keys
- Missing snippets
- Coffee