EAsiTrader Expert Advisor - Northen Trading Labs
Date: 2026-03-27
This guide explains how to configure the three axes that control trading in EAsiTrader: Scripts, AI Mode, and AI Permissions. Together these determine who opens trades, who manages open positions, and how scripts and AI coexist.
The guide covers every practical combination - from fully script-driven trading through to full AI autonomy, including hybrid configurations where scripts and AI each handle different parts of the trade lifecycle.
How to read this guide:
EAsiTrader provides five AI modes. Each mode defines a different level of AI involvement in your trading.
| AI Mode | What it does | Who enters trades? | Who manages trades? | AI API cost |
|---|---|---|---|---|
| Disabled | AI is completely switched off. No AI calls are made. The system runs entirely on your scripts and built-in trade management rules. | Entry Scripts | Management Scripts + built-in rules | None |
| Monitor Only | AI periodically analyses the market and displays its assessment on the chart panel. It never influences any trading decisions. | Entry Scripts | Management Scripts + built-in rules | Low (periodic only) |
| Filter Signals | AI periodically analyses the market. When your entry scripts fire a signal, the AI's current assessment is checked. If the AI disagrees with the direction, the signal is blocked. If it agrees, the signal proceeds - optionally at reduced size if the AI rates the setup as low-confidence. | Entry Scripts (AI can veto) | Management Scripts + built-in rules | Low (periodic only) |
| Gated Trading | When your entry scripts fire a signal, it is held pending while an immediate AI request is made. The AI must explicitly approve the trade before it opens. The AI can also optionally manage open positions (close, modify SL/TP) via instructions. | Entry Scripts (AI must approve each one) | Management Scripts + built-in rules + AI management (if permitted) | Medium (on-demand per signal + periodic if managing) |
| Autonomous | AI takes direct control of whichever actions it is permitted to perform. For permitted entry actions, your entry scripts are not evaluated and the AI acts via its own instructions. For actions the AI is NOT permitted to do, your scripts execute normally. Management scripts always run regardless of AI permissions. | AI and/or Entry Scripts (depends on permissions) | Management Scripts + AI management (both active in parallel) | Higher (periodic analysis + instruction execution) |
EAsiTrader provides seven categories of script expression, covering every stage of a trade's lifecycle. Scripts are written in EAsiScript and configured as string expressions in your preset settings.
| Script | Direction | What it does |
|---|---|---|
| Long Entry | Long | Evaluated on each refresh (every new bar by default, or every tick if AutoTradeRefreshMode is set to EveryTick). Returns 0 for no signal, or a price that determines order type: market order if at current price, stop/limit order if away from price. |
| Short Entry | Short | Same as Long Entry but for short positions. |
Entry scripts are the only scripts affected by AI Mode. In Autonomous mode, when AI has the relevant entry permission (AllowOpen for market orders, AllowPlaceOrders for pending orders), entry script signals are not evaluated. In all other modes, entry scripts run normally.
| Script | Direction | What it does |
|---|---|---|
| Long Lots | Long | Returns position size in lots. If 0 or not defined, the calculated default from settings is used. |
| Short Lots | Short | Same as Long Lots but for short positions. |
Lots scripts are evaluated during entry signal processing. They are always script-driven - AI does not control position sizing directly (though AI can reduce size in Filter Signals and Gated Trading modes).
| Script | Direction | What it does |
|---|---|---|
| Long Initial Stop | Long | Returns the initial stop loss price for a new long position. |
| Short Initial Stop | Short | Returns the initial stop loss price for a new short position. |
Initial stop scripts are evaluated once at entry time. They set the starting SL before any trailing or AI modification occurs.
These scripts run on each refresh for each open position, regardless of AI Mode or AI Permissions. When a position is open, management scripts are evaluated every tick even if AutoTradeRefreshMode is set to EveryBar. They operate in parallel with any AI management instructions.
| Script | Direction | What it does | AI permission overlap |
|---|---|---|---|
| Long Trailing Stop | Long | Returns a new SL price. Must be better than current SL and not past current price. | AllowModifySL |
| Short Trailing Stop | Short | Same as Long Trailing Stop but for short positions. | AllowModifySL |
| Long Breakeven | Long | Returns a breakeven trigger price. When conditions are met, SL is moved to entry price. | AllowModifySL |
| Short Breakeven | Short | Same as Long Breakeven but for short positions. | AllowModifySL |
| Long Exit | Long | Returns 0 for no signal, non-zero to close the position immediately. | AllowClose |
| Short Exit | Short | Same as Long Exit but for short positions. | AllowClose |
| Script | What it does |
|---|---|
| AI Trigger | Returns 0 for no action, non-zero to request an AI evaluation. Allows scripts to control when AI is consulted rather than relying solely on the periodic timer. |
The six AI Permission flags control exactly which actions the AI is authorised to take. These flags are primarily relevant in Autonomous mode (where they determine the split of responsibilities between scripts and AI) and in Gated Trading mode (where the management permissions control what the AI can do with open positions).
| Permission | What it controls | Script overlap | When it matters |
|---|---|---|---|
| AllowOpen | Whether the AI can open new market positions (Buy or Sell). When false, only your entry scripts can open market positions. | Long/Short Entry | Autonomous mode only. Forced false in Gated Trading. |
| AllowClose | Whether the AI can close open positions. This lets the AI exit trades based on its analysis. | Long/Short Exit | Autonomous and Gated Trading modes. |
| AllowModifySL | Whether the AI can move the stop loss on open positions. | Trailing Stop, Breakeven | Autonomous and Gated Trading modes. |
| AllowModifyTP | Whether the AI can change the take profit target on open positions. | (none currently) | Autonomous and Gated Trading modes. |
| AllowPlaceOrders | Whether the AI can place new pending orders (Buy Stop, Sell Stop, Buy Limit, Sell Limit). When false, only your entry scripts can place pending orders. | Long/Short Entry | Autonomous mode only. Forced false in Gated Trading. |
| AllowCancelOrders | Whether the AI can cancel existing pending orders that have not yet been filled. | (none) | Autonomous mode only. Forced false in Gated Trading. |
Important: In Gated Trading mode, AllowOpen, AllowPlaceOrders, and AllowCancelOrders are always forced to false regardless of your settings. This is because in Gated Trading the entry decision always comes from your scripts - the AI's role is to approve or reject the script's signal, not to generate its own entries.
Understanding how scripts and AI interact is essential for configuring EAsiTrader correctly. The key principle is:
Entry scripts and AI are mutually exclusive. Management scripts and AI run in parallel.
In Autonomous mode, AI permissions determine who controls entries:
In Gated Trading and Filter Signals modes, entry scripts always run - AI gates or filters the resulting signals but does not generate its own.
Management scripts (Trailing Stop, Breakeven, Exit) always run on every tick for each open position, regardless of AI Mode or AI Permissions. When AI also has management permissions, both operate independently:
This parallel execution is by design. It means management scripts can act as a safety net even when AI is managing, or vice versa. There is no conflict because SL modifications are always validated (must improve the position) and close operations are idempotent (closing an already-closed position has no effect).
| Script Category | Affected by AI Mode? | Can run alongside AI? |
|---|---|---|
| Entry (Long/Short Entry) | Yes - skipped when AI has entry permission in Autonomous mode | No - either scripts or AI, not both |
| Sizing (Long/Short Lots) | Only indirectly (Filter/Gated can reduce size) | n/a |
| Initial Stop | No - always script-driven at entry time | n/a |
| Trailing Stop | No - always runs every tick | Yes - parallel with AllowModifySL |
| Breakeven | No - always runs every tick | Yes - parallel with AllowModifySL |
| Exit | No - always runs every tick | Yes - parallel with AllowClose |
| AI Trigger | No - always runs when defined | n/a |
The following scenarios cover the most common ways to configure EAsiTrader. Each scenario specifies the three axes: Scripts, AI Mode, and AI Permissions. Find the scenario that matches how you want to trade, then apply the settings shown.
Your entry scripts control when trades are opened. Your management scripts (trailing stop, breakeven, exit) and built-in rules (SL/TP from settings) manage open positions. AI is completely switched off. No API calls are made. This is the simplest configuration and is ideal for running simulations in EAsiTrader's Tester or for live trading without any AI involvement.
| AI Mode: | Disabled | |
| Entry Scripts: | Required | (your Long Entry and/or Short Entry expressions) |
| Management Scripts: | Optional | (Trailing Stop, Breakeven, Exit - as needed) |
| AI Permissions: | n/a | (all ignored when AI is Disabled) |
| AI Provider: | Not needed |
How it works: Your Long Entry and Short Entry script expressions are evaluated on each tick. When a script returns a non-zero price, a trade is opened at that price (market order if at current price, stop/limit order if away from price). SL, TP, and BE are calculated from your settings, Initial Stop scripts, and Lots scripts. After entry, Trailing Stop, Breakeven, and Exit scripts run every tick to manage the position. The AI is never consulted.
Your scripts handle all trading decisions exactly as in Scenario 1, but the AI periodically analyses the market and displays its assessment on the chart panel. The AI's opinion is shown for your information only - it never affects any trades. Useful for evaluating whether the AI's analysis aligns with your strategy before giving it more control.
| AI Mode: | Monitor Only | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (as needed) |
| AI Permissions: | n/a | (all ignored in Monitor Only) |
| AI Provider: | Required |
How it works: Scripts trade and manage positions normally. Separately, on a timer (controlled by AI Refresh Interval), the AI analyses the current market and writes its assessment to the chart panel. You can see the AI's directional bias, confidence level, and reasoning. No trades are ever blocked or modified by AI.
Your entry scripts generate signals as normal. Before each signal is executed, the AI's most recent assessment is checked. If the AI disagrees with the direction (e.g., your script says Buy but the AI is bearish), the signal is blocked. If the AI is uncertain, it may allow the trade but at a reduced position size. If the AI agrees, the trade proceeds at full size. If the AI is unavailable (e.g., API timeout), trades proceed normally (fail-open). Management scripts handle positions as usual.
| AI Mode: | Filter Signals | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (as needed - AI does not manage positions) |
| AI Permissions: | n/a | (not used in Filter Signals) |
| AI Provider: | Required |
How it works: The AI analyses the market periodically (not on every signal - it uses a cached assessment). When your script fires a signal, the cached AI assessment is read. The AI returns one of three decisions: Allow (proceed at full size), Reduce (proceed at reduced size based on the AI's risk mode multiplier), or Filter (block the entry entirely). If no AI assessment is available, the signal proceeds as if allowed. Position management remains entirely script/settings-based.
Your entry scripts generate signals, but instead of executing immediately, each signal is held pending while an urgent AI request is sent. The AI evaluates the specific signal in the context of current market conditions and responds with approve, reduce, or reject. If the AI does not respond within the timeout period, the signal is dropped. This is a fail-closed mode - if the AI is down, no trades are opened. Management scripts handle positions as usual.
| AI Mode: | Gated Trading | |
| Entry Scripts: | Required | (signal source - AI does not generate its own entries) |
| Management Scripts: | Optional | (as needed - AI does not manage positions in this scenario) |
| AllowOpen: | n/a | (forced false - scripts provide entries) |
| AllowClose: | false | (set true if you want AI to also close positions) |
| AllowModifySL: | false | (set true if you want AI to also adjust stop losses) |
| AllowModifyTP: | false | (set true if you want AI to also adjust take profits) |
| AllowPlaceOrders: | n/a | (forced false) |
| AllowCancelOrders: | n/a | (forced false) |
| AI Provider: | Required |
How it works: When your script fires, the signal parameters (direction, entry price, SL, TP, volume) are cached and an immediate AI request is triggered. The AI sees the proposed trade and the current market data, then responds with Allow, Reduce, or Filter. Only one signal can be pending at a time - if a second signal fires while the first is awaiting AI response, the second is rejected. The timeout (AI Gate Signal Timeout setting) controls how long to wait. After entry, management scripts run normally.
Same as Scenario 4 (AI must approve every entry), but the AI can also manage your open positions. After a trade is opened, the AI can close it, move its stop loss, or change its take profit based on evolving market conditions. If you also have management scripts configured, they run in parallel with AI management (see Section 4).
| AI Mode: | Gated Trading | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (run in parallel with AI management if configured) |
| AllowOpen: | n/a | (forced false) |
| AllowClose: | true | (AI can close positions) |
| AllowModifySL: | true | (AI can adjust stop losses) |
| AllowModifyTP: | true | (AI can adjust take profits) |
| AllowPlaceOrders: | n/a | (forced false) |
| AllowCancelOrders: | n/a | (forced false) |
| AI Provider: | Required |
How it works: Entry gating works exactly as in Scenario 4. Additionally, the AI periodically reviews open positions and can issue management instructions: close a position, move its stop loss, or change its take profit. Management instructions are validated against the permission flags before execution. If you have Trailing Stop, Breakeven, or Exit scripts configured, they continue to run every tick alongside AI management. The AI cannot open new positions or place new pending orders in this mode.
Your entry scripts open trades without any AI interference - signals execute immediately just like in Disabled mode. However, once a position is open, the AI takes over management. The AI can close positions, adjust stop losses, and modify take profits. This is ideal when you trust your entry logic but want AI to optimise exits and risk management.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (run in parallel with AI management if configured) |
| AllowOpen: | false | (scripts handle market entries, not AI) |
| AllowClose: | true | (AI can close positions) |
| AllowModifySL: | true | (AI can adjust stop losses) |
| AllowModifyTP: | true | (AI can adjust take profits) |
| AllowPlaceOrders: | false | (scripts handle pending orders, not AI) |
| AllowCancelOrders: | false | (optional - set true if AI should cancel stale orders) |
| AI Provider: | Required |
How it works: Because AllowOpen and AllowPlaceOrders are both false, the AI cannot generate its own entries. Your entry scripts fire and execute immediately (the AI does not gate or filter them). Once positions are open, the AI periodically analyses the market and sends management instructions (close, modify SL, modify TP) which are executed on the next timer tick. If you also have management scripts, they run every tick in parallel with AI (see Section 4).
Your scripts handle all entries. The AI's only power is to close positions - it cannot modify stops or targets. This is a conservative configuration where you want the AI to act as a safety net that can pull you out of trades when conditions deteriorate, but cannot interfere with your SL/TP strategy. Your Trailing Stop and Breakeven scripts (if configured) continue to run normally.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (Trailing Stop and Breakeven run normally; Exit scripts also run in parallel with AI close) |
| AllowOpen: | false | |
| AllowClose: | true | (AI can close positions) |
| AllowModifySL: | false | (AI cannot touch stop losses) |
| AllowModifyTP: | false | (AI cannot touch take profits) |
| AllowPlaceOrders: | false | |
| AllowCancelOrders: | false | |
| AI Provider: | Required |
How it works: Scripts enter trades freely. The AI can only close positions. It cannot modify SL or TP. If the AI sends a ModifySL or ModifyTP instruction, it is rejected by the instruction validator. Your Trailing Stop, Breakeven, and Exit scripts continue to run every tick. This gives you full script control over entry timing and risk placement, with AI as an additional exit mechanism.
Your scripts handle all entries. The AI can adjust stop losses and take profits on open positions, but it cannot close them. Use this when you want the AI to dynamically trail stops or extend targets based on market conditions, while your own exit rules (TP hit, SL hit, Exit script, time exit) remain the only way positions close.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | |
| Management Scripts: | Optional | (Exit scripts are the only close mechanism; Trailing Stop runs in parallel with AI SL modifications) |
| AllowOpen: | false | |
| AllowClose: | false | (AI cannot close positions) |
| AllowModifySL: | true | (AI can adjust stop losses) |
| AllowModifyTP: | true | (AI can adjust take profits) |
| AllowPlaceOrders: | false | |
| AllowCancelOrders: | false | |
| AI Provider: | Required |
How it works: Scripts enter trades freely. The AI periodically reviews positions and may send ModifySL or ModifyTP instructions. Close instructions are rejected. If you have Trailing Stop scripts, they run every tick in parallel with AI stop modifications - both can move the SL, and standard validation ensures it only moves in the favourable direction. Positions close only when the broker's SL/TP is hit, your Exit script fires, or via your own exit rules.
The AI has complete control over all trading decisions. It decides when to open and close positions, where to place stops and targets, and when to place or cancel pending orders. Entry scripts are not evaluated. Management scripts, if configured, still run in parallel with AI management.
| AI Mode: | Autonomous | |
| Entry Scripts: | Optional | (not evaluated - AI generates its own entries) |
| Management Scripts: | Optional | (still run if configured - act as safety net alongside AI) |
| AllowOpen: | true | |
| AllowClose: | true | |
| AllowModifySL: | true | |
| AllowModifyTP: | true | |
| AllowPlaceOrders: | true | |
| AllowCancelOrders: | true | |
| AI Provider: | Required |
How it works: The AI periodically analyses the market and sends a complete set of trading instructions: open new positions, close existing ones, modify SL/TP levels, place pending orders, cancel stale orders. All instructions are validated against risk limits (max lots, max risk per trade, max open positions) before execution. Because AllowOpen and AllowPlaceOrders are both true, entry script evaluation is skipped entirely - the AI is the sole source of trade entries. If you have management scripts configured (Trailing Stop, Breakeven, Exit), they still run every tick in parallel with AI management.
A hybrid configuration where the AI decides when to enter at market price (immediate Buy/Sell), while your scripts handle pending orders (Stop and Limit entries). Useful when you have scripts that identify specific price levels for pending orders, but want the AI to decide on market entries.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | (for pending order entries) |
| Management Scripts: | Optional | (as needed) |
| AllowOpen: | true | (AI handles market orders) |
| AllowClose: | true/false | (your preference) |
| AllowModifySL: | true/false | (your preference) |
| AllowModifyTP: | true/false | (your preference) |
| AllowPlaceOrders: | false | (scripts handle pending orders) |
| AllowCancelOrders: | false | (optional) |
| AI Provider: | Required |
How it works: Entry scripts are still evaluated because AllowPlaceOrders is false (scripts own pending orders). When your entry script returns a price equal to the current Ask (for buys) or Bid (for sells), that is a market order - it is ignored because AllowOpen is true (AI handles market entries). When the script returns a price away from the current price, that is a pending order - it executes because AllowPlaceOrders is false (scripts handle pending orders). Management scripts run as usual.
The reverse of Scenario 10. Your scripts decide on immediate market entries, while the AI places pending orders at strategic price levels.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | (for market order entries) |
| Management Scripts: | Optional | (as needed) |
| AllowOpen: | false | (scripts handle market orders) |
| AllowClose: | true/false | (your preference) |
| AllowModifySL: | true/false | (your preference) |
| AllowModifyTP: | true/false | (your preference) |
| AllowPlaceOrders: | true | (AI handles pending orders) |
| AllowCancelOrders: | true | (recommended if AI places orders) |
| AI Provider: | Required |
How it works: Entry scripts are still evaluated because AllowOpen is false (scripts own market entries). Market order signals from your scripts execute immediately because AllowOpen is false (scripts own market entries). Pending order signals from scripts are ignored because AllowPlaceOrders is true (AI owns pending orders). The AI places its own pending orders via instructions. Management scripts run as usual.
The reverse of Scenario 6. The AI controls when trades are opened, but your management scripts handle the position after entry. Your Trailing Stop scripts trail the stop loss, your Breakeven scripts move SL to entry, and your Exit scripts decide when to close. The AI has no management permissions. This is ideal when you trust the AI's market timing but want your own tested risk management rules to run the position.
| AI Mode: | Autonomous | |
| Entry Scripts: | Optional | (not evaluated - AI generates its own entries) |
| Management Scripts: | Recommended | (Trailing Stop, Breakeven, Exit - these are your only position management) |
| AllowOpen: | true | (AI opens market positions) |
| AllowClose: | false | (scripts handle exits, not AI) |
| AllowModifySL: | false | (scripts handle stop management, not AI) |
| AllowModifyTP: | false | (scripts handle targets, not AI) |
| AllowPlaceOrders: | true/false | (true if AI should also place pending orders) |
| AllowCancelOrders: | true/false | (match AllowPlaceOrders) |
| AI Provider: | Required |
How it works: The AI periodically analyses the market and sends open instructions when it identifies entry opportunities. Because AllowOpen is true, entry scripts are not evaluated (if AllowPlaceOrders is also true, they are skipped entirely). Once a position is open, the AI cannot close or modify it - if it sends close or modify instructions, they are rejected by the instruction validator. Your Trailing Stop, Breakeven, and Exit scripts run every tick and are the sole mechanism for managing and closing positions. Positions close when your Exit script fires, SL/TP is hit by the broker, or other built-in exit rules trigger.
The AI controls entries and has full management permissions, but you also have management scripts configured as a safety net. Both operate in parallel - if the AI is slow to react, your scripts can act immediately. If your scripts miss a condition the AI spots, the AI can intervene. This is the most resilient configuration for live trading with AI.
| AI Mode: | Autonomous | |
| Entry Scripts: | Optional | (not evaluated - AI generates its own entries) |
| Management Scripts: | Recommended | (Trailing Stop, Breakeven, Exit - act as safety net alongside AI) |
| AllowOpen: | true | (AI opens market positions) |
| AllowClose: | true | (AI can close positions; Exit scripts also run) |
| AllowModifySL: | true | (AI can adjust stops; Trailing Stop and Breakeven scripts also run) |
| AllowModifyTP: | true | (AI can adjust targets) |
| AllowPlaceOrders: | true | (AI places pending orders) |
| AllowCancelOrders: | true | |
| AI Provider: | Required |
How it works: The AI has full autonomy over entries and management. Entry scripts are not evaluated. However, your management scripts run every tick in parallel with AI instructions. For example: your Trailing Stop script tightens the SL tick-by-tick as price moves favourably, while the AI may also send ModifySL instructions periodically based on its broader market analysis. Your Exit script can close a position immediately if its conditions are met, even if the AI has not yet sent a close instruction. This parallel operation means you have two independent layers of risk management - scripts react instantly on every tick, while AI provides higher-level strategic adjustments.
Your entry scripts control when trades are opened. After entry, both AI and your management scripts manage positions in parallel. The AI provides strategic management (closing positions based on market analysis, adjusting SL/TP based on conditions), while your scripts provide mechanical management (trailing stops, breakeven moves, rule-based exits). This is the recommended configuration for traders who want to keep their tested entry logic but add AI as an additional management layer.
| AI Mode: | Autonomous | |
| Entry Scripts: | Required | |
| Management Scripts: | Recommended | (Trailing Stop, Breakeven, Exit - run in parallel with AI) |
| AllowOpen: | false | (scripts handle entries) |
| AllowClose: | true | (AI can close positions; Exit scripts also run) |
| AllowModifySL: | true | (AI can adjust stops; Trailing Stop and Breakeven scripts also run) |
| AllowModifyTP: | true | (AI can adjust targets) |
| AllowPlaceOrders: | false | (scripts handle pending orders) |
| AllowCancelOrders: | false | |
| AI Provider: | Required |
How it works: Entry scripts fire and execute immediately (AllowOpen is false, so AI cannot enter). Once positions are open, both your management scripts and AI operate in parallel. Your Trailing Stop script tightens the SL every tick. Your Breakeven script moves SL to entry when triggered. Your Exit script closes positions based on your rules. Simultaneously, the AI periodically reviews positions and can also close them, move SL, or adjust TP. Whichever acts first wins - there is no conflict because SL moves are validated to only improve the position, and close operations are idempotent.
When running in EAsiTrader's Tester (simulation mode), AI is completely suppressed regardless of your AI Mode setting. This is by design for the following reasons:
Why AI is disabled during simulations:
What happens during simulation for each mode:
| AI Mode Setting | Simulation Behaviour | Entry Scripts Run? | Management Scripts Run? | Trades Open? |
|---|---|---|---|---|
| Disabled | Normal - no AI involvement | Yes | Yes | Yes |
| Monitor Only | AI display skipped, scripts trade normally | Yes | Yes | Yes |
| Filter Signals | AI filter skipped (fail-open), scripts trade normally | Yes | Yes | Yes |
| Gated Trading | AI gate skipped, scripts trade directly without approval | Yes | Yes | Yes |
| Autonomous (AllowOpen=true) | AI ignored, scripts trade directly | Yes | Yes | Yes |
| Autonomous (AllowOpen=false) | AI ignored, scripts trade directly | Yes | Yes | Yes |
In all cases, the Tester runs your entry scripts and management scripts and executes trades using the built-in trade management rules. The AI Mode setting is preserved so that when you switch back to live trading, the correct AI behaviour resumes automatically.
Answer these questions to find the right scenario for you:
Q1: Do you want AI involved at all? No --> Scenario 1 (Scripts Only, AI Disabled)
Q2: Do you want AI to observe without affecting trades? Yes --> Scenario 2 (Monitor Only)
Q3: Do you want AI to have a say in entries? Yes, but with fail-open (trades proceed if AI is down) --> Scenario 3 (Filter Signals) Yes, with fail-closed (no trades if AI is down) --> Scenario 4 or 5 (Gated Trading)
Q4: Should AI also manage open positions (SL/TP/Close)? No (AI only gates entries) --> Scenario 4 (Gated, no management) Yes (AI gates entries AND manages positions) --> Scenario 5 (Gated + management)
Q5: Who should enter trades? Scripts --> go to Q6 AI --> go to Q7 Hybrid (AI does market, scripts do pending, or vice versa) --> Scenario 10 or 11
Q6: Scripts enter - who manages positions? Scripts only (no AI management) --> Scenario 1 (Disabled) or Scenario 8 (AI adjusts SL/TP only) AI only --> Scenario 6 (AI manages) AI can only close (protective) --> Scenario 7 (protective AI) Both scripts and AI in parallel --> Scenario 14 (belt and braces)
Q7: AI enters - who manages positions? Scripts only --> Scenario 12 (AI enters, scripts manage) AI only --> Scenario 9 (full autonomy, no management scripts) Both scripts and AI in parallel --> Scenario 13 (belt and braces)
EAsiTrader validates your AI configuration at startup and prints warnings or errors to the Experts log. The following rules are checked:
| Rule | Severity | What it means |
|---|---|---|
| AI enabled but no provider configured | Error | You have set an AI Mode other than Disabled, but the AI Provider Config String is empty. Configure a provider or set AI Mode to Disabled. |
| Autonomous mode: no permissions enabled | Error | You have set Autonomous mode but all permission flags (AllowOpen, AllowClose, AllowModifySL, AllowModifyTP, AllowPlaceOrders, AllowCancelOrders) are false. At least one must be true for Autonomous mode to do anything useful. |
| Gated Trading: no entry scripts | Error | You have set Gated Trading mode but both Long Entry and Short Entry script expressions are empty. Gated Trading requires scripts to generate the signals that the AI will gate. |
| Filter Signals: no entry scripts | Warning | You have set Filter Signals mode but there are no entry scripts. The AI has nothing to filter. Trading will still work (nothing to block) but this is probably not what you intended. |
| Low AI Refresh Interval | Warning | Your AI Refresh Interval is below 10 minutes for Filter Signals or Autonomous mode. This may cause excessive API calls and costs. Consider increasing the interval. |
The table below shows the exact settings for every scenario at a glance. Y = true/enabled, N = false/disabled, - = not applicable/ignored, * = your choice.
| # | Scenario | AI Mode | Entry Scripts | Mgmt Scripts | AllowOpen | AllowClose | AllowModSL | AllowModTP | AllowPlace | AllowCancel |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Scripts only | Disabled | Y | * | - | - | - | - | - | - |
| 2 | Scripts + AI observes | Monitor | Y | * | - | - | - | - | - | - |
| 3 | Scripts + AI filters | Filter | Y | * | - | - | - | - | - | - |
| 4 | Scripts + AI gates | Gated | Y | * | - | N | N | N | - | - |
| 5 | Scripts + AI gates + manages | Gated | Y | * | - | Y | Y | Y | - | - |
| 6 | Scripts enter, AI manages | Autonomous | Y | * | N | Y | Y | Y | N | N |
| 7 | Scripts enter, AI closes only | Autonomous | Y | * | N | Y | N | N | N | N |
| 8 | Scripts enter, AI adjusts SL/TP | Autonomous | Y | * | N | N | Y | Y | N | N |
| 9 | Full AI autonomy | Autonomous | * | * | Y | Y | Y | Y | Y | Y |
| 10 | AI market + scripts pending | Autonomous | Y | * | Y | * | * | * | N | * |
| 11 | Scripts market + AI pending | Autonomous | Y | * | N | * | * | * | Y | Y |
| 12 | AI enters, scripts manage | Autonomous | * | Y | Y | N | N | N | * | * |
| 13 | AI enters, both manage | Autonomous | * | Y | Y | Y | Y | Y | Y | Y |
| 14 | Scripts enter, both manage | Autonomous | Y | Y | N | Y | Y | Y | N | N |