Eleven-Trading / TradeNote

TradeNote is an open source trading journal that helps traders store, discover and recollect all their trades so they can become and remain consistent and profitable traders
https://tradenote.co
GNU General Public License v3.0
344 stars 107 forks source link
dashboard journal trading

TradeNote

- Open Source Trading Journal -

The project

About

There are numerous great and very powerful trading journals out there. However, I wanted to build a journal for traders who care about data security and privacy but also for individuals that need simplicity and flexibility.

By creating and sharing TradeNote as an open source project, I hope to help other days traders like myself store, discover and recollect trade patterns so they can become and remain consistent and profitable traders.

dashboard

Project

Contact

For support or feedback, feel free to join our Discord, or create an issue on this repository.

Join the emailing list to receive news about updates and new features.

Upcoming features

You can see upcoming features and project development on the project page.

Built with

TradeNote is a responsive website that runs on VueJs, JS and HTML and uses Parse for its backend.

Coffee

If you like this project, please 🌟 this repository and don't hesitate to show me the money love ;)

Buy Me a Coffee at ko-fi.com

Star History Chart

TradeNote

Structure

TradeNote is divided in 2 sections, each being an essential building block for becoming a consistent trading and managing your trading business.

Analyze

TradeNote offers a dashboard, daily view and calendar view so you can measure your progress. You can easily filter your trades by month or date range.

Reflect

With TradeNote you can keep a daily diary of your trading journey to work on your trader psychology as well as add annotated screenshots of interesting setups or your entries. You can also write your (yearly) playbook.

Trades, Assets and Brokers

Supported trades

TradeNote supports intraday and swing trades but keep in mind that the project arose from a personal need and as such is most widely used (and tested) for intraday stock trades (using TradeZero Broker).

Supported Assets.

Depending on the broker and thanks to the contribution of the community, you can import and journal the following assets in TradeNote: Stocks, Futures, Options (only tested on single options) and Forex.

Supported Brokers

Please look at the brokers folder to see the list of supported brokers and instructions for exporting and importing to TradeNote.

You can contact me via Discord if you wish to integrate your broker.

Alternatively, you can use the template and adapt it to your export file.

Screenshots

Dashboard

dashboard

Daily Page

On daily page you can see your trades per day. You can add tags and a note to each of you trades. Moreover, you can specify your satisfaction with the trade (for example if you followed or not your rules) with thumbs up or down.

Add Trade Information Daily Page

Diary Page

Besides notes for every trade, you can record things related to your every day trading, like feelings, moods and emotions or more technical related issues like patterns, in order to make important discoveries.

Add Journal Entry

Journal Page

Add Screenshots

Upload screenshots of you trades ("Entry" option) or simply an interesting setup you have identified ("Setup" option) and make annotations for further analysis.

Add Screenshot

Screenshots Page

Setup

Installation

âť—Important Notice âť—

MongoDB

TradeNote uses MongodDB as its database. Please make sure to follow MongoDB's recommendations and requirements before installing and running TradeNote with MongoDB.

For detailed information, please read MongdoDB's production notes .

RaspberryPi

Some users have experienced issues running MongoDB on a Raspberry Pi. At the time of writing, they managed to make it work using v4.4.8 of MongoDB rather than the latest version.

Windows with Ubuntu VM

MongoDB 5.0+ version is (currently) not compatible with Ubuntu VM on windows platform. Indeed, MongoDB 5.0+ needs a CPU that supports AVX, which seems like a known issue with latest version of MongoDB 5.0+ and Windows+Ubuntu VM. A workaround is to use MongoDB 4.4.18 (last known version that does not need AVX support) in the docker compose file.

Other issues

Here is the list of the other, most common issues

If you have any other issues, please visite the Discord #installation channel and use the search bar to see if your issue has already been discussed.

Docker Compose (recommended)

Requirements

Installation

  1. Download the docker compose.yml file
  2. Run docker compose up -d

This will automatically setup the database (mongodDB) and the TradeNote app.

You can then access the website on http://localhost:8080.

If you cannot access the website, please refer to the importante notice above (and try changing the mongo version) or get support via Discord

Docker

Requirements

Installation

You need to have a running MongoDB database. Please see their Docker Hub for instructions.

Then, run the TradeNote image with its environment variables.

docker run \
    -e MONGO_URI=<mongo_uri> \
    -e TRADENOTE_DATABASE=<tradenote_database>
    -e APP_ID=<app_id> \
    -e MASTER_KEY=<master_key> \
    -e TRADENOTE_PORT=<tradenote_port> \
    -p <tradenote_port>:<tradenote_port> \
    --name tradenote_app \
    -d eleventrading/tradenote

Local installation (advanced)

Docker

If you want to run the latest version of TradeNote you can also build the image locally, directly from GitHub repository.

  1. Clone from github
  2. cd into TradeNote directory
  3. Run
    • For Docker Compose : Run docker compose -f docker compose-local.yml up -d
    • For Docker: run docker build -f docker/Dockerfile . -t tradenote:<tag>

