Skip to main content

Generate an html document containing all of the scripts and data to load tradingview and review the results

Project description

Jesse tradingview light reporting library

Generate an html document containing all of the scripts and data to load tradingview and review the results. This can be generated within a strategy at regular intervals to review the results live.

The library is published to pypi: https://pypi.org/project/JesseTradingViewLightReport/

So to install, from a command prompt where you would be running python:

pip install JesseTradingViewLightReport

Upgrade:

pip install JesseTradingViewLightReport --upgrade

To generate just the candlestick, volume, and order report - Add the following to your strategy:

import JesseTradingViewLightReport

	def terminate(self):
		JesseTradingViewLightReport.generateReport()

But you can also add custom data for example:

JesseTradingViewLightReport.generateReport(
	customData={
		"atr":{"data":self.atr, "options":{"pane":1, "colour":'rgba(251, 192, 45, 1)'}}, 
		'two':{"data":self.candles[:,1]-5, "options":{"pane":2}, "type":"HistogramSeries"}, 
		'three':{"data":self.candles[:,1]+5, "options":{"pane":2, "color":'purple'}}
	}
)

demo

Available types are:

  • LineSeries
  • HistogramSeries
  • AreaSeries
  • BaselineSeries

You may be able to use:

  • BarSeries
  • CandlestickSeries

For more information on plot types and options see:

For the moment, the data will need to be the same length as the number of candles you would receive from self.candles

The different panes can be resized by dragging them with the cursor.

It is also possible to change the candle colors to PVSRA candles with the option:

JesseTradingViewLightReport.generateReport(chartConfig={'isPvsra':True})

However, at the moment it is not possible to use multiple panes with this option. This restiction will be removed in a future release. demo2

It is possible to also plot the profit and loss with for example:

JesseTradingViewLightReport.generateReport(chartConfig={'pnl':True})

The generateReport function returns the relative location of the file. You can also find it inside where you're running the jesse strategy from there will be a folder called storage, inside that this plugin creates a folder called JesseTradingViewLightReport. Then each time you run a strategy with different parameters it will create a unique file called something like 77cbda27-6eec-48b6-90fb-621656d9e9d8.html

So in this example it'll be: c:/whereveryourunjesse/storage/JesseTradingViewLightReport/77cbda27-6eec-48b6-90fb-621656d9e9d8.html

CHANGELOG: 1.1.0 - added support for jesse 0.39.+, and added PNL calculation for all orders. With accumulated PNL plotting. 1.2.0 - Generate charts for live trading. 1.2.1 - Allow missing latest data in custom data. 1.2.2 - added trade ID to order data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

JesseTradingViewLightReport-1.2.2.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

JesseTradingViewLightReport-1.2.2-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file JesseTradingViewLightReport-1.2.2.tar.gz.

File metadata

File hashes

Hashes for JesseTradingViewLightReport-1.2.2.tar.gz
Algorithm Hash digest
SHA256 cb4b85355f4fcea6d458c33378d5467f86e6d6e0a63b31a0d9bd11bfabbad4f9
MD5 17c4fe2f7ccdcddb9083f3ac5f40a097
BLAKE2b-256 4e710f67b0ce4b32d65acfe018716d0e27a8d36a8773058ef47540905ff3a73b

See more details on using hashes here.

File details

Details for the file JesseTradingViewLightReport-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for JesseTradingViewLightReport-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 efc1c73c9c5452325092c195ec7d6a84f7f06a085425a80256f39284fece2bc5
MD5 7a65c8b9ea0d2e9316406a57f965f45c
BLAKE2b-256 1c68a36b449caed4658731e84c524f94d266df59636b7aac382cab74ce510524

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page