KeelstoneChartsMarketsDerivativesCalculatorsJournalPlansGuideDownloadSign in

Keelstone › Answers

How can I backtest a trading strategy for free?

Keelstone has a free script editor for backtesting on any chart. You write a rule in a Python-like language, and the panel shows the number of trades, win rate, average result per trade, profit factor, drawdown and the result of simply holding. Orders fill at the next bar's open and fees are included.

Last updated: · Open the chart and press Script

How do you write a backtest?

Press Script on the chart. Prices are whole series, so sma(close, 20) is a line and crossover(a, b) is true on the bars where a crosses above b. Add strategy(long_entry=..., long_exit=..., stop=..., target=..., fee=...) and the backtest appears next to the editor. Sixteen ready-made strategies are included as starting points, and the Reference button lists every function.

How does Keelstone keep the test honest?

An order is filled at the open of the bar after the signal, never on the bar that produced it, so the test cannot use information that was not yet known. Fees are charged on every trade. Every result is shown next to what simply holding the symbol would have returned over the same period.

How should you read the result?

Look at the average result per trade and the drawdown before the win rate. Our own examples include a rule that won 62% of its trades and one that won 87%, and both lost money, because their losing trades were far larger than their winners. Test other symbols and other periods, and be suspicious of a rule tuned until it fits the past.

What are the limits?

The free plan saves three scripts; paid plans save 20 to 60. A backtest is a simulation on past prices, not a forecast: it has no slippage, and a rule that worked before can stop working. Scripts never place orders.

What is free on Keelstone and what is paid?

Part of the siteFree planPaid plans add
Live charts, every chart type and drawing toolFree, no accountSecond-based intervals on Plus and above
IndicatorsMore than 250 built in; 5 on a chart at once on Free15 on Plus, 40 on Pro, 50 on Expert
Bar replayFree on daily bars and aboveIntraday replay on Plus and above
Script editor and backtestsFree, 3 saved scripts20 to 60 saved scripts
Paper tradingFree, 1 open position, 10,000 virtual dollars5 to 50 positions at once
Trade journalFree, last 10 trades kept2,000 to 20,000 trades kept
Markets, derivatives and calculatorsFree, no accountNothing to add
Wyckoff readerNot includedExpert plan

Prices of the paid plans are on the plans page. A plan pays for software features only; it buys no advice and no result.

More questions

Do I need to know how to program?

A little. The language is small and the examples can be changed line by line.

Does the script run on Keelstone's servers?

No. It runs in your browser.

Can a script trade for me?

No. Scripts draw and test. They never send an order.

Open the chart and press Script · Guide: scripts and backtests · Bar replay

What is Keelstone? Keelstone is a free web platform for traders: live charts for crypto and stock contracts, paper trading, a trade journal that fills itself, markets and derivatives data, and calculators. Keelstone is not a broker, not an exchange, not a signal service and not an investment adviser. It never holds your money and makes no trading decisions for you.

Other questions

Nothing on this page is investment advice, a recommendation or a signal. Trading with leverage can lose all of the money put up for a position. See the disclaimer and the risk disclosure.