Core Philosophy

RiskDesk is not just a calculator; it is a discipline engine. It is built on the premise that Capital Preservation is the primary job of a trader.

RiskDesk delivers dynamic, risk-first, multi-account position sizing paired with seamless trade logging. It combines comprehensive statistical analysis with a powerful journaling engine to help you trade with precision.

1. Initial Setup

Account Configuration

Go to Settings to define your trading environment. You can add multiple accounts (e.g., "Main Swing", "Day Trading").

  • Master Account: You must select one account as "Master" using the radio button. This account's size is used as the denominator for "Equity Contribution (EC%)" calculations.
  • Base Currency: Set your Global Base Currency (e.g., GBP). All portfolio stats will be normalized to this currency via the built-in FX API.

The Fund Manager

Tap the Wallet Icon on any account in the Settings or Calculator view to open the Fund Manager.

  • Deposits & Withdrawals: Log capital injections or withdrawals. These are tracked separately from trading P&L so they don't skew your performance stats.
  • Monthly Auto-Deposit: Configure a recurring contribution (e.g., $500 on the 1st of every month). The app will automatically add this to your balance when you open it, allowing you to simulate salary injections and track realistic account growth.

Data Management

RiskDesk offers two modes of data storage:

Local Mode (Default)

Data lives in your browser's local storage. Private and fast, but data does not sync between devices. Clearing browser cache deletes data.

Cloud Sync

Syncs data to your own Google Drive using a secure script. Private and allows trading across Phone/Laptop. See Section 9.

Stats Configuration: Partials Impact

Found in Settings, this toggle controls how your statistics are calculated.

Feature OFF (Strict) ON (Dynamic)
Math Closed trades only. Includes active partials.
Use Case Proven, banked edge. Current Cashflow growth.

2. Live Data & Prices

RiskDesk connects to APIs to keep your risk data accurate without requiring a monthly subscription.

Live Price Integration (Finnhub)

To enable the Fetch Prices button in the top Risk Bar, you need a free API key.

  1. Go to finnhub.io and register for a free account.
  2. Copy your default API Key from their dashboard.
  3. Paste it into Settings > App Preferences > Finnhub API Key.

Note for UK/Intl Stocks: The API uses standard exchange suffixes. For London stocks, ensure your tickers end in .L (e.g., VOD.L). For Toronto, use .TO.

3. Calculator Engine

The calculator determines your position size based on your risk tolerance. It offers three distinct mathematical models:

Equity Risk %

"Lose max 1.0% of account."

Shares = (Account * Risk%) / (Entry - Stop)

Position Size %

"Invest 10% of total cash."

Shares = (Account * Alloc%) / Entry

Cash Risk $

"Lose exactly $100."

Shares = CashRisk / (Entry - Stop)

Key Features

  • Trade Currency: Ensure you select the currency of the asset you are trading (e.g. USD for Apple). If it differs from your Base Currency (e.g. GBP), the FX API will handle the conversion to ensure your risk sizing is accurate in your home currency.
  • Staggered Stops: You are not limited to a single stop price. Toggle "Staggered" to set multiple weighted stop levels. The system calculates a weighted average stop to determine true risk per share.
  • Chart Capture: Paste a chart image directly from your clipboard (Ctrl+V) into the "Paste Zone" to save the setup chart permanently with the trade.

4. Risk Metrics

The Live Risk Bar monitors your "Progressive Exposure". It answers: "Have I earned the right to take more risk?"

NER (Net Exposure Risk) Principal Protection
The percentage of your account currently at risk that is NOT financed by banked profits. If NER is 0%, your open risk is fully covered by realized gains—you are trading on "House Money".
NER = ( Σ(Open Risk) - Σ(Banked Profit) ) / Account Size

*Floored at 0%. If Banked Profit > Open Risk, NER is 0.

NEP (Net Exposure Profit) Traction
The Unrealized (Floating) Profit of your risk-bearing trades. It tells you if your *new* exposure is working immediately.
NEP = Floating P&L of Unfinanced Trades / Account Size
OER (Open Exposure Risk) Total Heat
If every one of your trades failed right now and hit their stop loss, how much of your current account value would disappear?
OER = Σ( (CurrentPrice - CurrentStop) * Qty ) / Account Size
Secured (Net Financing) The Buffer
The amount of Banked Profit that exceeds your Principal Risk. If positive, you cannot lose principal capital even if all stops hit.
Secured = (Total Banked Profit - Total Open Risk) / Account Size