Dev Mode

  1. Clone the project (Master or Beta branch)
  2. cd into your project
  3. Run npm install
  4. Run APP_ID=xxx MASTER_KEY=xxx ANALYTICS_OFF="true" MONGO_USER=xxx MONGO_PASSWORD=xxx TRADENOTE_DATABASE=xxx MONGO_URL=xxx MONGO_PORT=xxx TRADENOTE_PORT=xxx NODE_ENV='dev' node index.mjs

First Steps

Registering a User

Start by registering a user. Visit http://localhost:8080/register to register a TradeNote user.

Importing Trades

Instructions

Please make sure to follow the instructions in the brokers folder for exporting and importing trades.

Community members have also created custom scripts to convert export files to fit the template in custom scripts.

Swing trades

âť—Important Noticeâť—

Avoiding P&L Discrepancy

To avoid open positions and/or P&L Discrepancy when importing swing trades, please make sure of the following.

  1. Begin importing from a point in time where you were flat (no previous open positions). If you begin importing from a point in time where you had pre-existing positions, there is a chance the data will be incorrect as TradeNote doesn’t know about these existing positions.
  2. Alternatively, before importing your file, if you know it contains execution(s) from an open position (and that you're closing or adding to), simply remove that/these execution(s).

Example 1 (recommended)

Example 2 (advanced)

P&L Calculation and View

When you have an open trade you will see "Open" in the time column on the daily page and "Closed" when the swing trade has been closed. Hover your mouse over the question mark to get information when the trade was opened and closed.

P&L as well as partial close is calculated on the closing day.

Updating

The following information is just for your convienance. We encourage you to make your own research on how to update running applications.

Using Docker Compose

  1. Pull the latest Docker image: You can do this by running docker compose pull < service-name > in your terminal. This command will pull the latest image for the specified service from the Docker registry.
  2. Stop the running service: You can stop the running service with the command docker compose stop < service-name >. This will stop the service without removing it.
  3. Remove the existing container: You can remove the existing container with the command docker compose rm < service-name >. This will remove the stopped container.
  4. Start the service with the updated image: You can start the service with the updated image with the command docker compose up -d < service-name >. The -d flag runs the container in detached mode, which means it will run in the background.
  5. Verify the update: You can verify that the update was successful by checking the logs of the container with the command docker compose logs < service-name > or by checking the running service's behavior.

Remember to replace < service-name> with the name of your service as defined in your docker compose.yml file.

This is a general process and may vary depending on the specifics of your application and your Docker Compose setup. Always make sure to test your changes in a safe environment before deploying them to production.

Using Docker

  1. Pull the latest Docker image: You can do this by running docker pull < image-name >:< tag > in your terminal. This command will pull the latest version of the specified image from Docker Hub.
  2. Stop the running container: You can stop the running container with the command docker stop < container-id >. Replace < container-id > with the ID of the running container.
  3. Remove the existing container: You can remove the existing container with the command docker rm < container-id >. Replace < container-id > with the ID of the stopped container.
  4. Start a new container with the updated image: You can start a new container with the updated image with the command docker run < image-name >:< tag >. Replace < image-name > and < tag > with the name and tag of the updated image.
  5. Verify the update: You can verify that the update was successful by checking the logs of the container with the command docker logs < container-id > or by checking the running container's behavior.

Remember to replace < image-name >, < tag >, and < container-id > with the appropriate values for your application and Docker setup.

This is a general process and may vary depending on the specifics of your application and your Docker setup. Always make sure to test your changes in a safe environment before deploying them to production.

TradeNote API (Experimental)

TradeNote provides an API so that you can setup an auto import of your trades. Please note that this a very experimental feature AND unfortunately, I will not be able to provide support on how to make a POST request.

POST /api/trades

Base url: < your tradenote url >

The trades endpoint allows you to import trade executions directly to the database.

Headers

Request Body

Side note

Parse

This project uses Parse as its backend framework, for the following reasons:

  1. Manage the authentication (flow)
  2. Parse is a great framework for all API communications with the mongo database
  3. Parse acts as the server so that TradeNote does not need to run any server on its own, making it faster and lighter.

Viewing the database (optional)

Additionally, if you want to view and manage the database, you can use MongoDB Compass or install and run the Parse Dashboard.

PostHog

This projects uses PostHog as its product analytics suite to collect anonymous analytics about TradeNote installations and page views. This helps me better understand if and how people are using TradeNote and evaluate the outreach of my project. If you want to opt-out of this program, you can simply add -e ANALYTICS_OFF=true when running the docker image.

Backup data

Persistent data

During installation, mongoDB runs with persistent data. This way, if you restart or update your mongoDB container, your data will not be lost.

Backup mongoDB

Additionally, you can, and should, backup your database.

For convenience, here is an example using s3cmd for backing up your database. As this is not part of the TradeNote projet, I will unfortunately not be able to provide support on this part. But you will find more information about this on google and stackoverflow.

  1. Install s3cmd
  2. Configure the s3cfg config file
  3. Run the bash file with the correct variables

Contribute

I'm a trader and recreational developer. My days are very packed but I will do my best to answer your questions and update the code when needed. As such, do not hesitate to contact me if you would like to contribute and help improve this project. Things to work on and improve:

License

This project is open sourced under the GNU GPL v3 licence.