Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

πŸš€ CryptoPilot AI Trader

Automated Crypto Paper Trading System built with n8n, PostgreSQL, Google Sheets, Telegram, and Binance Market Data.

Status: Paper Trading Mode βœ… Live Trading: Disabled ❌ Strategy: EMA + RSI + ADX Trend Following


πŸ“Œ Overview

CryptoPilot AI Trader is an automated crypto trading workflow designed to:

  • Scan major crypto pairs
  • Detect trend-following setups
  • Manage risk automatically
  • Log every signal and trade
  • Send Telegram alerts
  • Maintain trading analytics
  • Operate in Paper Trading Mode

The system currently scans:

  • BTCUSDT
  • ETHUSDT
  • SOLUSDT
  • BNBUSDT

every 15 minutes.


πŸ— Architecture

Binance Market Data
        β”‚
        β–Ό
Indicator Engine
(EMA, RSI, ADX, ATR)
        β”‚
        β–Ό
Signal Evaluation
        β”‚
        β–Ό
Risk Management
        β”‚
        β–Ό
Paper Trading Engine
        β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β–Ό      β–Ό         β–Ό
Google PostgreSQL Telegram
Sheet   Database  Alerts

Screenshots

Workflow Architecture

Workflow

Telegram Alerts

Β Telegram Notification


βš™οΈ Technology Stack

Automation

  • n8n

Market Data

  • Binance Public API

Database

  • PostgreSQL (Neon)

Reporting

  • Google Sheets

Notifications

  • Telegram Bot API

Deployment

  • n8n Cloud
  • Self Hosted n8n
  • VPS Deployment

πŸ“Š Trading Strategy

Long Setup

Trigger LONG when:

EMA21 > EMA50
Price > EMA200
RSI > 52
ADX > 20

Short Setup

Trigger SHORT when:

EMA21 < EMA50
Price < EMA200
RSI < 48
ADX > 20

Timeframe

15 Minute

Indicators

EMA21
EMA50
EMA200
RSI14
ADX14
ATR14

πŸ›‘ Risk Management

Position Risk

1% of account balance

Maximum Open Trades

3

Daily Loss Limit

3%

Stop Loss

1.5 Γ— ATR

πŸ“ˆ Dynamic Trailing Stop Logic

Stage 1

Profit reaches 1R
↓
Move SL to Breakeven

Stage 2

Profit reaches 2R
↓
Move SL to +1R

Stage 3

Profit reaches 3R
↓
Move SL to +2R

Stage 4

Use ATR Based Trailing Stop
Trailing Distance = 2 Γ— ATR

πŸ“‹ Google Sheets Structure

Signals Sheet

Column
Date
Time
Symbol
EMA21
EMA50
EMA200
RSI
ADX
ATR
Signal
Reason
Status

Trades Sheet

Column
TradeID
Date
Time
Symbol
Direction
EntryPrice
InitialSL
CurrentSL
ExitPrice
ATR
RSI
ADX
ProfitLoss
RMultiple
Result
Status
Notes

DailySummary Sheet

Column
Date
TotalTrades
Wins
Losses
WinRate
ProfitLoss
MaxDrawdown
ProfitFactor

πŸ—„ PostgreSQL Tables

signals

Stores all generated signals.


trades

Stores all paper trades.


daily_summary

Stores daily trading statistics.


πŸ“± Telegram Notifications

The system sends alerts when:

Workflow Started

πŸš€ CryptoPilot AI Trader Online

Signal Generated

πŸ“Š New Signal

Symbol: BTCUSDT
Direction: LONG

RSI: 62
ADX: 28

Mode: PAPER

Trade Opened

βœ… Paper Trade Opened

Stop Loss Updated

πŸ”₯ Trailing Stop Moved

Trade Closed

βœ… Paper Trade Closed

πŸ”„ Workflow Overview

Cron Trigger
    ↓
Fetch Candle Data
    ↓
Calculate Indicators
    ↓
Evaluate Setup
    ↓
Validate Risk Rules
    ↓
Create Paper Trade
    ↓
Store Records
    ↓
Telegram Alert

πŸ“ Repository Structure

CryptoPilot-AI-Trader
β”‚
β”œβ”€β”€ workflow/
β”‚   └── CryptoPilot_AI_Trader.json
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ Strategy.md
β”‚   β”œβ”€β”€ Setup.md
β”‚   └── Architecture.md
β”‚
β”œβ”€β”€ screenshots/
β”‚
└── README.md

πŸ” Security

Never commit:

Telegram Bot Token
Database Password
API Keys
Private URLs
Credentials

Use:

Environment Variables
n8n Credentials

instead.


πŸš€ Self Hosting

Recommended Deployment:

Docker
n8n
Ubuntu VPS

Suggested VPS:

  • Hostinger VPS
  • Contabo VPS
  • AWS Lightsail

πŸ“‹ Roadmap

Phase 1

βœ… Paper Trading

βœ… Google Sheets Logging

βœ… Telegram Alerts

βœ… PostgreSQL Analytics


Phase 2

⬜ Multi Timeframe Confirmation

⬜ Volume Filter

⬜ BTC Trend Filter

⬜ Advanced Risk Management


Phase 3

⬜ CoinDCX Live Trading

⬜ Exchange Order Management

⬜ Portfolio Tracking

⬜ AI Market Filters


πŸ“Š Current Status

Mode           : PAPER
Timeframe      : 15M
Scan Frequency : Every 15 Minutes
Database       : PostgreSQL
Reporting      : Google Sheets
Notifications  : Telegram
Trading        : Simulated

⚠️ Disclaimer

This project is intended for educational and research purposes.

Paper trading results do not guarantee future performance.

Always validate strategy performance with sufficient historical and forward testing before risking real capital.


πŸ‘¨β€πŸ’» Author

Rohit Pandey

Project: CryptoPilot AI Trader

About

End-to-end automated crypto trading workflow featuring market scanning, signal generation, paper trading, risk management, Telegram alerts, PostgreSQL analytics, and Google Sheets reporting.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors