AI Strategy Assistant
Complete guide to the AI chat in Strategy Builder: prompts, panel controls, review workflow, follow-ups, and troubleshooting.
Navigation: Strategy Builder › New Strategy › AI Assistant
About the AI Strategy Assistant
The AI Strategy Assistant is a chat panel built into Strategy Builder. Instead of clicking through every leg, condition, and risk field yourself, you describe what you want in plain English — and the assistant drafts a full strategy configuration you can review, tweak, and save.
The assistant can configure:
- Basic details — instrument, timeframe, intraday vs multiday
- Trading legs — direction, quantity, options/futures/cash, entry and exit rules
- Risk management — intraday cut-off, square-off, max loss/profit (when you ask for them)
- Variables — deploy-time inputs when a concept does not map to a built-in indicator
You always remain in control: the AI fills the form; you verify every field before saving or deploying.
How to open the assistant
| Path | What happens |
|---|---|
| Strategy Builder → New Strategy → Build with AI Assistant | Skips the instrument/timeframe wizard steps. Opens Strategy Builder with the chat panel automatically and defaults to Options as the instrument type. |
| AI Assistant side tab | On any Strategy Builder session, open the AI Assistant tab in the right-side workspace (desktop) or the AI mobile workspace tab. |
| Close and reopen | Use the X in the chat header to hide the panel. The builder form keeps whatever the assistant last populated. |
On desktop, the chat opens as a resizable panel on the right while the builder stays on the left. The workspace also has a Backtest tab (Live Trade is not available in Strategy Builder).
On mobile, chat is full screen. Use View UI Builder inside the chat to switch back to the form, or close the panel with X.
Before you start — availability
When the panel opens, ATPAlgo checks whether an AI model is configured for your environment (/api/ai/chat/check) and loads the list of active models available for selection.
| State | What you see |
|---|---|
| Checking | A loading spinner: “Checking AI availability…” |
| Available | Welcome message with example prompts, chat input, and a model picker (admin default pre-selected) |
| Not available | A warning: “AI Assistant Currently Not Available” — contact your administrator to configure an AI model |
If the assistant is unavailable, you can still build strategies manually using Create Strategy or Templates.
Your selected model is remembered in this browser. If an admin removes or deactivates that model, the picker falls back to the admin default.
Chat panel layout
Header
| Control | Purpose |
|---|---|
| Strategy Builder AI Assistant title | Identifies the panel |
| Close (X) | Hides the chat panel. On mobile, returns you to the builder view. |
Message area
| Element | Purpose |
|---|---|
| Welcome message | Introduces the assistant; 2–3 random example prompt cards appear below (options, futures, equity intraday/swing, time-based, indicator-based, and more) |
| Your messages | Shown right-aligned in a blue-tinted bubble |
| AI replies | Shown left-aligned with markdown formatting (bold, lists, headings) |
| “Thinking…” | Temporary placeholder while the AI processes your request |
| Example prompt cards | Clickable cards under the welcome message — tap to copy a full strategy prompt into the input box |
| Backtest tip | After your first strategy is created, the assistant shows a tip about running a Backtest from the workspace to validate performance |
Action buttons (below messages)
| Button | When shown | Purpose |
|---|---|---|
| View UI Builder | Mobile only | Switches from chat to the Strategy Builder form so you can review populated fields |
| New Session | After at least one exchange | Starts a fresh chat (see Start a new session) |
Input area
| Control | Purpose |
|---|---|
| Text area | Type your strategy request. Placeholder: “Ask me about strategy building…” |
| Model picker | Choose which AI model to use. Lists every model your administrator marked Active. Defaults to the admin Default model. |
| Send (up-arrow icon) | Sends the message. Disabled when input is empty or AI is unavailable. |
Keyboard shortcuts:
- Enter — send the message
- Shift+Enter — new line without sending
Step-by-step: build a strategy with AI
1. Describe your strategy
Write one clear message covering as much as you can. Strong prompts mention:
| Include | Examples |
|---|---|
| Instrument | NIFTY, BANKNIFTY, RELIANCE |
| Strategy style | Intraday, swing, multiday |
| Instrument type | Options CE/PE, futures, cash equity |
| Entry logic | RSI > 50, EMA crossover, enter at 9:30 AM, first 5-minute candle high |
| Timeframe | 5 minute, 15 minute, 1 hour |
| Exit / risk (optional) | 15% stop loss, 30% target, square off at 3:15 PM |
Example prompts (a random subset appears as cards when you open a new session):
- Intraday NIFTY RSI options with VWAP confirmation and square-off time
- BANKNIFTY futures EMA momentum with trend filters
- NIFTY weekly iron condor or short strangle premium-selling setups
- Multiday NIFTY/SENSEX swing strategies using SMA crosses or breakouts
- Time-based straddles, opening-range breakouts, and MACD/Supertrend momentum entries
Tap any example card in the welcome message to paste the full prompt into the input.
2. Send and wait
After you send:
- Your message appears in the chat.
- The assistant shows “Thinking…” while it calls the AI service.
- A text reply explains what was built (JSON blocks are stripped from the chat — you see a readable summary only).
- If a valid strategy was produced, the Strategy Editor updates automatically (desktop) or when you switch to View UI Builder (mobile).
3. Review the populated form
Open the builder tabs and verify each section. See Create Strategy for field-by-field explanations.
| Tab | What to check |
|---|---|
| Trading Legs | Trade type, quantity (lots), option strike/expiry, entry and exit conditions |
| Risk Management | Intraday times, max loss/profit — only present if you asked for them or the strategy needs them |
| Variables | Any deploy-time inputs the AI created for concepts without a matching indicator |
On desktop, the builder and chat appear side by side. Drag the left edge of the chat panel to resize (25%–50% of screen width). The page breadcrumb shifts to make room.
4. Refine with follow-up messages
You can keep chatting in the same session. Each new message can:
- Change the instrument or timeframe
- Add or remove legs
- Adjust entry/exit conditions or risk rules
- Ask for clarification on what was built
The assistant sends the last 10 messages of conversation history for context, so follow-ups like “change stop loss to 20%” or “use weekly expiry instead” work naturally.
If your request is ambiguous (e.g. “buy an option” with no index or CE/PE), the assistant may ask a short clarification question instead of filling the form. Answer in the chat, then it will generate the strategy.
5. Save your strategy
When you are satisfied:
- Desktop — click Save in the breadcrumb toolbar.
- Mobile — switch to the builder view, then tap Save Strategy at the bottom.
For a new strategy, enter name, description, and optional tags in the save modal. See Create Strategy — Save your strategy.
Then backtest before live deployment.
What the AI configures automatically
When your message is clear enough, the backend generates a complete strategy JSON and the builder maps it into form fields.
| Section | Typical AI behavior |
|---|---|
| Basic details | Infers instrument, timeframe, intraday vs multiday from your text |
| Legs | Sets trade direction, quantity in lots (default 1 lot), options/futures/cash, entry conditions from indicators or time rules |
| Exit | Adds stop loss / profit target only if you mention them (or if required for safety, e.g. naked option selling) |
| Risk management | For intraday strategies, may set entry cut-off and square-off times; other limits only when requested |
| Variables | Created when you mention a value that has no built-in indicator (e.g. custom threshold, premium level) |
The assistant uses ATPAlgo's supported indicators (RSI, EMA, SMA, MACD, Supertrend, Candle, Bollinger Bands, ATR, and others). If your idea does not map to an indicator, it may create a Variable you override at deploy time.
Writing better prompts
Do
- Name the index or stock explicitly
- State CE or PE for option strategies
- Mention intraday vs swing if it matters
- Include stop loss / target if you want leg-level exits
- Specify time-based rules with clock times (e.g. 9:30 AM entry)
- Use follow-up messages to tweak one thing at a time
Avoid relying on the AI for
- Guaranteed returns or “sure profit” setups — the platform may append a disclaimer when profit expectations are mentioned
- Exact strike prices unless you describe them (ATM, 2 strikes OTM, etc.)
- Values the form will reject — review quantity limits and enabled risk fields after population
Quantity note
The AI always uses lots (1, 2, 3…), not raw share counts. For options and futures, 1 lot equals the exchange lot size for that instrument.
Start a new session
Tap New Session when you want to discard the current chat and start a different strategy idea.
If the builder already has data or you have sent messages, a confirmation modal appears:
| Option | Effect |
|---|---|
| Save & Start New | Validates the form, opens the save flow, then clears the builder and chat |
| Discard & Start New | Clears all leg/risk/basic fields and resets chat to the welcome message |
| Cancel | Keeps your current strategy and chat history |
A new session also generates a fresh session ID on the server for chat history tracking.
Daily message limits
Registered users: Your organization may enforce a daily limit on AI chat messages per user. If you exceed the limit, the next send returns an error such as “Daily chat limit reached… Please try again tomorrow.”
Guest users (no sign-in): A separate daily chat limit for guest users applies while you try the Strategy Builder without an account. When you reach the limit, a prompt explains that you can sign in or register for free to keep using the Strategy Builder, along with benefits such as saving strategies, longer backtests, and paper trading.
If sends start failing, wait until the next calendar day or sign in / register to continue with a free account.
Mobile vs desktop
| Feature | Desktop | Mobile |
|---|---|---|
| Panel layout | Fixed right panel beside builder (AI Assistant / Backtest tabs) | Full-screen chat over builder |
| Open assistant | AI Assistant workspace tab | AI mobile workspace tab (or floating robot on logged-in mobile) |
| Review form | Visible side by side | Tap View UI Builder or close chat |
| Resize chat | Drag left edge of panel (25%–50% width) | Not available |
| Send button | Circular arrow button inside the input box (bottom-right) | Same, slightly larger touch target |
| Input height | Starts at one line, expands up to 3 lines with scroll | Same layout, larger font for touch |
| Sidebar | Auto-collapses when chat opens | N/A |
Troubleshooting
| Issue | What to try |
|---|---|
| “AI Assistant Currently Not Available” | Administrator must configure at least one active AI model (and a default). Use manual builder or templates meanwhile. |
| Form not updated after reply | Check for an error toast. Switch to builder tabs and confirm instrument is set. Try a more specific follow-up message. |
| “Could not parse strategy JSON” | Rare AI formatting error. Rephrase the request or build the problematic section manually. |
| Validation errors on Save | AI may have left a required field empty. Open each tab and fix highlighted fields — see Create Strategy. |
| Unexpected stop loss / risk | AI adds risk only when you ask or when strategy type requires it. Disable or edit under Exit criteria or Risk Management. |
| Daily limit error | Wait until the next calendar day or contact support. |
Suggested workflow
- Open New Strategy → Build with AI Assistant (or open the AI Assistant workspace tab on an existing builder session).
- Send a detailed first message (instrument, type, entry, optional exits).
- Read the AI’s summary in chat; scan Trading Legs and Risk Management in the builder.
- Send follow-up tweaks until the configuration matches your intent.
- Backtest from the workspace tab to validate performance.
- Save when satisfied.
- Deploy when backtest results look acceptable.
The assistant is a starting point, not a black box. Combine chat with manual edits in the builder — change indicators, add condition groups, or tighten risk limits after the first draft.
Algo Trading Platform provides tools to implement your rules. AI-generated strategies are not financial advice. Always review, backtest, and understand risk before live trading. See the regulatory disclaimer.
Workflow
- 1Open AI Assistant
From New Strategy or the AI Assistant tab.
- 2Describe your idea
Instrument, logic, timeframe, risk.
- 3AI drafts config
Legs, risk, and variables are filled in.
- 4Review & refine
Check the builder; send follow-ups.
- 5Backtest
Test the draft without saving.
- 6Save & deploy
Save when results look good.
Step-by-Step
- Open Strategy Builder → New Strategy → Build with AI Assistant, or open the AI Assistant workspace tab on an existing builder session.
- Describe your strategy in one message: instrument, option type, entry logic, timeframe, and optional stop loss / target.
- Read the AI reply in chat, then review Legs, Risk, and Variables in the builder.
- Send follow-up messages to refine (e.g. change strike, add a leg, adjust risk).
- Use the Backtest workspace tab to test the draft without saving first.
- Click Save when satisfied.
Use the ? help icon in the app toolbar on any page to jump directly to its documentation section.
Media
Screenshots and a short walkthrough video for this page are being added. In the meantime, follow the steps above or open the ? help icon in the app.