A lightweight trade journal and pre-market planner built as a Google Apps Script web app backed by a Google Sheet. The UI is a single-page ledger for writing the day's intended trades, logging executions, reviewing R-multiple performance, and scanning notes or counterfactual analysis from trade history.
Code.gscontains the Google Apps Script backend. It reads and writes trade rows in theTradessheet and daily plan rows in thePlanssheet.index.htmlcontains the full frontend: layout, styles, form logic, charts, and calls to the Apps Script web app URL.
Each planned trade records:
- Date
- Ticker
- Strategy: Breakout, Pullback-generic, Pullback-30min, Parabolic Short, or Other
- Stop type
- Triggered flag
The planner is meant for pre-market preparation. Add only the trades you intend to take before the open, then mark Triggered during the session if the setup actually appears. Planned trades are stored separately from executed trades, so checking a plan does not create a logged trade automatically.
Each trade records:
- Date
- Ticker
- Type: shares or options
- Strategy type: Breakout, Pullback-generic, Pullback-30min, Parabolic Short, or Other
- Risk: always saved as
1R - Stop type
- Realized R, including partial profits
- Close type and reason
- Compliance flag
- Analysis/comment text
- Alternate result for non-compliant trades
When Compliant trade is unchecked, the form shows an Alternate result input and treats the analysis box as a counterfactual note for what may have happened if the trade had followed the rules.
Open index.html directly in a browser to preview the UI:
file:///path/to/Trade-logger/index.html
The local page can connect to the live Google Sheet if the deployed Apps Script URL is saved in the settings panel.
- Open the Google Sheet used for the journal.
- Go to
Extensions->Apps Script. - Replace the Apps Script project's
Code.gscontents with this repo'sCode.gs. - If the Apps Script project has an
index.htmlfile, replace its contents with this repo'sindex.html. - Click
Deploy->Manage deployments. - Edit the existing web app deployment.
- Select
New version, then deploy.
Updating the existing deployment keeps the same web app URL. Creating a new deployment may require pasting the new URL into the app settings again.
- Open the deployed web app URL or the local
index.htmlfile. - If prompted, paste the Apps Script deployment URL into settings.
- Use
Today's Planbefore market open to add tickers, strategy, stop type, and triggered status. - Click a plan row to edit it, or tick the checkbox when a planned setup triggers live.
- Click
+to add an executed trade. - Enter ticker, type, strategy type, stop type, optional realized R, and compliance details.
- Use
Compliant tradefor rule-following trades. - Uncheck
Compliant tradefor rule breaks, then enter the alternate result and counterfactual analysis. - Hover over trade rows to quickly preview saved comments or counterfactual analysis.
- Click a trade row to edit it.
Entering realized R does not close a trade. Leave Close type blank while the trade is still active, even if you have taken partial profits. Set Close type only after the final exit.
After changing Code.gs or index.html locally:
- Copy the updated file contents into the matching Apps Script project files.
- Deploy a new version from
Deploy->Manage deployments. - Refresh the app in the browser.
Google Apps Script does not automatically pull changes from this repository, so the copy/paste deployment step is required unless a separate Apps Script sync workflow is added.
The app stores execution data in a sheet named Trades and pre-market plans in a sheet named Plans. If either sheet does not exist, the backend creates it and adds the expected headers. Existing trade sheets are updated with newer header names such as Compliant, Analysis, Alternate Result, and Strategy Type.