Signal generation
Using AI to Analyze Trading Charts with Send Signal enabled
🧠 Smart Signal Execution
This advanced feature lets the AI not only analyze your chart but also make real trading decisions. When enabled, the AI can trigger a signal that is automatically sent to your webhook for live execution.
🧠 How It Works
When “Send Signal” is enabled:
A screenshot of the chart (including your indicators) is sent to the AI
A custom prompt guides the model to make a trading decision
If the AI responds with
LONG,SHORT, orEXIT, a signal is dispatchedIf the AI responds with
HOLD, no action is taken
⚠️ Response Format is Mandatory for Signal Generation
To trigger a signal, the AI must respond with one of the exact patterns below. If the model’s output deviates from this format — for example, by including extra text, explanations, or incorrect structure — no signal will be generated.
✅ Accepted Format:
<action>:<price>Where:
<action>is one of: LONG, SHORT, EXIT, or HOLD — this will be available in{{last_trigger_action}}.<price>is the latest visible chart price (e.g.,29650.32) — this will be available in{{last_trigger_price}}.
✅ Examples (valid responses):
❌ Examples (invalid responses – will not trigger a signal):
Important: If the response doesn’t exactly match the required
<action>:<price>format, the system will ignore the output and take no action.
Be sure to design your prompt in a way that strictly enforces this format and suppresses any explanation or commentary from the AI. The cleaner the output, the more reliable your signal execution pipeline will be.
🧠 System Prompt (Automatically Added)
When signal sending is enabled, two things happen automatically:
Prepending context to your prompt:
Appending output instruction to your prompt:
You do not need to include these in your custom prompt — the system handles it for you.
⚙️ Writing a Good Prompt
To ensure reliable signals, your custom prompt should focus on the decision-making logic, not the output format. Here's an example:
📝 Example Custom Prompt
🔁 The system will handle formatting instructions automatically — no need to repeat them.
🧩 Template Variables
To make prompt creation easier and more dynamic, you can now use the following template variables in your prompt:
{{last_trigger_action}}
The last executed signal (e.g., LONG, SHORT, EXIT)
{{last_trigger_price}}
The price of the symbol when the last trigger occurred
{{last_trigger_at}}
Timestamp when the last signal was executed (e.g., 2025-06-04 15:32 UTC)
{{current_time}}
The current time (automatically filled before execution)
{{trigger_history}}
An array (up to 20 items) of the model’s past actions, including trigger type, symbol, price, and timestamp, used to provide historical context for better decision-making.
{{val:<name>=<value>}}
Declares a custom value within your prompt. You can define it once and reuse it anywhere. For example:
{{val:user=Joe}} then later use {{user}} → will be replaced with Joe.
{{comment:<text>}} or {{#:<text>}}
Adds inline comments to the prompt for readability and documentation. Comment content is stripped before the final prompt is sent and never reaches the model.
{{get:<url>}}
Fetches data via an HTTPS GET request from the specified URL and injects the response into the prompt. Requests are limited to HTTPS and have a timeout of 1750 ms.
{{toon:<json>}}
Converts JSON into Toon format, a compact link-based representation that helps reduce final prompt token count while preserving the original content semantics.
These help the AI reason based on past actions and current context.
📝 Example Prompt with Templates
Last updated