icy-replit

byKishan Sharma

# Replit Agent Prompt: Indian Intraday AI Paper-Trading System — Trial Version (PAPER TRADING ONLY) Build this complete system in one pass — no phases, no check-ins mid-build. Give one final report at the end: what was built, what was tested, what needs my attention. ## Safety rules (absolute) - PAPER TRADING ONLY. No real orders, no broker integration, no order-placement code anywhere, ever. - All trades are simulated: writing a row to our own `trades` table, nothing else. - No live broker account, no OAuth, no credentials to manage — this version has no broker connection at all. ## Data sources (two separate things — do not conflate them) 1. **Visual chart on the dashboard**: embed TradingView's free widget (their standard embeddable chart widget) showing the live candlestick chart for whatever stock is currently the active candidate or open position. This is for display only. 2. **Numeric data for the agents to actually analyze** (price, OHLC, volume — TradingView's widget does NOT expose this to our code): pull this from a free public source — use the `yfinance` Python library (Yahoo Finance data) as the default, with NSE symbols (`.NS` suffix). Structure this behind a simple `DataProvider` interface so the source can be swapped later without touching agent logic. ## What it does Once started, runs autonomously through NSE hours (09:15–15:30 IST, configurable) with a manual STOP/HALT control: scan → rank → analyze → risk-check → decide → paper-execute → monitor → exit → learn → repeat. ## Parameters (config file, not hardcoded) - Starting capital ₹15,000; kill switch at ₹5,000 equity - Max 1 open position; max risk 5% of equity per trade; min net R:R 1.5 - Eligible stocks: ≤ ₹1,500/share; top 5 candidates (long + short) - Opportunity Scout re-scans every 15 min (fixed); an open trade is monitored continuously and is never interrupted by a new scan - Flat cost: ₹25/transaction → ₹50 per round-trip trade; net_profit = gross − 50; R:R check uses net, not gross ## Agents — only these six 1. **Opportunity Scout** — deterministic ranking from the DataProvider, filtered ≤₹1,500/share, shortlists top 5 (long + short) every 15 min. LLM only writes a short rationale, never picks candidates. 2. **Technical Agent** — LLM-based; given one candidate, reads chart structure (support/resistance, trend, momentum, volume) and proposes PROCEED/WAIT with a full plan: entry, target, stop-loss. 3. **Regime Agent** — LLM-based; classifies overall market context (trending/choppy/high-vol/low-vol) so a setup isn't judged in isolation from the broader market. 4. **Risk Manager** — 100% deterministic code, no LLM, hard veto power. Enforces max risk %, max 1 position, kill switch, price cap. Cannot be overridden by anything else. 5. **Main AI** — sees Technical + Regime output + Risk Manager's clearance; makes the sole final PROCEED/WAIT decision using **net** R:R (after ₹50 cost) against the 1.5 minimum. Low/fixed temperature, strict schema output, cannot override the Risk Manager. 6. **Learning Engine** — logs every closed trade's full context (setup, reasoning, outcome) to a trade journal; can retrieve similar past cases as context for Technical/Regime agents. Passive only — no automatic changes to parameters or prompts without my explicit approval. ## Non-agent backend logic (still needed, but plain deterministic code, not an "AI agent") - **Trade execution**: once Main AI says PROCEED, write the simulated trade (entry, target, stop-loss, size) to the DB. No LLM involved. - **Position monitoring**: continuously check the open position's live price (from the DataProvider) against its stop-loss/target/time-based exit, and close it when hit. Runs independently of Scout's 15-min scan cycle — a live position is never interrupted by a new scan. ## Dashboard (separate pages, not one long page) - **Live Trading**: TradingView widget for the active/open symbol, current position with entry/target/stop-loss, equity vs. ₹15,000 and ₹5,000 kill line, STOP/HALT control. - **Trade History/Journal**: closed trades log from the Learning Engine. - **Settings**: editable config parameters (Section above). ## Do not add - Any real broker connection or order placement, under any framing. - Any agent beyond the six listed above (no News Agent, no Critic, no separate Market Data Agent). - Auto-tuning of parameters/prompts by the Learning Engine without my approval. - Hardcoded universe/thresholds/costs outside the config file. I need only dashboard and no other pages. Don't ask for api key. Don't write essay on the dashboard I know the details. NO need to write agents descriptions.

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 7

