Skip to content

mitcheccles/tensortrade_dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Why?

Because I want to visualize trades in simulation runs.

How?

Using Dash; a framework for building apps and dashboards with plotly.

The dashboard in this repo works by creating a dash app, and running it on a thread, so not to block the execution of training. The graph is updated every 100 milliseconds via a callback setup on the dash app.

Steps:

  1. import and create a dashboard in your training file or agent file:
import dashboard
import threading

ds = dashboard.DashboardServer()
t = threading.Thread(target=ds.run)
t.start()
  1. Setup an environment with a PlotlyTradingChart renderer

  2. In your training loop, after you call env.render() do:

dashboard.dashboard.update_figure(env.renderer.fig)

What?

Run:

python3 example.py

To view the graph goto localhost:8050

Live trading visualization

About

A simple dashboard for graphing tensortrade simulations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages