End-of-day screening, next-session plans and backtests for IDX stocks
ARA works on data that arrives after the market closes. Each evening it syncs prices, broker summaries and IHSG, runs the screeners, and builds the orders for the next session. Every rule can be replayed over history with the backtest.
A trading day
Times are WIB. Nothing depends on intraday data.
- 16:30Sync. Every 15 minutes: IHSG, daily prices and broker summaries newer than what is stored.
- ≤ 19:00Wait for data. Ready when IHSG has the day's bar, 500+ stocks have prices and broker summaries are in (it stops waiting for summaries at 19:00).
- readyPlan. Past plans are scored, then the next-session plan is built and sent to Telegram.
- 20:00Holiday check. No IHSG bar by now means there was no session.
- 23:00–05:00Stockbit maintenance. No data requests; a startup in this window only syncs the stock and broker lists.
- 08:45Pre-opening. Place the plan's orders; stops and targets were fixed the evening before.
Smart Money screener
Stocks that brokers and foreign investors are accumulating while the trend is up. Every rule is evaluated as of the screening date.
| Filter | Rule |
|---|---|
| Liquidity | ≥ Rp1B traded that day and a 20-day median ≥ Rp5B |
| Trend | Close above a rising 20-day average |
| Accumulation | Brokers net buying (Acc) on the latest session |
| Foreign flow | 5-day net foreign buying ≥ 6.5% of 5-day traded value |
| Not extended | No more than 16% above the 20-day average |
Score (0–100, 25 points per factor)
| Factor | Full points | Fewer points |
|---|---|---|
| 5-day foreign flow / value | ≥ 16% | ≥ 6.5%: 80% · ≥ 0: 40% |
| Broker Acc days, last 5 | 5 of 5 | Proportional |
| Distance above MA20 | ≤ 8% | ≤ 16%: 70% · more: 20% |
| Position in 60-day range | 50–85% | Top or lower-middle: 60% · bottom quarter: 20% |
Score ≥ 75 is BUY, ≥ 60 HOLD, below that AVOID. The score ranks candidates; it is not a probability.
How the rules were chosen
Liquid IDX stocks, Jan–Apr 2026, bought at the next open, compared with the liquid market over the following 10 sessions.
One 3½-month period; plan scoring and the backtest track whether it holds.
Trading skills
Ported from tradermonty/claude-trading-skills (MIT) and adjusted for IDX, using stored daily prices with IHSG as the benchmark.
| Skill | What it finds | Endpoint |
|---|---|---|
| VCP | Uptrending stocks tightening into a pivot (Minervini), with a breakout plan | /skills/vcp |
| Momentum Burst | Day-1 breakouts from a tight base on rising volume (Stockbee) | /skills/momentum-burst |
| Exhaustion Hammer | Hammers after a 6–35% pullback in a stock with prior momentum | /skills/exhaustion-hammer |
| Market state | IHSG follow-through day, distribution days and the market gate | /skills/market-state |
| Breadth | Share of liquid stocks above their 200-day average, scored 0–100 | /skills/breadth |
| Position sizer | Risk-based size in lots, with fees and ARB warnings | /skills/position-size |
Next-session plan
All screeners combined into orders that can be placed before the open. A stock picked by more than one screener ranks higher.
| Setup | Entry |
|---|---|
| VCP | Buy only above the pivot; maximum price pivot + 2% |
| Momentum Burst | Limit at the close + 1% |
| Exhaustion Hammer | Limit at the close |
| Smart Money | Limit at the close |
Stops round down and targets round up to IDX ticks (targets ≥ 1.5R); maximum prices are capped at the next
session's ARA. Risk per trade is 0.5% × the market gate (allowed 1, neutral 0.5, restrictive 0), with total
open risk ≤ 6%. Every order is later replayed on the following sessions, so /plan/performance
shows how each setup actually did.
Backtest
Replays a strategy day by day, for one stock or the whole market. Each session's screen sees only data up to that close; signals become the same orders as the plan (next-session fill, stop, target, time exit), net of fees, one position per stock at a time. For a single stock with no trades it reports which rule failed.
| Strategy | Range | Trades | Win rate | Avg R | vs IHSG / trade |
|---|---|---|---|---|---|
| Smart Money | Jan–Apr 2026 | 249 | 41% | −0.06 | +1.36% |
| Momentum Burst | Jan–Oct 2026 | 1,953 | 27% | −0.33 | −0.39% |
| Exhaustion Hammer | Jan–Oct 2026 | 680 | 29% | −0.38 | −0.16% |
| VCP | Jan–Oct 2026 | 0 | – | – | – |
IHSG fell about 42% over Jan–Oct 2026. Run your own with /backtest/run.
IDX rules
Applied wherever prices, sizes or orders are produced.
| Rule | Value |
|---|---|
| Lot | 100 shares |
| Tick size | Rp1 (<200) · 2 (<500) · 5 (<2,000) · 10 (<5,000) · 25 |
| ARA | 35% (≤ Rp200) · 25% (≤ Rp5,000) · 20% above |
| ARB | 7% for all bands (BEI, 19 Oct – 31 Dec 2026); set with IDX_ARB_PCT |
| Fees | 0.15% buy · 0.25% sell, included in risk |
| Short selling | Not used; long only |
Data
From Stockbit after the close. On startup and each evening only data newer than what is stored is fetched; older gaps are filled on request.
| Data | Each evening and on startup | With ?mode=repair |
|---|---|---|
| Stocks, brokers | Codes missing from the database | – |
| IHSG | From the newest stored day | Any missing day since 2016 |
| Daily prices | Each stock from its last price | Market-wide missing days; stocks with no prices |
| Broker summaries | Each stock after its last summary | Every gap from where the table is complete |
During Stockbit's nightly maintenance (about 23:00–05:00 WIB) it answers with empty data, so no requests are made then, and a run stops if empty answers persist.
Endpoints
Responses are JSON {"status": "success", "data": …}. Parameters and schemas are in the API reference.
Plan and backtest
Screeners and skills
Market data
?mode=repair also fills older gaps