Skip to main content
Glama
INo-xious

stockbit-mcp

by INo-xious

backtest

Read-only

Run a trading strategy over Stockbit daily history to see actual trades, equity curve, and performance metrics versus buy-and-hold. Fills are executed at the next open and costs include IDX fees for realistic results.

Instructions

Run a trading strategy over Stockbit's own daily history and report what it would actually have done: every trade, an equity curve, and metrics (return, CAGR, Sharpe, max drawdown, win rate, profit factor, expectancy, exposure) against buy-and-hold over the SAME window. Use a preset name, or supply your own entry/exit in the same condition grammar alert_create and pine_script use — so a backtested rule, a live alert and a TradingView strategy are one object rather than three that drift. The execution model is deliberately pessimistic and it matters: signals are read at the bar CLOSE and filled at the NEXT bar's open (never at the price the signal was computed from); a bar that hits both stop and target resolves to the STOP; a gap through a level fills at the open, not the level; and a session locked by IDX auto-rejection (high === low) cannot be filled at all. Costs default to Indonesian retail: 0.15% to buy, 0.25% to sell (the extra 0.1% is the sale tax), plus 0.1% slippage, in whole 100-share lots. ALWAYS read warnings before quoting a number. Under ten trades it says so, and it means it. Set walk_forward for an out-of-sample check. Long-only: retail shorting is not available on IDX.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoLatest session, YYYY-MM-DD
barsNoSessions of history (default 500, the practical maximum)
fromNoEarliest session, YYYY-MM-DD
foldsNoWalk-forward folds, default 3
panelsNoOscillators the conditions reference
symbolYesIDX ticker, e.g. BBRI
exit_opNo
entry_opNo
overlaysNoSeries the conditions reference
strategyNoA preset. Omit to supply entry/exit yourself.
exit_leftNoExit condition, left side
entry_leftNoEntry condition, left side
exit_rightNo
entry_rightNo
slippage_pctNoDefault 0.1
walk_forwardNoAlso run an out-of-sample check. Costs no extra requests.
max_hold_barsNoForce an exit after this many bars
stop_loss_pctNoPercent below the fill price, e.g. 5
include_equityNoInclude the equity curve, one point per bar. Default false.
include_tradesNoInclude the full trade log. Default true.
initial_capitalNoIDR, default 10,000,000
take_profit_pctNoPercent above the fill price
commission_buy_pctNoDefault 0.15
commission_sell_pctNoDefault 0.25 (includes the 0.1% sale tax)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses a deliberately pessimistic execution model: signals read at bar close and filled next open, stop/target conflict resolves to stop, gaps fill at open, and IDX auto-rejection blocks fills. It also spells out Indonesian retail cost defaults, 100-share lots, warning semantics, and long-only constraints — all beyond what the readOnlyHint/openWorldHint annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and generally front-loaded, leading with the primary purpose and outputs before diving into execution details and defaults. The execution-model section is long and compressed into a single paragraph, yet every clause carries a meaningful constraint; minor structure improvements like bullets could improve readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 24-parameter tool with no output schema, the description covers the core output shape, warnings, execution model, cost assumptions, walk-forward mode, and market constraint. It does not explain every parameter or the exact response envelope, but the rich schema plus this description give an agent enough to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 83%, so the baseline is high. The description adds real value on top by explaining that entry/exit conditions use the same grammar as alert_create and pine_script, that walk_forward costs no extra requests, and that include_equity/include_trades control output size. It does not fully document the custom condition expression format, but it references the canonical grammar source.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description starts with a specific verb and resource: 'Run a trading strategy over Stockbit's own daily history' and lists concrete outputs: trades, equity curve, metrics vs buy-and-hold. It also distinguishes itself from alert creation and TradingView strategies by framing backtested rules, live alerts, and strategies as one shared object.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong in-tool usage guidance: use a preset or supply your own entry/exit grammar, set walk_forward for out-of-sample checks, and respect long-only constraints. However, it does not explicitly say when to choose backtest over sibling tools like strategy_compare, analyze, or workflow_run, leaving alternative selection mostly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/INo-xious/stockbit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server