PromptHub
Back to Blog
Open Source Fintech

Stop Leaking Your Trades to Big Tech! TradeNote Exposed

B

Bright Coding

Author

11 min read 66 views
Stop Leaking Your Trades to Big Tech! TradeNote Exposed

Your trading data is worth millions. So why are you giving it away for free?

Every single trade you log, every pattern you discover, every edge you painstakingly develop—it's all being harvested. Not by market makers. Not by your broker. By the "free" trading journal you happily signed up for. That sleek SaaS platform with the monthly subscription? It's building a behavioral profile on you so detailed it would make the NSA jealous. Your entries, your exits, your emotional state at 9:47 AM on a volatile Tuesday—it's all in their database, ready to be sold, leaked, or subpoenaed.

But what if I told you there's a better way? A way to keep every byte of your trading intelligence locked down on hardware YOU control? Enter TradeNote, the open source trading journal that's making privacy-obsessed traders ditch the cloud in droves. No data mining. No vendor lock-in. No praying that next week's breach notification doesn't include your account. Just pure, unadulterated data sovereignty with the simplicity and flexibility that serious traders actually need.

Built by a day trader who was sick of choosing between powerful analytics and personal privacy, TradeNote is the self-hosted revolution the trading community didn't know it was waiting for. And the best part? You can have it running in under five minutes. Ready to take back control? Let's dive deep.


What is TradeNote? The Open Source Trading Journal That Puts You First

TradeNote is an open-source trading journal designed from the ground up for traders who refuse to compromise on data privacy and security. Created by Eleven Trading—a developer who actually trades, not some Silicon Valley team speculating about what traders want—this tool solves a problem that the industry has conveniently ignored: your trade data is your competitive advantage, and it deserves fortress-level protection.

The project emerged from a simple, infuriating observation. Existing trading journals fall into two broken categories: (1) cloud-based SaaS tools that monetize your data while charging monthly fees, or (2) clunky spreadsheet templates that require a PhD in Excel to generate basic analytics. TradeNote obliterates this false choice by delivering enterprise-grade journaling with consumer-grade simplicity—all while keeping your data under your complete control.

What makes TradeNote genuinely revolutionary isn't just its privacy architecture. It's the recognition that traders need flexibility without complexity. The platform supports multiple brokers, adapts to your timezone, and structures your trade history so you can actually learn from it. Pattern recognition—the holy grail of trading consistency—becomes effortless when your data is organized, searchable, and exclusively yours to analyze.

The project is actively maintained with a thriving Discord community and licensed under GNU GPL v3, meaning it will remain free and open forever. No freemium traps. No feature gates. Just a tool that respects both your intelligence and your privacy.


Key Features: Why TradeNote Outperforms Proprietary Journals

TradeNote isn't a stripped-down alternative to expensive tools—it's a superior architecture for serious traders. Here's what separates it from the pack:

  • Complete Data Sovereignty: Your trades live on YOUR infrastructure. No third-party access, no analytics sharing, no "anonymized" datasets that can be re-identified. Your edge stays YOUR edge.

  • Docker↗ Bright Coding Blog-Native Deployment: One command and you're operational. TradeNote's containerized architecture eliminates dependency hell and makes backups, migrations, and scaling trivial.

  • MongoDB Backend: A battle-tested NoSQL database that handles unstructured trade data with blistering performance. Store screenshots, notes, market conditions—whatever your analysis demands.

  • Multi-Broker Support: Import from diverse trading platforms with standardized formatting. The brokers documentation covers export procedures for seamless migration.

  • Timezone Intelligence: Critical for traders operating across sessions or managing multiple accounts. TradeNote timestamps everything correctly, preventing the costly analysis errors that timezone confusion creates.

  • Pattern Discovery Engine: Structured data storage enables retrospective analysis that surface recurring behaviors—both profitable patterns to exploit and destructive habits to eliminate.

  • Zero External Dependencies: Once deployed, TradeNote functions entirely offline. No API keys to manage, no service outages disrupting your review session, no vendor going out of business and taking your history with them.

  • GPL v3 Licensed: The code is yours to inspect, modify, and extend. Find a bug? Fix it. Need a feature? Build it. Want to fork for a proprietary internal tool? The license permits commercial derivatives.


Real-World Use Cases: Where TradeNote Dominates

1. The Privacy-Paranoid Prop Trader

You're managing seven-figure capital and your strategies are proprietary enough that competitors would pay dearly for them. Every cloud journal is an unacceptable attack surface. TradeNote on a hardened VPS with restricted SSH access becomes your impenetrable vault—accessible globally, controllable completely.

