๐Ÿš€ RiskTrader Quick Start Guide

โš ๏ธ IMPORTANT: Always test with a demo account first! Your webhook URL is your API key - keep it private.

๐Ÿ”ท MetaTrader 4/5

Step 1: Add this function to your EA

bool CheckRiskTrader(double lots) {
    string webhook_url = "YOUR_WEBHOOK_URL";
    string json = StringFormat("{\"action\":\"CHECK\",\"symbol\":\"%s\",\"volume\":%f}", 
                              Symbol(), lots);
    
    char post_data[];
    StringToCharArray(json, post_data);
    
    char result[];
    string headers = "Content-Type: application/json\r\n";
    
    int res = WebRequest("POST", webhook_url, headers, 5000, post_data, result, headers);
    
    if(res == -1) {
        Print("Error: ", GetLastError());
        return true; // Allow trade if can't connect
    }
    
    string response = CharArrayToString(result);
    return (StringFind(response, "\"allowed\":true") >= 0);
}

Step 2: Use before EVERY trade

if (CheckRiskTrader(LotSize)) {
    int ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "My order", 16384, 0, Green);
} else {
    Alert("Trade blocked by RiskTrader!");
}

Step 3: Allow WebRequests

Tools โ†’ Options โ†’ Expert Advisors โ†’ Allow WebRequests
Add URL: https://your-app.vercel.app

๐Ÿ“Š TradingView (Pine Script)

Add to your strategy:

if (longCondition)
    strategy.entry("Long", strategy.long, 
        alert_message='{"action":"OPEN","symbol":"' + syminfo.ticker + '","volume":' + str.tostring(position_size) + ',"price":' + str.tostring(close) + '}')

Set up Alert:

1. Create Alert on your strategy
2. Set Webhook URL to your RiskTrader webhook
3. Make sure "Webhook URL" is checked

๐Ÿ Python / Custom Bots

import requests

WEBHOOK_URL = "YOUR_WEBHOOK_URL"

def check_trade(symbol, volume):
    """Check if trade is allowed before placing"""
    response = requests.post(WEBHOOK_URL, json={
        'action': 'CHECK',
        'symbol': symbol,
        'volume': volume
    })
    
    if response.status_code == 200:
        data = response.json()
        if not data['allowed']:
            print(f"Trade blocked: {data.get('reason', 'Unknown')}")
            if 'suggestion' in data:
                print(f"Suggestion: {data['suggestion']}")
        return data['allowed']
    return True  # Allow if API is down

# Example usage
if check_trade('EURUSD', 1.0):
    # Place your trade here
    place_order('EURUSD', 1.0)
else:
    print("Trade not placed - risk limit reached")

๐Ÿงช Test Your Integration

1. Test connection:

curl -X POST YOUR_WEBHOOK_URL \
  -H "Content-Type: application/json" \
  -d '{"action":"CHECK","symbol":"EURUSD","volume":1.0}'

2. Expected response:

{
  "allowed": true,
  "dailyPL": 0,
  "dailyLimit": 500,
  "tradesLeft": 3
}

๐Ÿ“ฑ Other Platforms

RiskTrader works with ANY platform that can send HTTP requests:

Need help with integration?

๐ŸŽฏ Beta Testing Checklist:

  1. โœ… Connect webhook to demo account
  2. โœ… Make normal trades (should be allowed)
  3. โœ… Trade until you approach daily limit
  4. โœ… Verify trades are blocked at limit
  5. โœ… Report bugs in Pumble
  6. โœ… Suggest features you need

Beta Support

๐Ÿ“ง Email: beta@risktrader.ai
๐Ÿ’ฌ Community: Coming soon!
๐ŸŒ Website: risktrader.ai

We're here to help you integrate successfully. Don't hesitate to reach out!

โ† Back to Homepage