Discord Forex AI trading assistant w/ proper position sizing (metatrader5)
Ready for 3.0What this workflow does
This AI workflow has 40 nodes and runs on a schedule (every day). Along the way it connects Discord and OpenAI Chat Model.
How it runs
Trigger: On a schedule (every day).
- set credentials and params (Edit Fields (Set)): sets or maps fields
- Get recent message - omni (Discord): uses Discord
- only get user's message that has no reacts (Filter): keeps only the items that match a condition
- React with an emoji to a message (Discord): uses Discord
- Trading Assistant Classifier & Responder (Basic LLM Chain): sends a prompt to an LLM, with model: 4o mini
- parse LLM output (Code): runs custom JavaScript code
- Switch: routes items into branches
- parse if AI says content is complete (Code): runs custom JavaScript code
- respond: query (Discord): uses Discord
- ai agent instructions (Edit Fields (Set)): sets or maps fields
…plus 26 more steps. See the full node list below.
Services it uses
Other OpenAI + Discord templates (89)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Discord
n8n-nodes-base.discord - Switch
n8n-nodes-base.switch - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter
From the author
AI Trading Assistant with Metatrader5 and position sizing capabilities Trade or buy/sell forex and xauusd/gold assets with this n8n template. It demonstrates an AI-powered Discord bot that monitors trading commands in a private server channel and…