How are you guys handling live drawdown tracking for HFT EAs? (My WebRequest solution)

 

Hey everyone,

I’ve been working on a few high-frequency EAs lately, mostly geared towards passing prop firm challenges. Some of my systems are pushing out over 10,000 trades a month.

I ran into a massive bottleneck with tracking live, real-tick drawdown. Standard MT4/MT5 mobile push notifications are useless when you have dozens of trades opening and closing in minutes. I also found that trying to send direct Telegram messages via WebRequest on every single trade was either slowing down the EA execution or hitting Telegram's API rate limits.

To get around this, I built a custom webhook architecture. Instead of the EA talking directly to Telegram, I wrote a snippet that batches the current equity, drawdown percentage, and open trade count, and sends it asynchronously to a custom backend I built (using Next.js). That backend then feeds a clean UI in a Telegram Mini App, giving me a live snapshot without spamming my phone with individual trade alerts.

Here is a simplified version of the logic I'm using to batch the stats so it doesn't freeze the terminal:

void SendDrawdownStats() {
    static datetime last_send_time = 0;
    
    // Only send every 60 seconds to avoid API rate limits and execution lag
    if(TimeCurrent() - last_send_time < 60) return; 

    double current_equity = AccountInfoDouble(ACCOUNT_EQUITY);
    double current_balance = AccountInfoDouble(ACCOUNT_BALANCE);
    double current_dd = 0;
    
    if(current_balance > 0) {
        current_dd = ((current_balance - current_equity) / current_balance) * 100;
    }


    string payload = "{\"equity\":" + DoubleToString(current_equity, 2) + 
                     ", \"drawdown\":" + DoubleToString(current_dd, 2) + "}";
                     
    char post[], result[];
    string headers;
    StringToCharArray(payload, post);

    // Sending to a custom endpoint rather than direct to Telegram API
    string url = "https://your-custom-endpoint-here.com/api"; 
    int res = WebRequest("POST", url, "Content-Type: application/json\r\n", 5000, post, result, headers);
    
    if(res == 200) {
        last_send_time = TimeCurrent();
    }
}

This completely solved my issue with monitoring strict daily loss limits while away from the VPS.

Since forum rules strictly prohibit posting links to external services, commercial sites, or Telegram bots, I won't drop the link to the actual dashboard we use. But I wanted to share the concept because relying on native MT5 alerts for high-frequency systems is a nightmare.

How are the rest of you handling remote monitoring for high-frequency setups? Has anyone found a better way to optimize WebRequest for this without causing execution lag, or a cleaner way to handle the JSON parsing?