Build · Strategies

Write a strategy you can read out loud.

A strategy is a set of rules that buy, sell and look after trades. In AlgoBarsX a whole strategy fits on one screen, and anyone on your team can read it.

  • $0 a month
  • No card needed
  • Not a trial

A full strategy. Twelve lines.

This one buys when a fast average crosses above a slow one. It risks 1% of the account. It sets a stop and a target. It closes on the opposite cross.

  • The risk, the stop and the target sit on the order line
  • The compiler checks names and units before anything runs
  • The same script is tested, replayed and run live
ema-cross.abx
strategy "EMA Cross"
market: EURUSD
bars: 15m
input fast = 20
input slow = 50
when crosses_above(ema(close, fast), ema(close, slow)):
buy risk: 1%, stop: 25 pips, target: 2R
when crosses_below(ema(close, fast), ema(close, slow)):
close_all
What the compiler says this does

When the EMA of the close over fast bars crosses above the EMA of the close over slow bars, it buys at market, risking 1% of the balance, with a stop 25 pips from the entry and with a target 2R from the entry.

When the EMA of the close over fast bars crosses below the EMA of the close over slow bars, it closes all trades.

Everything a real strategy needs.

All of it is part of the language. Nothing to install.

Size by risk

Say how much you are willing to lose, as a percent or as money. The lot size is worked out for you and rounded down.

Read more about size by risk

Manage a trade after you are in.

Management lines sit under the order they belong to. The plan for the trade is in one place.

One order, fully managed
when liquidity_grab.completed from 08:00 to 11:00 Europe/London:
buy risk: 1%, stop: liquidity_grab.sweep.low - 3 points, target: 2R + 5 pips, tag: "breakout":
breakeven at: 1R, offset: 2 pips
partial 30% at: 1.5R
partial 30% at: 2.5R
trail by: atr(14), after: 2R
exit after: 48 bars
exit when: crosses_below(close, ema(close, 20))

From idea to a running strategy.

  1. Write it, or describe it

    Type the rules. Or write your idea in plain English and press Convert to AlgoBarsX.

  2. Test it and watch it

    Pick the market, the bar size and how far back. Read the report. Watch the test play back trade by trade.

  3. Run it where you choose

    Start it on a demo or a live account. You pick the market and the trade size when you start it.

About tests. A test uses past prices. It leaves out spread, fees, swaps and slippage, so real results will differ. When one bar hits both your stop and your target and the data cannot show which came first, the test counts the stop. A good test does not mean you will make money.

Good questions.

Do I need to know how to code?

No. The code reads like plain words, it reads itself back in English, and you can type your idea in plain English and press Convert to AlgoBarsX.

Will live results match a backtest?

No. Tests use past prices and leave out spread, fees, swaps and slippage. Past results do not tell you what will happen next.

Can one strategy trade more than one market?

Yes. List them under markets: in the header. You can also start the same script on a different market when you deploy it.

Does AlgoBars hold client money?

No. AlgoBars is software, not a broker. It links to accounts at supported brokers. It never holds money and it does not give advice.

Write your first strategy today.

Start with one rule. Read it back. Test it. It is free.

Create my free account

$0 a month · No card needed · Not a trial

Trading is risky. You can lose money. It is not right for everyone.