A fully native automated trading and OAuth authentication engine designed for capturing intraday price movements without manual intervention.
TrailCapture introduces a flexible trailing strategy engine capable of dynamically tracking both downtrends and uptrends while providing a seamless automated OAuth login experience for Schwab accounts — eliminating the manual authorization interruptions required by existing solutions.
TrailCapture allows you to dynamically monitor downward price movement and capture reversal opportunities with customizable controls.
- Configure a trigger price to start tracking a downtrend
- Ignore a configurable number of consecutive downward ticks before monitoring reversal behavior
- Specify an absolute price movement threshold between the first and last downward ticks
- Once the configured downtrend conditions are satisfied, TrailCapture automatically begins tracking the next upward tick for potential capture
Start tracking after price drops below trigger
Ignore first N down ticks
Require absolute drop >= configured threshold
Capture first qualifying upward reversal tick
TrailCapture also supports symmetrical upward trend tracking.
- Configure a trigger price to begin monitoring upward movement
- Ignore a configurable number of consecutive upward ticks
- Require an absolute upward price movement threshold between the first and last upward ticks
- After the configured uptrend conditions are satisfied, TrailCapture automatically tracks the first downward reversal tick
Start tracking after price rises above trigger
Ignore first N up ticks
Require absolute rise >= configured threshold
Capture first qualifying downward reversal tick
One of the biggest pain points in automated trading systems is OAuth authentication maintenance.
Most current solutions rely on:
- manual browser interaction
- Playwright
- Selenium
- Puppeteer
- authorization-code copy/paste workflows
- periodic manual re-login
TrailCapture takes a fundamentally different approach.
Existing solutions typically require users to:
- pause automation
- manually retrieve authorization code
- resume token refresh process
TrailCapture eliminates this workflow entirely.
- No browser automation frameworks
- No Selenium
- No Playwright
- No Puppeteer
- No third-party browser control dependency
- automatic login
- automatic token refresh
- automatic token renewal
- no periodic manual intervention required
This architecture enables a significantly smoother long-running automated trading workflow.
TrailCapture requires the Microsoft Visual C++ Redistributable Runtime for x64 Windows systems.
Download from Microsoft:
Microsoft Visual C++ Redistributable (x64)
Supported platforms:
- Windows 10 x64
- Windows 11 x64
You must have an approved developer application from Charles Schwab Developer Portal in order to obtain:
- App Key (Client ID)
- App Secret
- Callback URL
These values must be configured within TrailCapture before authentication can function properly.
A standard Schwab brokerage account is required for automated login.
You will need:
- Schwab username
- Schwab password
- This is NOT the Schwab developer portal account
- The developer account alone cannot be used for trading authentication
- OAuth authentication must be performed against a regular brokerage account
If you have multiple trading accounts and need to select a specific one, you can configure this using config.xml.
Place the file in:
C:\ProgramData\TrailingPro
Otherwise, the first account will be used by default.
Example configuration:
<Config>
<AccountIndex>
<Value>0</Value>
</AccountIndex>
</Config>Account indexing is zero-based:
0= first account1= second account2= third account- etc.
If an invalid account index is specified, authentication or token generation may fail.
- Native C/C++ implementation
- Lightweight architecture
- No browser automation frameworks
- Designed for long-running unattended execution
- Flexible trend tracking engine
- Event-driven trailing logic
- OAuth automation workflow integrated directly into native runtime
- Automated trading systems
- Intraday range capture strategies
- Schwab API integrations
- Native low-latency trading tools
- Long-running unattended trading workflows
TrailCapture was built from a first-principles perspective:
Instead of automating a browser externally, the project focuses on understanding and integrating the underlying authentication and price-tracking mechanisms directly within a native engine.
The result is a lightweight, automated, and developer-oriented solution focused on stability, flexibility, and uninterrupted execution.
This project is intended for educational and research purposes only.
Users are responsible for complying with:
- Schwab API Terms of Service
- OAuth provider policies
- trading regulations and brokerage agreements
Use at your own risk.