What Makes Trader Pro Different?

Most AFLs give you either a chart indicator or an Explorer scanner. Trader Pro delivers both in a single file. It's designed to be your primary AmiBroker workspace AFL โ€” loaded on every chart, providing complete context at a glance.

The AMA2 adaptive moving average forms the core S/R engine. AMA2 moves quickly in trending markets and slows down in sideways conditions โ€” making the dynamic support/resistance level extremely accurate at identifying genuine trend changes versus noise.

โœ…
This AFL is powered by Amidata โ€” it fetches Daily High and Daily Low via TimeFrameSet(inDaily) and displays them in the chart title bar for quick reference.

The Three-State Signal System

Unlike binary Buy/Sell systems, Trader Pro uses a 3-state approach โ€” acknowledging that markets are often in a "Wait" condition where it's better to stand aside:

๐ŸŸข
BUY (B) โ€” state = 1. Close has crossed above the AMA2 dynamic level. Up arrows plotted. Explorer column shows 'B' on yellow background. Enter long positions.
๐Ÿ”ด
SELL (S) โ€” state = 0. Close has crossed below the AMA2 dynamic level. Down arrows plotted. Explorer column shows 'S' on pink background. Exit longs / enter shorts.
โณ
WAIT (W) โ€” state unchanged. Price is moving within the dynamic S/R zone without a confirmed breakout. Explorer shows 'W' on yellow/red background. No new positions.

On-Chart Price Target Labels

On every Buy or Sell signal bar, Trader Pro automatically plots text labels directly on the chart showing:

  • Buy Signal Label: Entry price, Target (+0.5%), Stop-Loss (โˆ’0.25%) โ€” plotted below the bar
  • Sell Signal Label: Entry price, Target (โˆ’0.5%), Stop-Loss (+0.25%) โ€” plotted above the bar

These labels are calculated dynamically from High/Low prices using ATR(10) as the vertical offset, keeping them readable regardless of chart zoom level.

Trader_Pro.afl โ€” AMA2 State Machine + Explorer Columns
// AMA2-based dynamic S/R and state detection prev = AMA2(C, 1, 0); d = IIf(C > Ref(HH20, -1), LL20, IIf(C < Ref(LL20, -1), HH20, PREV)); state = IIf(BarsSince(a) < BarsSince(b), 1, 0); s = state > Ref(state, -1); // BUY transition ss = state < Ref(state, -1); // SELL transition sss = state == Ref(state, -1); // WAIT (no change) // Explorer: color-coded B/S/W columns AddColumn(IIf(s, 66, 1), "buy", formatChar, 1, bkcolor = IIf(s, colorYellow, colorPink)); AddColumn(IIf(ss, 83, 1), "sell", formatChar, 1, bkcolor = IIf(ss, colorPink, colorWhite)); AddColumn(IIf(sss, 87, 1), "wait", formatChar, 1, bkcolor = IIf(sss, colorYellow, colorRed));

Technical Specifications

Core Engine
AMA2 Adaptive MA
S/R Lookback
10, 15, 20 bars
Signal States
Buy / Sell / Wait
Daily H/L
TimeFrameSet(inDaily)
Chart Arrows
3-layer stacked
Target %
ยฑ0.5% from entry
Stop %
ยฑ0.25% from entry
Explorer
Full B/S/W with colors

Recommended Usage Workflow

Morning Explorer Scan

Run Trader Pro in AmiBroker Explorer on your NSE watchlist each morning. Sort by "buy" column to see all stocks in BUY state. These are your longs candidates for the day.

Chart Analysis

Open the chart of the best-looking Buy stocks. Verify the on-chart arrows and target labels. Check that the stock is above the AMA2 dynamic level with good momentum.

Enter on State Change

Enter long on the bar after the Buy (B) state transition. Use the plotted stop-loss level as your risk reference. Target is auto-labeled on chart.

Exit on Sell/Wait

Exit when the state shifts to SELL (ss=1). Stocks showing WAIT (W) โ€” hold existing positions but don't add new ones.

๐Ÿ’ก
Chart Title Enhancement: The AFL displays Today's High and Low (via Daily timeframe) directly in the chart title bar โ€” powered by Amidata. This replaces the default AmiBroker title for quicker intraday reference.