Skip to content

Latest commit

 

History

History
121 lines (87 loc) · 3.31 KB

File metadata and controls

121 lines (87 loc) · 3.31 KB

Amibroker Plugin for Alphabots

A file monitor that reads signals from Amibroker and forwards them to Alphabots Signal Webhook.

⚠️ Beta Phase: This integration is currently in beta. Please report any issues.

📋 Prerequisites

  • Amibroker installed and configured
  • Alphabots webhook URL (get from alphabots.in)
  • Windows OS (executable is Windows-only)

🚀 Quick Setup

1. Download and Run

  1. Copy the plugin contents to a folder on your computer
  2. Run `signal_file_monitor.exe` by double-clicking it

2. Required Files

Ensure these files are in the same directory as the executable:

  • `signal_file_monitor.exe` - The main executable
  • `alphabots_signal.json` - Configuration file (created automatically)
  • `signal.json` - Signal output from your AFL script
  • `symbol_map.json` - Symbol mapping (see below)
  • `.env` - Environment file with webhook URL

3. Configure Webhook URL

Open `.env` in a text editor and add your webhook URL:

``` ALPHABOTS_WEBHOOK_URL=https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/YOUR_UUID ```

4. Configure AFL Script

Your AFL script should write signals to `signal.json`. Example:

```c // Open file for writing fh_write = fopen("C:\\path\\to\\signal.json", "w");

// Prepare JSON signal json_string = '{"order":[{"type":"ENTRY","symbol":"NSE:NIFTY25APRFUT","quantity":1,"side":"B","ordertype":"MARKET","segment":"FUT","product":"N"}]}';

// Write to file fputs(json_string, fh_write); fclose(fh_write); ```

📝 Symbol Mapping

Map your internal Amibroker symbols to Alphabots format in `symbol_map.json`:

```json { "NIFTY-I": "NSE:NIFTY25APRFUT", "BANKNIFTY-I": "NSE:BANKNIFTY25APRFUT", "AXISBANK": "NSE:AXISBANK-EQ", "BAJFINANCE": "NSE:BAJFINANCE-EQ" } ```

📊 Order Format

The signal file monitor expects this JSON format:

```json { "order": [{ "type": "ENTRY", "symbol": "NSE:NIFTY25APRFUT", "quantity": 1, "side": "B", "ordertype": "MARKET", "segment": "FUT", "product": "N" }] } ```

Field Reference

Field Values Required For
`type` "ENTRY" or "EXIT" All
`symbol` "NSE:SYMBOL-EQ", "NSE:NIFTY25APRFUT" All
`quantity` Number (> 0) All
`side` "B" or "S" All
`ordertype` "MARKET", "LIMIT", "STOP", "STOPLIMIT" All
`segment` "EQ", "FUT", "OPT" ENTRY only
`product` "I", "D", "N" ENTRY only
`limit_price` Number (> 0) LIMIT, STOPLIMIT
`stop_price` Number (> 0) STOP, STOPLIMIT

🔧 How It Works

  1. Your AFL script writes signals to `signal.json`
  2. The file monitor detects changes to `signal.json`
  3. It reads the JSON and forwards it to your Alphabots webhook
  4. Alphabots executes the order on your connected broker

⚠️ Important Notes

  • Ensure `signal.json` is writeable by Amibroker
  • The monitor watches for file changes - no manual intervention needed
  • Check logs for any errors or failed requests
  • Test with paper trading first

🆘 Support


Last updated: February 2026