2. The Multi-Session Forex Trader

Trading London open through New York close while living in Bangkok? Timezone mishandling has cost you before—misattributed entries that made morning discipline look like afternoon recklessness. TradeNote's per-account timezone configuration eliminates this entirely, giving you accurate performance attribution by session.

3. The Quant Developing New Strategies

You're backtesting in Python↗ Bright Coding Blog, executing via Interactive Brokers, and journaling should integrate cleanly. TradeNote's MongoDB backend accepts direct data insertion via scripts. Build automated pipelines that log synthetic trades, forward tests, and live results in one unified system—with zero API rate limits or data retention policies to navigate.

4. The Trading Educator Building a Course

You need to demonstrate real performance without exposing student data or depending on platforms that might censor or disappear. Self-hosted TradeNote lets you create sanitized, exportable journals that prove your edge while maintaining complete narrative control.

5. The Compliance-Conscious Fund Manager

Regulatory requirements demand trade documentation with audit trails you actually possess. TradeNote's containerized deployment creates reproducible environments—critical for demonstrating due diligence to regulators or investors.


Step-by-Step Installation & Setup Guide

TradeNote offers two deployment paths depending on your infrastructure preferences. Both assume basic Docker familiarity—if you're new to containers, the Docker Compose route is your friend.

Method 1: Docker Compose (Recommended)

Requirements:

  • Docker Engine 20.10+
  • Docker Compose 2.0+

Installation:

  1. Download the compose configuration:

    # Create project directory
    mkdir tradenote && cd tradenote
    
    # Fetch official docker-compose.yml
    curl -O https://raw.githubusercontent.com/Eleven-Trading/TradeNote/main/docker-compose.yml
    
  2. Launch the stack:

    docker compose up -d
    

    This single command provisions MongoDB and the TradeNote application with sensible defaults.

  3. Access your journal: Navigate to http://localhost:8080 and complete initial user registration at /register.

Troubleshooting: MongoDB version conflicts occasionally surface on older kernels. If the application fails to connect, specify an earlier Mongo image tag in docker-compose.yml and restart.

Method 2: Manual Docker Deployment

For environments with existing MongoDB infrastructure or custom networking requirements:

Requirements:

Environment Configuration:

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

Critical Environment Variables Explained:

Variable Purpose Example
MONGO_URI Full connection string with auth credentials mongodb://tradenote:tradenote@mongo:27017/tradenote?authSource=admin
TRADENOTE_DATABASE Logical database name within MongoDB tradenote
APP_ID Application identifier for backend authentication your-random-string-12345
MASTER_KEY Root-level access key for administrative operations another-random-string-67890
TRADENOTE_PORT Exposed service port 8080

Security Hardening: Generate cryptographically random strings for APP_ID and MASTER_KEY:

# Generate secure random values
openssl rand -hex 32  # Use output for APP_ID
openssl rand -hex 64  # Use output for MASTER_KEY

Store these in a .env file with restrictive permissions (chmod 600) and reference via Docker's --env-file flag rather than inline exposure.


REAL Code Examples: TradeNote in Action

Let's examine actual implementation patterns from the TradeNote repository, with detailed commentary on production deployment.

Example 1: Docker Compose Complete Stack

The official docker-compose.yml orchestrates multi-container deployment with persistent storage:

version: '3.8'

services:
  mongo:
    image: mongo:latest  # Pin to specific version in production!
    container_name: tradenote_mongo
    restart: unless-stopped
    volumes:
      - mongo_data:/data/db  # Named volume survives container recreation
    environment:
      MONGO_INITDB_ROOT_USERNAME: tradenote
      MONGO_INITDB_ROOT_PASSWORD: tradenote  # CHANGE IN PRODUCTION
    networks:
      - tradenote_network

  app:
    image: eleventrading/tradenote:latest
    container_name: tradenote_app
    restart: unless-stopped
    depends_on:
      - mongo  # Ensures database readiness before app start
    environment:
      MONGO_URI: mongodb://tradenote:tradenote@mongo:27017/tradenote?authSource=admin
      TRADENOTE_DATABASE: tradenote
      APP_ID: ${APP_ID:-changeme}      # Override via .env file
      MASTER_KEY: ${MASTER_KEY:-changeme}
      TRADENOTE_PORT: 8080
    ports:
      - "8080:8080"
    networks:
      - tradenote_network

volumes:
  mongo_data:  # Declared for Docker-managed persistence

networks:
  tradenote_network:
    driver: bridge  # Isolated internal communication