5. Logs & Views

Viewing Modes (Responsive)

RiskDesk changes the data it displays based on your device orientation to prevent information overload.

Portrait Mode (Mobile)

Optimized for quick scanning.

  • Date & Time
  • Ticker & Direction
  • Risk % & R-Multiple
  • P&L / Status Badge

Landscape Mode (Pro View)

Rotate your phone to reveal the professional data tape.

  • Position Size: Total value of the position in trade currency.
  • Live Price: Real-time current price (if enabled).
  • Qty: Original vs Current shares held.
  • EC%: Equity Contribution % (Impact on Net Worth).

Manual Trade Entry

Click the button in the Logs view to record trades that weren't captured by auto-import.

  • Full Detail Logging: Record your Ticker, Direction, Strategy, and Notes manually.
  • Staggered Stops: The entry modal allows you to toggle between Single (one stop price) and Staggered (up to 3 distinct stop levels), mirroring the Calculator's risk management logic.

6. Trade Management

Tap any log entry to open the Management Console.

  • Stop Adjustments: Update your "Current Stop" as the trade moves in your favor. This automatically updates your Open Heat metric on the dashboard.
  • Partial Exits: Record partial sells by specifying Price, Quantity, and Date. The system calculates the realized P&L for that specific chunk and reduces your NER.
  • Chart Gallery: Stores all images associated with the trade (Entry Chart, Exit Chart, and any Journal updates). Tap any image to view it full screen.

Dynamic De-Risking

The "Risk Free" Formula

RiskDesk uses a dynamic equation to tell you exactly where to take partial profits to eliminate risk. Unlike static rules (e.g., "Sell 1/3 at 2R"), RiskDesk adapts to your Adjusted Stop.

Target = Entry + ( (CurrentNER / SharesToSell) - CurrentRiskPerShare )

7. Stats & Insights

Smart Filters (Time Slicing)

The Stats engine now supports powerful time-slicing. You can filter your entire dashboard by:

  • Last 20 Trades
  • This Week
  • This Month
  • YTD
  • Custom Range

Core Metrics

Financial Health