System Requirements Document for icy-replit

1. Introduction

The "icy-replit" project is an Indian Intraday AI Paper-Trading System designed for trial use only. It simulates trading activities on the National Stock Exchange (NSE) using a set of predefined agents and parameters. The system is intended for a solo trader/operator who can monitor and control the trading process through a dashboard interface. The system is strictly for paper trading, with no real broker integration or order placement.

2. System Overview

The system autonomously runs during NSE trading hours, executing a cycle of scanning, ranking, analyzing, risk-checking, deciding, paper-executing, monitoring, exiting, and learning. It uses TradingView for visual charting and yfinance for numeric data analysis. The system is configured via a settings page and operates under strict safety rules to ensure no real trades are executed.

2a. Product Interpretation and Delivery Boundary

The system is delivered as a standalone application with a custom UI, requiring the operator to enroll and verify their identity before accessing the dashboard. The application manages its own identity and session continuity, ensuring secure access to trading functionalities. The system is designed to operate without any real broker connections, API keys, or additional agents beyond the specified six.

Page 2 of 7

2b. Source Content Inventory

  • TradingView Widget: Embedded for live candlestick chart display.
  • yfinance DataProvider: Provides numeric data for analysis.

2c. Page Content and Component Coverage

Landing

  • Information: Overview of the paper-trading system, its purpose, and intended audience.
  • Components: Introduction to the system's features and safety rules.

Login

  • Functionality: Identity verification for returning users.
  • Components: Login form with username and password fields.

Sign Up

  • Functionality: Self-service enrollment for new users.
  • Components: Registration form with necessary user details.

Live Trading

  • Information: Displays the active/open trading symbol.
  • Components:
    • TradingView widget for live chart display.
    • Current position details: entry, target, stop-loss.
    • Equity status vs. starting capital and kill line.
    • STOP/HALT control button.
Page 3 of 7

Trade History/Journal

  • Information: Log of closed trades from the Learning Engine.
  • Components:
    • List of trades with details on setup, reasoning, and outcome.

Settings

  • Functionality: Configuration of trading parameters.
  • Components:
    • Editable fields for starting capital, risk percentage, R:R minimum, price cap, costs, and trading hours.

3. Functional Requirements

  • As a Solo Trader/Operator, I should be able to start the system to run autonomously during NSE hours with a manual STOP/HALT control. (explicit)
  • As a Solo Trader/Operator, I should be able to view live candlestick charts using the TradingView widget on the Live Trading page. (explicit)
  • As a Solo Trader/Operator, I should be able to monitor my current position details and equity status on the Live Trading page. (explicit)
  • As a Solo Trader/Operator, I should be able to view a log of closed trades in the Trade History/Journal page. (explicit)
  • As a Solo Trader/Operator, I should be able to edit trading parameters in the Settings page. (explicit)
  • As a Solo Trader/Operator, I should be able to enroll and verify my identity before accessing the dashboard. (required_inference)

4. User Personas

Page 4 of 7

Solo Trader / Operator

  • Context: The sole user of the paper-trading system, responsible for initiating and monitoring trading activities.
  • Primary Goal: To simulate trading activities and analyze outcomes without executing real trades.
  • Responsibilities:
    • Start and stop the trading system.
    • Monitor live trading activities and equity status.
    • Review trade history and journal entries.
    • Adjust trading parameters as needed.
  • Success: The system runs unattended during trading hours, and the operator can halt and audit outcomes at any time.

5. Core User Flows