Critical Production Modifications:

  • Pin MongoDB version: Replace mongo:latest with mongo:6.0 or tested equivalent to prevent unexpected upgrades
  • Externalize secrets: Use Docker secrets or HashiCorp Vault instead of hardcoded credentials
  • Resource limits: Add deploy.resources.limits to prevent runaway memory consumption
  • Health checks: Implement healthcheck directives for automatic recovery

Example 2: Secure Environment Variable Injection

Production deployments should never expose secrets in shell history. Here's the hardened pattern:

#!/bin/bash
# deploy-tradenote.sh - Production deployment script

set -euo pipefail  # Exit on error, undefined vars, pipe failures

# Generate secrets if not present
if [[ ! -f .env ]]; then
    cat > .env <<EOF
APP_ID=$(openssl rand -hex 24)
MASTER_KEY=$(openssl rand -hex 48)
TRADENOTE_PORT=8080
EOF
    chmod 600 .env
    echo "Generated new secrets in .env"
fi

# Load and validate
export $(grep -v '^#' .env | xargs)

# Verify secrets are sufficiently random
if [[ ${#APP_ID} -lt 20 ]]; then
    echo "ERROR: APP_ID too short" >&2
    exit 1
fi

# Deploy with explicit env file
docker run \
    --env-file .env \
    -e MONGO_URI="mongodb://tradenote:${MONGO_PASSWORD}@mongo:27017/tradenote?authSource=admin" \
    -p "${TRADENOTE_PORT}:${TRADENOTE_PORT}" \
    --name tradenote_app \
    --restart unless-stopped \
    -d eleventrading/tradenote

echo "TradeNote deployed on port ${TRADENOTE_PORT}"

This pattern ensures secrets never appear in ps output, shell history, or process listings.

Example 3: MongoDB Connection String Security

The MONGO_URI format deserves special attention—it's where most deployments fail:

// Connection string components explained
mongodb://                    // Protocol - always mongodb for standard connections
  tradenote:tradenote         // username:password (URL-encoded if special chars)
  @mongo:27017                // hostname:port (use service name in Docker networks)
  /tradenote                  // Default database for operations
  ?authSource=admin           // Where user credentials are validated

// Production example with special characters encoded
mongodb://tradenote:p%40ssw0rd%21@mongo.internal:27017/tradenote?authSource=admin&tls=true
//                                    ^ URL-encoded @ as %40, ! as %21
//                                                         ^ TLS enforcement for remote databases

Connection String Best Practices:

  • Always specify authSource explicitly—authentication failures are silent and confusing without it
  • Enable TLS (tls=true) for any non-localhost deployment
  • Use connection string options for timeout and pool sizing: &connectTimeoutMS=5000&maxPoolSize=10

Example 4: Broker Trade Import Format

While specific formats vary by broker, TradeNote expects standardized CSV structures. Here's a representative transformation for import:

# transform_trades.py - Convert broker export to TradeNote format
import pandas as pd
from datetime import datetime
import json

def transform_broker_export(input_path: str, output_path: str, timezone: str = "America/New_York"):
    """
    Standardize broker-specific export to TradeNote-compatible format.
    Adjust column mappings per your broker's export structure.
    """
    df = pd.read_csv(input_path)
    
    # Map broker columns to TradeNote schema
    standardized = pd.DataFrame({
        'symbol': df['Underlying'].str.upper(),
        'entry_time': pd.to_datetime(df['Entry Time']).dt.tz_localize(timezone),
        'exit_time': pd.to_datetime(df['Exit Time']).dt.tz_localize(timezone),
        'entry_price': df['Entry Price'].astype(float),
        'exit_price': df['Exit Price'].astype(float),
        'quantity': df['Qty'].astype(int),
        'side': df['Side'].str.lower(),  # 'long' or 'short'
        'pnl': df['P&L'].astype(float),
        'commission': df.get('Commission', 0).astype(float),
        'notes': ''  # Populate with strategy tags or emotional state
    })
    
    # Calculate derived fields for enhanced analysis
    standardized['duration_minutes'] = (
        standardized['exit_time'] - standardized['entry_time']
    ).dt.total_seconds() / 60
    
    standardized['r_multiple'] = (
        standardized['pnl'] / standardized['quantity'] / 
        abs(standardized['entry_price'] - standardized['exit_price']).replace(0, 0.01)
    )
    
    # Export for TradeNote import
    standardized.to_json(output_path, orient='records', date_format='iso')
    print(f"Transformed {len(standardized)} trades to {output_path}")

# Execute transformation
if __name__ == "__main__":
    transform_broker_export(
        input_path="ibkr_trades_2024.csv",
        output_path="tradenote_import.json",
        timezone="America/New_York"  # Match your account timezone
    )

This preprocessing enables quantitative edge analysis—correlating trade duration, R-multiples, and time-of-day performance that raw broker exports obscure.


Advanced Usage & Best Practices

Backup Strategy: MongoDB dumps should be automated and encrypted:

# Daily encrypted backup cron job
0 2 * * * docker exec tradenote_mongo mongodump --archive | gzip | gpg --symmetric --cipher-algo AES256 > /backups/tradenote_$(date +\%Y\%m\%d).gpg

Performance Optimization: For 10,000+ trade histories, add MongoDB indexes on entry_time, symbol, and side. Monitor with docker stats and allocate sufficient RAM for the working set.

Multi-User Isolation: TradeNote supports multiple traders per instance with data segregation at the application level. For stricter isolation, deploy separate instances per trader with dedicated MongoDB databases.

Integration Pipeline: Webhook your broker's API to auto-populate trades, eliminating manual import friction. The MongoDB backend accepts direct document insertion for fully automated journaling.


Comparison with Alternatives

Feature TradeNote TraderSync Edgewonk Excel/Google Sheets
Data Location Your infrastructure Their cloud Their cloud Your drive (or Google's)
Source Code Access ✅ Full (GPL v3) ❌ Proprietary ❌ Proprietary N/A
Monthly Cost Free (hosting only) $29.99+ $169 one-time Free / Subscription
Broker Imports ✅ Extensible ✅ Many ✅ Several ❌ Manual only
Privacy Guarantee Cryptographic (you control) Legal (privacy policy) Legal (privacy policy) Variable
Customization Unlimited (modify code) Limited presets Limited presets Extensive (manual)
Offline Operation ✅ Complete ❌ Requires internet ❌ Requires internet
Pattern Analytics ✅ Built-in ✅ Advanced ✅ Advanced ❌ Build yourself
Community Support Active Discord + GitHub Official only Official only Forums

The Verdict: Choose TradeNote when data sovereignty and long-term cost control matter. Accept SaaS alternatives only if you value convenience over control—and understand you're paying with data, not just dollars.


FAQ: Critical Questions Answered

Q: Is TradeNote truly free? What's the catch? A: No catch. GPL v3 licensed—free forever. You pay only for your own hosting (or run locally for zero ongoing cost).

Q: Can I import from [specific broker]? A: Check the brokers documentation. If unsupported, the open format accepts custom transformations—build it and contribute back.

Q: How secure is self-hosting versus cloud services? A: Security depends on your configuration. With proper TLS, firewall rules, and regular updates, self-hosting exceeds most SaaS security—your attack surface is smaller and targeted, not a centralized honey pot.

Q: What happens if the project is abandoned? A: GPL v3 ensures the code remains available. Your instance continues functioning indefinitely. Community forks can emerge. Contrast with SaaS: project death means immediate data loss.

Q: Can I access TradeNote from my phone? A: Yes—deploy with HTTPS and responsive design works on mobile browsers. No native app required, no app store gatekeeping.

Q: How do I migrate from my existing journal? A: Export to CSV, transform to TradeNote's JSON format (see Example 4 above), and import. Most platforms offer CSV export despite making migration difficult.

Q: Is my data encrypted at rest? A: MongoDB supports encryption at rest via WiredTiger. Configure in your MongoDB deployment—TradeNote inherits your database's security posture.


Conclusion: Your Data, Your Edge, Your Control

The trading industry extracts value from you at every turn—commissions, data fees, platform subscriptions, and now, the silent expropriation of your behavioral data. TradeNote represents a refusal to participate in this extraction economy. It's a declaration that your trade history, your pattern recognition, your hard-won market intuition—these belong to you alone.

I've evaluated dozens of trading journals. None combine this level of privacy rigor with genuine usability. The Docker deployment is genuinely minutes-to-operational. The MongoDB backend scales from hobbyist to institutional. The GPL license guarantees perpetual freedom.

But don't take my word for it. The code is waiting. The community is active. Your data is currently leaking somewhere—plug the hole today.

👉 Deploy TradeNote now from the official repository — star it, fork it, make it yours. The markets reward edge. Protect yours.

Have questions? Join the TradeNote Discord or open an issue on GitHub. The maintainer responds personally—because this isn't a corporate product, it's a trader's tool built by someone who actually uses it.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

All tools