Integrations
Processes signals from Pine Script indicators that analyze RSI and Stochastic RSI to generate buy/sell signals with confidence ratings for cryptocurrency trading
Connects TradingView's Pine Script indicators to receive cryptocurrency trading signals based on RSI and Stochastic RSI analysis through webhook alerts
MindLayer TradingView MCP Agent
A powerful integration system that connects TradingView's Pine Script indicators with MindLayer's MCP (Model Context Protocol) for advanced cryptocurrency trading signals based on RSI and Stochastic RSI.
Overview
This system consists of three main components:
- Pine Script Indicator: A TradingView indicator that analyzes RSI and Stochastic RSI to generate buy/sell signals.
- MCP Agent: A Python application that processes these signals and communicates with MCP-enabled systems.
- REST API: An HTTP API that allows programmatic access to all MCP agent functionality.
Features
- 📊 RSI & Stochastic RSI Analysis: Generates signals based on these powerful momentum indicators
- 🔄 Multi-Timeframe Analysis: Confirms signals using higher timeframe data
- 📱 Real-time Alerts: Sends alerts via TradingView's webhook system
- 🤖 MCP Integration: Seamlessly integrates with MindLayer's Model Context Protocol
- 📈 Adaptive Confidence Levels: Each signal includes a strength indicator (1-5)
- 🛡️ Risk Management: Configurable risk profiles based on your trading style
- 🌐 RESTful API: Access all functionality programmatically via HTTP API
Setup Instructions
TradingView Indicator Setup
- Log in to your TradingView account
- Go to Pine Editor
- Create a new indicator and paste the contents of
MindLayer_MCP_Signal.pine
- Save and add to chart
- Configure the indicator settings according to your preferences
System Setup
- Clone this repository
- Install required dependencies:Copy
- Configure your settings (edit
config.py
or use environment variables) - Start the system using the launcher script:Copy
Command Line Options
The run.py
script accepts several command-line arguments:
TradingView Alert Setup
- Open your chart with the MindLayer MCP Signal indicator
- Right-click on the indicator and select "Add Alert"
- Set condition to trigger on "MindLayer MCP Buy Signal" or "MindLayer MCP Sell Signal"
- In the webhook URL field, enter your MCP agent's webhook URL (e.g.,
http://your-server:8000
) or the API webhook endpoint (e.g.,http://your-server:5000/api/webhook
) - In the message field, paste the following JSON template:Copy
- Save the alert
Configuration
Environment Variables
You can configure the system using environment variables (create a .env
file):
Pine Script Customization
The TradingView indicator is highly customizable:
- Risk Profile: Conservative, Moderate, or Aggressive
- RSI Parameters: Change length and overbought/oversold thresholds
- Stochastic RSI Parameters: Adjust K, D periods and thresholds
- Visual Settings: Customize colors and display options
Signal Interpretation
Buy Signals
- Strong Buy: Green arrow with high confidence rating (4-5)
- Moderate Buy: Light green arrow with medium confidence rating (2-3)
- Weak Buy: Dotted green arrow with low confidence rating (1)
Sell Signals
- Strong Sell: Red arrow with high confidence rating (4-5)
- Moderate Sell: Light red arrow with medium confidence rating (2-3)
- Weak Sell: Dotted red arrow with low confidence rating (1)
How It Works
- The Pine Script indicator analyzes price action using RSI and Stochastic RSI
- When conditions meet your configured criteria, it displays a buy/sell signal on the chart
- TradingView sends an alert via webhook to your MCP agent or API
- The MCP agent processes the signal and communicates with MCP-enabled systems
- (Optional) The agent can execute trades based on these signals
REST API Documentation
The system includes a comprehensive REST API for programmatic access to all functionality.
API Endpoints
Signal Management
GET /api/signals
- Get all trading signalsGET /api/signals?symbol=BTCUSDT
- Get signals for a specific symbolPOST /api/signals
- Manually create a new signal
Indicator Values
GET /api/indicators
- Get all indicator valuesGET /api/indicators?symbol=BTCUSDT
- Get indicator values for a specific symbol
Agent Control
GET /api/status
- Get current agent statusPOST /api/start
- Start the MCP agentPOST /api/stop
- Stop the MCP agent
Configuration
GET /api/config
- Get current configurationPUT /api/config
- Update configuration settings
Webhook
POST /api/webhook
- Receive webhook from TradingView
API Documentation
GET /api/docs
- Get detailed API documentation
API Usage Examples
Get Current Agent Status
Get All Signals
Create a Manual Signal
Update Configuration
Requirements
- Python 3.7+
- TradingView account (Pro plan recommended for webhook alerts)
- Server or cloud instance to run the MCP agent and API (if using webhooks)
System Architecture
Best Practices
- Always test thoroughly in a paper trading environment before using real funds
- Combine these signals with other analysis and risk management techniques
- Higher timeframe signals tend to be more reliable than very short timeframes
- Consider market conditions that might impact signal reliability
- Secure your API server behind proper authentication if exposing to the internet
Support
If you encounter issues or have questions, please open an issue on this repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
Trading cryptocurrency involves substantial risk. Past performance of this indicator does not guarantee future results. Always use proper risk management and never trade with funds you cannot afford to lose.
This server cannot be installed
Connects TradingView's Pine Script indicators with MindLayer's MCP for cryptocurrency trading signals based on RSI and Stochastic RSI analysis.
Related MCP Servers
- -securityAlicense-qualityAn MCP server providing a range of cryptocurrency technical analysis indicators and strategies.Last updated -64JavaScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that delivers cryptocurrency sentiment analysis to AI agents.Last updated -51PythonMIT License
- -securityAlicense-qualityAn MCP server that integrates with the Freqtrade cryptocurrency trading bot.Last updated -16PythonMIT License
- -securityAlicense-qualityAn MCP server for tracking and managing cryptocurrency portfolio allocations, enabling AI agents to query and optimize portfolio strategies in real time.Last updated -PythonMIT License