Win Rate, Profit Factor, Expectancy.

  • Financial Tug-of-War: In the Financial Health section, a new visual bar displays your Gross Profit (Green) vs. Gross Loss (Red). This gives you an instant read on your "Profit Efficiency." If the marker is buried deep in the red, your losses are overwhelming your winners, regardless of win rate.
  • Strategy Edge

    Performance breakdown by Strategy tag.

    Consistency Heatmap

    This grid visualizes your trading frequency and quality. Use the toggle buttons to switch modes:

    • By Entry: Highlights days where you initiated winning trades. Measures Origination Quality.
    • By Exit: Highlights days where you banked profit. Measures Cashflow.

    Key Formulas

    Expectancy
    Expectancy = (Win% × AvgWinR) - (Loss% × AvgLossR)
    Profit Factor
    PF = (Gross Profit $) / (Gross Loss $)

    8. Journal, Rules & Execution Discipline Engine

    The Journal tab is your daily accountability partner.

    • Golden Rules: Define your rules and trading philosophy in the "Rules" tab. They persist daily.
    • Automated Feed: The Journal automatically pulls in every trade entry and exit for the selected date, creating an instant timeline of your day.
    • Discipline Tracking: You must answer: "Did you follow your rules today?"
      • YES: Marks the heatmap Green.
      • NO: Marks the heatmap Red. A checklist of your rules appears, forcing you to check off exactly which rules you broke.

    Mastering Execution Discipline

    Trading success is not just about having a strategy; it is about the ability to execute that strategy consistently without emotional interference. The Behavior Tab (Execution Discipline) is a dedicated workspace in RiskDesk designed to quantify your psychology.

    1. Setting Up Execution Errors

    Before you can track behavior, you must define the errors you want to eliminate.

    • Navigate to Settings (Gear Icon) > Execution Error Tags.
    • RiskDesk provides defaults (e.g., FOMO, Revenge Trade), but you can add your own.
    • Tip: Keep these tags focused on behavioral failures, not market outcomes.
    2. Rules vs. Execution Errors

    It is important to distinguish between a "Losing Trade" and an "Execution Error."

    The Strategy (Rules)

    You follow the plan, but the trade loses. This is a System Loss. It is NOT an error.

    The Behavior (Error)

    You deviate from the plan (e.g., Chasing). Even if it wins, this is an Execution Error.

    Practical Example: The Speed Limit
    • Driving 60mph and hitting a pothole is a System Loss (Bad luck/Conditions).
    • Driving 100mph and crashing is an Execution Error (Reckless driving).
    3. Tagging Errors

    In the Journal Log, look for the triangle icon:

    • Click the Mark Error button on any trade to tag it.
    • Important: An Execution Error applies to the entire trade lifecycle. If you tag a trade as "FOMO" on entry, the entire P&L (including partials) is calculated as "Dirty" to show the full cost of that decision.
    4. The Behavior Page

    Access via the Brain Icon in the header. Use filters to slice data by Strategy, Execution Error Type, or Time. Toggle between R, %, and $.

    The Metrics Explained:
    • The Cost of Errors & Lucky Revenue

      "How much money would I have if I never broke a rule?"

      • Cost (Red): You lost money breaking rules.
      • Lucky Revenue (Amber): You broke a rule but made money. This is dangerous "Negative Reinforcement."
    • Shadow Equity Curve

      Comparing Real Equity (Green) vs. Shadow Equity (Blue). Shadow Equity is your P&L excluding any trade marked with an error. The gap represents the cost of your psychology.

      Note: If you filter by a specific Error Tag (e.g., "FOMO"), the Shadow Equity box will display "N/A (Avoided)". This reinforces that the "correct" outcome of a FOMO trade is to simply not take it (Result = 0).

    • Most Frequent Violations

      Ranks your errors by frequency. Red bars are your "Top Offenders." Use this to identify the one thing you need to fix this week.

    5. Execution Discipline Heatmap

    A calendar view of your consistency (90 days). It visualizes how often you follow your rules.

    Green
    Perfect Execution
    Amber
    Slip (Minor)
    Red
    Tilt (Multiple)
    Drill-Down:
    • Click on any square to open the Day Details and see exactly which errors occurred.
    • Click "View Journal Entry" inside the details to jump directly to that date in your Daily Log to review your notes.

    9. Google Cloud Sync

    RiskDesk can sync data between devices using your personal Google Drive as the database. You own the infrastructure.

    Setup Instructions

    1. Create a new Google Sheet at sheets.google.com.
    2. Go to Extensions > Apps Script.
    3. Paste the RiskDesk Sync Script:
    Apps Script Code
    function doPost(e) {
      try {
        var data = e.postData.contents;
        var fileName = "riskdesk_data.json";
        var files = DriveApp.getFilesByName(fileName);
    
        if (files.hasNext()) {
          files.next().setContent(data);
        } else {
          DriveApp.createFile(fileName, data, MimeType.PLAIN_TEXT);
        }
    
        return ContentService.createTextOutput("Saved").setMimeType(ContentService.MimeType.TEXT);
      } catch (err) {
        return ContentService.createTextOutput("Error: " + err.toString());
      }
    }
    
    function doGet(e) {
      try {
        var fileName = "riskdesk_data.json";
        var files = DriveApp.getFilesByName(fileName);
    
        if (files.hasNext()) {
          var data = files.next().getBlob().getDataAsString();
          return ContentService.createTextOutput(data).setMimeType(ContentService.MimeType.JSON);
        } else {
          return ContentService.createTextOutput("{}").setMimeType(ContentService.MimeType.JSON);
        }
      } catch (err) {
        return ContentService.createTextOutput("Error: " + err.toString());
      }
    }
    1. Click Deploy > New Deployment.
    2. Select type: Web App.
    3. Set "Execute as: Me".
    4. Set "Who has access: Anyone". (Crucial).
    5. Click Deploy.
    6. Authorize permissions when prompted (Select Account > Advanced > Go to (unsafe) > Allow).
    7. Copy the Web App URL and paste it into RiskDesk Settings.

    Security: Is this Safe?

    Yes. You might see a Google warning saying "This app isn't verified" or "Go to (unsafe)". This is expected because YOU are the developer.

    1. Why "Unverified"?

    Google flags any private script as "unverified" until you pay to have it professionally audited. Since you created this for personal use, you are simply authorizing your own code.

    2. Why "Access to Anyone"?

    This does not make your data public. "Anyone" means "Anyone with the secret URL" (which is only you). This setting is required technically so your browser can send data to Google without being blocked by security firewalls (CORS).

    3. Can it delete my files?

    The permission asks to "See, edit, create and delete files" because that is the standard Google permission group. However, the script you pasted explicitly looks for only one file: riskdesk_data.json. It does not touch anything else in your Drive.

    Cloud Setup Scenarios

    Scenario A: Brand New User (No Data)

    Follow this if you are just starting and have no trade history logged yet.

    1. Paste the Web App URL into RiskDesk Settings on your first device.
    2. Click Sync.
    3. Repeat on any other devices (Laptop, Tablet, etc.).
    4. You are ready! Any trade you log on one device will now appear on the others.
    Scenario B: Existing User (Migrating Data)
    ⚠️ Critical Warning

    You must establish the "Master" copy of your data first. Failure to follow this order could result in data overwrites.

    1. Open RiskDesk on the device that holds your current data (e.g., your Phone).
    2. Paste the Web App URL into Settings.
    3. Click Sync. (This uploads your data to create the "Master File" in Google Drive).
    4. Only after step 3, open RiskDesk on your other devices (e.g., Laptop).
    5. Paste the URL and Click Sync. (This will download the data from the cloud).

    Important Caveats

    • The "Open Tab" Rule: If you leave RiskDesk open on your Laptop while you trade on your Phone, the Laptop won't know about the Phone's trades. Always refresh or click Sync when switching devices.
    • Images are Local: To keep sync fast and free, chart screenshots are stored on your specific device, not in Google Drive.
    • Offline Mode: You can trade offline. When you return online, click Sync to push your changes to the cloud.

    Troubleshooting & Limitations

    Note: Due to the vast variety of browser configurations, extensions, and network security settings, official support for Cloud Sync is limited. Please ensure your setup meets the standard requirements below before contacting support.

    Common Issues Checklist:
    • Google Account: You must be signed into a valid Gmail/Google account to deploy the script.
    • Deployment Permissions: When deploying your Web App in Google, ensure "Who has access" is set to "Anyone". If set to "Only Myself," RiskDesk cannot reach your data.
    • Privacy Mode: Do not use Private/Incognito windows. Cloud Sync relies on browser storage to remember your API URL; Incognito mode often clears this or blocks the connection.
    • Ad-Blockers: Disable Ad-Blockers (e.g., uBlock Origin) or strict Privacy extensions (e.g., Privacy Badger) for this site. They frequently mistake the Google Script call for a tracker and block it.
    Advanced Debugging (F12)

    If sync is failing silently, you can inspect the browser's console:

    1. Press F12 (or right-click > Inspect) to open Developer Tools.
    2. Click the "Console" tab.
    3. Red Text: Look for "CORS Policy" or "403 Forbidden." This usually means your Google Script permissions are wrong (set to "Only Myself").
    4. Success: If working correctly, you should see a message like: "Cloud Sync: Successfully loaded [X] records."

    10. Privacy & Sharing

    Data Sovereignty

    • You Own Your Data: RiskDesk is a "Serverless" application. We do not have a database. We cannot see your trades, account balance, or strategies.
    • Storage: Your data lives in your browser's Local Storage (on your actual device) or in YOUR personal Google Drive (if Cloud Sync is active).
    • No Recovery: Because we don't have your data, we cannot recover it if you delete it. Maintain regular backups.

    Sharing Features

    • Privacy Mode

      Tap the Eye icon in the top header. This blurs all dollar/currency values across the Logs, Stats, and Journal. Ideal for working in public or sharing screens.

    • Social Sharing

      Tap the Camera icon on any Log row, Stats card, or Journal page to generate a clean, branded image formatted for X (Twitter) and Discord.

    11. Resources

    Download sample this sample data file to easily see how Risk Desk logs, statistics and journal features look when full of trade data. When you're ready to start your own use the factory reset function in Settings

    Sample Trade Log (.json)

    An example of Risk Desk data with about 350 simulated trades.

    Download

    Disclaimer: This tool is for educational and journaling purposes only. It is not financial advice. Trading involves significant risk.

    Data Warning: Live prices are provided by third-party services (e.g., Finnhub) and may be delayed or inaccurate. Never execute trades based solely on these prices; always verify with your broker.