5.1 Starting the Trading System

  1. Landing Page: User reads about the system and its purpose.
  2. Sign Up/Login: User enrolls or logs in to verify identity.
  3. Live Trading Page: User starts the trading system.
  4. System Operation: The system runs autonomously, executing the trading cycle.
  5. STOP/HALT: User can manually stop the system if needed.

5.2 Monitoring Trades

  1. Live Trading Page: User views the TradingView chart and current position details.
  2. Equity Monitoring: User checks equity status against starting capital and kill line.
  3. STOP/HALT: User can halt trading if equity approaches the kill line.
Page 5 of 7

5.3 Reviewing Trade History

  1. Trade History/Journal Page: User accesses the log of closed trades.
  2. Analysis: User reviews trade details for insights and learning.

5.4 Configuring System Settings

  1. Settings Page: User accesses editable configuration parameters.
  2. Parameter Adjustment: User modifies trading parameters as needed.
  3. Save Changes: User saves the updated settings for future trading sessions.

6. Visuals Colors and Theme

  • Muse: Tobias van Schneider
  • Palette:
    • Background: #000000
    • Surface: #1A1A1A
    • Text: #FFFFFF
    • Primary: #FF4500
    • Accent: #1E90FF
    • Muted: #4B4B4B
  • Typography:
    • Headings: Playfair Display — Bold
    • Body: Söhne
    • Scale: 1.414 modular
  • Shape Language: Sharp corners, full-bleed sections
  • Layout: Asymmetric editorial grids
  • Motion: Slow crossfades, type reveals
Page 6 of 7

7. Signature Design Concept

The public entry page features a bold editorial composition with an oversized headline and a full-bleed TradingView chart widget as the main focus on a dark ground. Orange and blue accents highlight key actions and information.

8. Interaction Model & Motion Direction

  • Interaction Model: Static
  • Motion Tempo: Restrained
  • Hero Dimensionality: Flat
  • Landing Hero Motion Brief: A bold editorial composition with an oversized headline and full-bleed TradingView chart widget. Slow crossfades and type reveals maintain a sophisticated feel.

9. Non-Functional Requirements

  • The system must operate autonomously during NSE trading hours.
  • The system must ensure no real trades are executed.
  • The system must provide secure access through identity verification.

10. Tech Stack

  • Frontend: React
  • Backend: Python/FastAPI
  • Data Source: yfinance (Yahoo Finance)
  • Charting: TradingView widget
  • Database: PostgreSQL
  • Containerization: Docker
Page 7 of 7

11. Assumptions and Constraints

  • The system is for paper trading only, with no real broker integration.
  • All trades are simulated and logged in the system's database.
  • The system operates within the specified NSE trading hours.

12. Glossary

  • PAPER TRADING: Simulated trading without real financial transactions.
  • NSE: National Stock Exchange of India.
  • R:R: Risk-to-Reward ratio.
  • TradingView: A financial visualization platform providing charting tools.
  • yfinance: A Python library for accessing financial data from Yahoo Finance.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

Landing: Read system overview
Sign Up: Enroll with details
Login: Verify identity
Settings: Edit trading parameters
Settings: Save configuration changes
Live Trading: Start autonomous trading
Live Trading: View live candlestick chart
Live Trading: Monitor position entry, target, stop-loss
Live Trading: Check equity vs kill line
Live Trading: Halt trading at kill line
Trade History/Journal: Review closed trades log
Trade History/Journal: Analyze outcomes for learning
Live Trading: Halt system manually

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

Landing: Read system overview
Sign Up: Enroll with details
Login: Verify identity
Settings: Edit trading parameters
Settings: Save configuration changes
Live Trading: Start autonomous trading
Live Trading: View live candlestick chart
Live Trading: Monitor position entry, target, stop-loss
Live Trading: Check equity vs kill line
Live Trading: Halt trading at kill line
Trade History/Journal: Review closed trades log
Trade History/Journal: Analyze outcomes for learning
Live Trading: Halt system manually