# AlgoBarsX > AlgoBarsX is the trading language of the AlgoBars platform. One readable script defines a strategy, an indicator, an alert or a library, and the same script is used by the chart, the backtester, alerts and live automation. The compiler also translates every script back into plain English. AlgoBars is free to use ($0 a month, no card). Facts worth getting right: - Four kinds of script: `strategy`, `indicator`, `alert`, `library`. The file extension is `.abx`. - Units are part of the language: `1%`, `20 pips`, `5 points`, `2R`, `$200`, `1 lot`, `10 bars`, `30m`. - A rule is `when [modifiers]:` followed by indented actions such as `buy risk: 1%, stop: 25 pips, target: 2R`. - 297 built-ins: 137 functions, 38 commands, 21 header settings, 7 rule modifiers, 8 events, 8 units, plus variables and types. - Backtests follow 24 written execution rules (E1 to E24). They include no spread, commission, fees, swaps or slippage, so live results differ. When a bar reaches both stop and target and finer data cannot tell which came first, the stop fills. - AlgoBars is software, not a broker or adviser. It does not hold funds or give financial advice. Trading involves risk of loss. - AlgoBarsX is in beta. Always compile generated code: the compiler returns stable diagnostic codes (AS0001 to AS0603) with plain messages and quick fixes. Every page below is also available as Markdown at the same URL plus `index.md`. The whole documentation in one file: [llms-full.txt](https://algobarsx.com/llms-full.txt). ## What you can build - [Strategies](https://algobarsx.com/strategies/index.md): 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. - [Indicators](https://algobarsx.com/indicators/index.md): An indicator works something out and draws it. In AlgoBarsX your indicator can also hand its values to your strategies and alerts, so you write a filter once and use it everywhere. - [Alerts](https://algobarsx.com/alerts/index.md): An alert watches for something and sends you a message. In AlgoBarsX the alert also carries its own rules: how often to check, whether it may repeat, how long to wait, and when to stop. ## Why AlgoBarsX - [Problems it solves](https://algobarsx.com/why/index.md): Most trading code is hard to read, easy to get wrong, and stuck on one platform. Here is each problem in plain words, and what AlgoBarsX does about it. - [Why .abx](https://algobarsx.com/abx/index.md): The older trading languages were each made for one platform, many years ago. AlgoBarsX was made later, with their lessons in hand. Here is where it is better, and where it is not. - [Time and cost](https://algobarsx.com/savings/index.md): The price of a tool is small next to the hours you spend writing, fixing and moving code around. Here is where those hours go, and a calculator that uses your own numbers. - [Solutions](https://algobarsx.com/solutions/index.md): You do not have to start over. Bring the scripts, the broker accounts and the ways of working you already have. We will tell you plainly what fits today, what needs work, and what we cannot do yet. ## Who it is for - [Traders](https://algobarsx.com/for/traders/index.md): You know what you want to trade. AlgoBarsX lets you write it in plain words, check it says what you meant, and test it before you risk a cent. - [Strategy creators](https://algobarsx.com/for/strategy-creators/index.md): If you make strategies or indicators for other people, your code is your business. AlgoBarsX lets you hand over something that runs without handing over how it works. - [Educators](https://algobarsx.com/for/educators/index.md): Your students came to learn trading, not computer science. AlgoBarsX reads like the plan you already teach, and it explains every mistake in plain words. - [Developers and quants](https://algobarsx.com/for/developers/index.md): If you write trading code for a living, you know where the bugs hide: units, look-ahead, fills and drift between research and live. AlgoBarsX was built around those four. - [Small firms](https://algobarsx.com/for/small-firms/index.md): A small or mid-size firm cannot keep a team of developers on staff for every idea. AlgoBarsX lets the people who know the markets build the tools themselves, and lets everyone else read what they built. - [Prop firms](https://algobarsx.com/for/prop-firms/index.md): A prop firm lives by its rules: daily loss, max drawdown, position limits. In AlgoBarsX those rules are lines at the top of every script, and the platform can carry your name. - [Hedge funds](https://algobarsx.com/for/hedge-funds/index.md): Your value is in your ideas, not in how hard your code is to follow. AlgoBarsX makes a strategy short enough to review in a meeting, and exact enough to run. - [Asset managers](https://algobarsx.com/for/asset-managers/index.md): When you manage money for other people, you need to show what your rules are and that you follow them. AlgoBarsX writes every strategy out in plain English and keeps a record of every test. - [Broker-dealers](https://algobarsx.com/for/broker-dealers/index.md): Clients who build and test their own rules understand what they are doing. AlgoBars gives your clients those tools under your brand, without asking them to move their money. - [Introducing brokers](https://algobarsx.com/for/introducing-brokers/index.md): Traders stay with people who help them. AlgoBarsX is a free tool your traders can use to build and test their own rules, with their existing broker account. - [Banks](https://algobarsx.com/for/banks/index.md): In a bank, a rule is only as good as your ability to show what it does. AlgoBarsX writes each strategy out in plain English, fills orders by written rules, and gives the same test result every time. - [Fintech platforms](https://algobarsx.com/for/fintech-platforms/index.md): Your users want to build their own strategies, indicators and alerts. Designing a language, a compiler and a backtester takes years. AlgoBarsX already exists, with 297 built-ins and 678 tests. - [Institutions](https://algobarsx.com/for/institutions/index.md): Institutions do not only need strategies that work. They need to show what the rules are, that tests were fair, and that limits were in place. AlgoBarsX is built for that. - [Who it is for](https://algobarsx.com/for/index.md): Pick the page that sounds like you. Each one names your problems in plain words, shows how AlgoBarsX helps, and says what it does not do yet. ## Convert - [From Pine Script](https://algobarsx.com/convert/pine-script/index.md): You have spent years on your Pine Script scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [From MQL4 and MQL5](https://algobarsx.com/convert/mql/index.md): You have spent years on your MQL4 and MQL5 scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [From NinjaScript](https://algobarsx.com/convert/ninjascript/index.md): You have spent years on your NinjaScript scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [From EasyLanguage](https://algobarsx.com/convert/easylanguage/index.md): You have spent years on your EasyLanguage scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [From thinkScript](https://algobarsx.com/convert/thinkscript/index.md): You have spent years on your thinkScript scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [From Python](https://algobarsx.com/convert/python/index.md): You have spent years on your Python scripts. You should not have to start again. Paste one in, and AlgoBarsX rewrites it and tells you what it did to every line. - [Convert](https://algobarsx.com/convert/index.md): AlgoBarsX reads six other trading languages. Paste a script, and it comes back as readable AlgoBarsX with a note on every line: exact, adapted, or your call. ## Docs: Start Here - [What AlgoBarsX is](https://algobarsx.com/docs/what-is-algobarsx/index.md): One language for strategies, indicators, alerts and libraries. - [Your first strategy](https://algobarsx.com/docs/first-strategy/index.md): Write it, read it back, run it. - [The cheat sheet](https://algobarsx.com/docs/cheat-sheet/index.md): Most of the language on one screen. It compiles. - [How a script is laid out](https://algobarsx.com/docs/script-layout/index.md): Header, inputs, calculations, rules, drawing. ## Docs: Coming from Another Language - [Coming from Pine Script](https://algobarsx.com/docs/from-pine-script/index.md): A real import, the ideas side by side, and the names that translate. - [Coming from MQL4 and MQL5](https://algobarsx.com/docs/from-mql4-and-mql5/index.md): A real import, the ideas side by side, and the names that translate. - [Coming from NinjaScript](https://algobarsx.com/docs/from-ninjascript/index.md): A real import, the ideas side by side, and the names that translate. - [Coming from EasyLanguage](https://algobarsx.com/docs/from-easylanguage/index.md): A real import, the ideas side by side, and the names that translate. - [Coming from thinkScript](https://algobarsx.com/docs/from-thinkscript/index.md): A real import, the ideas side by side, and the names that translate. - [Coming from Python](https://algobarsx.com/docs/from-python/index.md): A real import, the ideas side by side, and the names that translate. ## Docs: Language Basics - [Values, units and types](https://algobarsx.com/docs/values-and-units/index.md): Percent, pips, R and money are real types, not bare numbers. - [Series and history](https://algobarsx.com/docs/series-and-history/index.md): Every value has a past. Read it without looking ahead. - [Operators and expressions](https://algobarsx.com/docs/operators/index.md): and, or, not, between, in, if-then-else. - [Inputs and constants](https://algobarsx.com/docs/inputs-and-constants/index.md): What the person running the script may change. - [Variables and state](https://algobarsx.com/docs/state/index.md): Values recalculated each bar, and values that survive between bars. - [Control flow](https://algobarsx.com/docs/control-flow/index.md): if, for, match, break and continue. - [Functions, types, enums and lists](https://algobarsx.com/docs/functions-and-types/index.md): Simple on top, a full language underneath. ## Docs: Strategies - [The header and its settings](https://algobarsx.com/docs/strategy-header/index.md): Markets, bar size, limits and trading hours. - [Rules: when something is true, do something](https://algobarsx.com/docs/rules/index.md): The when rule and its timing modifiers. - [Confirmations](https://algobarsx.com/docs/confirmations/index.md): Name each condition a setup needs. - [Sequences: setups that happen in steps](https://algobarsx.com/docs/sequences/index.md): Sweep, reclaim, retest, inside a bar limit. - [Orders](https://algobarsx.com/docs/orders/index.md): Market, limit, stop, close, modify, cancel. - [Sizing and risk](https://algobarsx.com/docs/sizing/index.md): State what you are willing to lose. Size follows. - [Trade management](https://algobarsx.com/docs/trade-management/index.md): Breakeven, partial closes, trailing stops and exits. - [Loss guards and limits](https://algobarsx.com/docs/guards/index.md): What stops a strategy, and for how long. - [Events](https://algobarsx.com/docs/events/index.md): Run code when something happens. - [Bar close or every tick](https://algobarsx.com/docs/tick-evaluation/index.md): One header line changes when the script runs. - [Other markets, bar sizes and bar types](https://algobarsx.com/docs/other-data/index.md): Higher timeframes, other symbols, Renko, Heikin Ashi and X-Ray bars. ## Docs: Testing and Going Live - [Reading the backtest report](https://algobarsx.com/docs/the-report/index.md): Every number, what it means and how it is worked out. - [Demo and live deployments](https://algobarsx.com/docs/deployments/index.md): What changes when a script runs for real, and what does not. - [Letting AlgoBarsX generate a strategy](https://algobarsx.com/docs/generator/index.md): Composed from the language, compiled and backtested before you see it. ## Docs: Troubleshooting - [Why did my order not fill?](https://algobarsx.com/docs/why-no-fill/index.md): Seven reasons, each with the rule behind it. - [Why does live differ from my backtest?](https://algobarsx.com/docs/why-live-differs/index.md): Costs, the bid and ask, gaps and your broker. - [The bar reached my target. Why was I stopped out?](https://algobarsx.com/docs/why-stop-first/index.md): When one bar reaches both, the stop fills first. - [Why is my stop not where I expected?](https://algobarsx.com/docs/why-stop-moved/index.md): Distances follow the fill. Levels do not. - [Why is my position smaller or bigger than I asked?](https://algobarsx.com/docs/why-size/index.md): Lot steps, minimum lots and “above requested risk”. - [Why did my backtest stop early?](https://algobarsx.com/docs/why-stopped-early/index.md): The test account ran out of money. - [What size does buy trade when I give no size?](https://algobarsx.com/docs/why-default-size/index.md): The usual amount, set where the script runs. - [Why was my order for another market refused?](https://algobarsx.com/docs/why-other-market/index.md): An order is only filled on the market it names. - [Why is my indicator empty at the start?](https://algobarsx.com/docs/why-na/index.md): An average of 200 bars has nothing to say for the first 199. - [Why did my alert only fire once?](https://algobarsx.com/docs/why-alert-quiet/index.md): An alert's own settings decide when it may speak again. - [What does “approximate intrabar” mean?](https://algobarsx.com/docs/why-approximate/index.md): A tick-evaluated run that lacked finer data for some bars. - [The compiler rejected my script. Now what?](https://algobarsx.com/docs/why-error/index.md): Read the message. It says what to change. ## Docs: Indicators and Drawing - [Writing an indicator](https://algobarsx.com/docs/writing-an-indicator/index.md): Calculate, draw, and publish values. - [Drawing on the chart](https://algobarsx.com/docs/drawing/index.md): Plots, fills, boxes, Fibonacci, profiles, tables and dashboards. ## Docs: Alerts - [Writing an alert](https://algobarsx.com/docs/writing-an-alert/index.md): The condition, the message, and when it may repeat. ## Docs: Libraries - [Writing and using a library](https://algobarsx.com/docs/writing-a-library/index.md): Functions and constants you reuse. ## Docs: Reference - [Moving averages](https://algobarsx.com/docs/ref-fn-moving-averages/index.md): All 13 moving averages in AlgoBarsX, each with its parameters, defaults, ranges and an example: sma, ema, wma, rma, smma, hma, vwma, dema, tema, kama and 3 more. - [Momentum](https://algobarsx.com/docs/ref-fn-momentum/index.md): All 15 momentum in AlgoBarsX, each with its parameters, defaults, ranges and an example: rsi, stoch, stoch_rsi, macd, cci, williams_r, roc, momentum, tsi, ultimate_osc and 5 more. - [Trend](https://algobarsx.com/docs/ref-fn-trend/index.md): All 8 trend in AlgoBarsX, each with its parameters, defaults, ranges and an example: supertrend, psar, adx, dmi, ichimoku, aroon, vortex, linreg. - [Volatility](https://algobarsx.com/docs/ref-fn-volatility/index.md): All 8 volatility in AlgoBarsX, each with its parameters, defaults, ranges and an example: atr, true_range, bollinger, keltner, donchian, envelope, hist_volatility, choppiness. - [Volume](https://algobarsx.com/docs/ref-fn-volume/index.md): All 6 volume in AlgoBarsX, each with its parameters, defaults, ranges and an example: vwap, obv, cmf, ad_line, pvt, volume_osc. - [Smart money concepts](https://algobarsx.com/docs/ref-fn-smart-money/index.md): All 7 smart money concepts in AlgoBarsX, each with its parameters, defaults, ranges and an example: order_blocks, fair_value_gaps, break_of_structure, change_of_character, liquidity_sweeps, premium_discount, optimal_trade_entry. - [Market structure](https://algobarsx.com/docs/ref-fn-structure/index.md): All 8 market structure in AlgoBarsX, each with its parameters, defaults, ranges and an example: highest, lowest, pivots, swing_high, swing_low, fractals, zigzag, support_resistance. - [Candle patterns](https://algobarsx.com/docs/ref-fn-patterns/index.md): All 11 candle patterns in AlgoBarsX, each with its parameters, defaults, ranges and an example: engulfing, hammer, shooting_star, doji, pin_bar, inside_bar, outside_bar, morning_star, evening_star, three_soldiers and 1 more. - [Statistics](https://algobarsx.com/docs/ref-fn-statistics/index.md): All 16 statistics in AlgoBarsX, each with its parameters, defaults, ranges and an example: stdev, mean, median, variance, percentile, percent_rank, zscore, returns, correlation, covariance and 6 more. - [Regression](https://algobarsx.com/docs/ref-fn-regression/index.md): All 4 regression in AlgoBarsX, each with its parameters, defaults, ranges and an example: linreg_slope, linreg_intercept, r_squared, ols. - [Matrices](https://algobarsx.com/docs/ref-fn-matrix/index.md): All 5 matrices in AlgoBarsX, each with its parameters, defaults, ranges and an example: matrix, transpose, multiply, inverse, covariance_matrix. - [Conditions](https://algobarsx.com/docs/ref-fn-conditions/index.md): All 8 conditions in AlgoBarsX, each with its parameters, defaults, ranges and an example: crosses_above, crosses_below, crosses, starts, ends, bars_since, was, held. - [Data and bar types](https://algobarsx.com/docs/ref-fn-data/index.md): All 8 data and bar types in AlgoBarsX, each with its parameters, defaults, ranges and an example: bars, close_of, intrabar, data.coverage, range, xray, renko, heikin_ashi. - [Sizing](https://algobarsx.com/docs/ref-fn-sizing/index.md): All 1 sizing in AlgoBarsX, each with its parameters, defaults, ranges and an example: size_for. - [Math](https://algobarsx.com/docs/ref-fn-math/index.md): All 13 math in AlgoBarsX, each with its parameters, defaults, ranges and an example: abs, min, max, round, floor, ceil, sqrt, log, exp, pow and 3 more. - [Missing values](https://algobarsx.com/docs/ref-fn-missing-values/index.md): All 2 missing values in AlgoBarsX, each with its parameters, defaults, ranges and an example: nz, is_na. - [Colours](https://algobarsx.com/docs/ref-fn-colors/index.md): All 4 colours in AlgoBarsX, each with its parameters, defaults, ranges and an example: rgb, gradient, linear_gradient, radial_gradient. - [Order commands](https://algobarsx.com/docs/ref-cmd-orders/index.md): All 6 order commands in AlgoBarsX, each with its parameters, defaults, ranges and an example: buy, sell, close, close_all, modify, cancel. - [Trade management commands](https://algobarsx.com/docs/ref-cmd-management/index.md): All 4 trade management commands in AlgoBarsX, each with its parameters, defaults, ranges and an example: partial, breakeven, trail, exit. - [Drawing commands](https://algobarsx.com/docs/ref-cmd-drawing/index.md): All 26 drawing commands in AlgoBarsX, each with its parameters, defaults, ranges and an example: plot, fill, hline, mark, label, line, box, table, bar_color, background and 16 more. - [Alert commands](https://algobarsx.com/docs/ref-cmd-alerts/index.md): All 1 alert commands in AlgoBarsX, each with its parameters, defaults, ranges and an example: notify. - [Logging](https://algobarsx.com/docs/ref-cmd-logging/index.md): All 1 logging in AlgoBarsX, each with its parameters, defaults, ranges and an example: log. - [Header settings](https://algobarsx.com/docs/ref-settings/index.md): All 21 header settings in AlgoBarsX, each with its parameters, defaults, ranges and an example: market, markets, bars, evaluate, pane, max_open, max_open_per_side, direction, opposite, warmup and 11 more. - [Rule modifiers](https://algobarsx.com/docs/ref-modifiers/index.md): All 7 rule modifiers in AlgoBarsX, each with its parameters, defaults, ranges and an example: every, skip, max, cooldown, once, within, from. - [Events](https://algobarsx.com/docs/ref-events/index.md): All 8 events in AlgoBarsX, each with its parameters, defaults, ranges and an example: start, bar close, tick, fill, exit, session open, day change, render. - [Units](https://algobarsx.com/docs/ref-units/index.md): All 8 units in AlgoBarsX, each with its parameters, defaults, ranges and an example: pips, points, percent, R, money, lots, bars, duration. - [Bar variables](https://algobarsx.com/docs/ref-var-bars/index.md): All 17 bar variables in AlgoBarsX, each with its parameters, defaults, ranges and an example: open, high, low, close, volume, time, hl2, hlc3, ohlc4, bar.index and 7 more. - [Time variables](https://algobarsx.com/docs/ref-var-time/index.md): All 4 time variables in AlgoBarsX, each with its parameters, defaults, ranges and an example: hour, minute, day_of_week, time_of_day. - [Market variables](https://algobarsx.com/docs/ref-var-market/index.md): All 16 market variables in AlgoBarsX, each with its parameters, defaults, ranges and an example: market.symbol, market.name, market.category, market.pip_size, market.point_size, market.contract_size, market.lot_min, market.lot_max, market.lot_step, market.leverage_tiers and 6 more. - [Account variables](https://algobarsx.com/docs/ref-var-account/index.md): All 13 account variables in AlgoBarsX, each with its parameters, defaults, ranges and an example: account.balance, account.equity, account.margin, account.free_margin, account.margin_level, account.currency, account.leverage, account.mode, account.venue, positions and 3 more. - [Named colours](https://algobarsx.com/docs/ref-var-colors/index.md): All 10 named colours in AlgoBarsX, each with its parameters, defaults, ranges and an example: green, red, blue, gray, white, black, orange, yellow, purple, teal. - [Types](https://algobarsx.com/docs/ref-types/index.md): All 18 types in AlgoBarsX, each with its parameters, defaults, ranges and an example: Bar, BarState, BarSet, Zone, Level, Swing, Cell, Trade, Order, Trades and 8 more. ## Docs: Execution Rules - [Timing](https://algobarsx.com/docs/rules-timing/index.md): E1 Bar-close evaluation, E2 Tick evaluation - [Fills](https://algobarsx.com/docs/rules-fills/index.md): E3 Limit orders, E4 Stop orders, E5 Stops and targets, E6 Price path inside a bar, E7 Stop before target, E8 Same-bar exits - [Prices, distances and size](https://algobarsx.com/docs/rules-prices-distances-and-size/index.md): E9 Distances and R, E10 Price rounding, E11 Risk-based size, E12 No costs - [Trade management](https://algobarsx.com/docs/rules-trade-management/index.md): E13 Breakeven, E14 Trailing stops, E15 Partial closes, E16 Time and condition exits, E17 Pending order expiry - [Strategy controls](https://algobarsx.com/docs/rules-strategy-controls/index.md): E18 Opposite signals, E19 Limits checked at the fill, E20 Loss guards, E21 Order of work at a bar close, E22 Trading hours - [Results](https://algobarsx.com/docs/rules-results/index.md): E23 Reproducibility, E24 End of test ## Docs: Compiler Messages - [Text and layout](https://algobarsx.com/docs/diag-text-and-layout/index.md): AlgoBarsX compiler messages about text and layout, with what each code means and the real message where there is one: AS0001, AS0002, AS0003, AS0004, AS0005, AS0006. - [Syntax](https://algobarsx.com/docs/diag-syntax/index.md): AlgoBarsX compiler messages about syntax, with what each code means and the real message where there is one: AS0010, AS0011, AS0012, AS0013, AS0014, AS0015, AS0016. - [Names and types](https://algobarsx.com/docs/diag-names-and-types/index.md): AlgoBarsX compiler messages about names and types, with what each code means and the real message where there is one: AS0201, AS0202, AS0203, AS0204, AS0205, AS0206, AS0207. - [Units and risk](https://algobarsx.com/docs/diag-units-and-risk/index.md): AlgoBarsX compiler messages about units and risk, with what each code means and the real message where there is one: AS0301, AS0302, AS0303, AS0304, AS0305, AS0306. - [Where things may go](https://algobarsx.com/docs/diag-where-things-may-go/index.md): AlgoBarsX compiler messages about where things may go, with what each code means and the real message where there is one: AS0401, AS0402, AS0403, AS0404, AS0405. - [Data](https://algobarsx.com/docs/diag-data/index.md): AlgoBarsX compiler messages about data, with what each code means and the real message where there is one: AS0501, AS0502, AS0503. - [Hints](https://algobarsx.com/docs/diag-hints/index.md): AlgoBarsX compiler messages about hints, with what each code means and the real message where there is one: AS0601. ## Docs: Examples - [EMA Cross](https://algobarsx.com/docs/ex-01-ema-cross/index.md): EMA Cross is a strategy that trades EURUSD on 15-minute bars. - [Six-Confirmation Momentum](https://algobarsx.com/docs/ex-02-six-confirmation-momentum/index.md): Six-Confirmation Momentum is a strategy that trades XAUUSD on 5-minute bars. It holds at most 1 open trade and stops for the day after losing 3%. - [Ribbon Multi-Timeframe](https://algobarsx.com/docs/ex-03-ribbon-multi-timeframe/index.md): Ribbon Multi-Timeframe is a strategy that trades GBPUSD on 15-minute bars. - [Sweep and Reclaim](https://algobarsx.com/docs/ex-04-sweep-and-reclaim/index.md): Sweep and Reclaim is a strategy that trades XAUUSD on 20-tick range bars. - [EURUSD and GBPUSD Mean Reversion](https://algobarsx.com/docs/ex-05-pairs-mean-reversion/index.md): EURUSD and GBPUSD Mean Reversion is a strategy that trades EURUSD and GBPUSD on 1-hour bars. It holds at most 2 open trades. - [Language Tour](https://algobarsx.com/docs/ex-08-language-tour/index.md): Language Tour is a strategy that trades EURUSD and GBPUSD on 15-minute bars. It holds at most 3 open trades (2 per side), reverses on an opposite sign - [Tick Scalper](https://algobarsx.com/docs/ex-10-tick-scalper/index.md): Tick Scalper is a strategy that trades XAUUSD on 1-minute bars, checking its rules on every price change. It holds at most 1 open trade. - [Bollinger Mean Reversion](https://algobarsx.com/docs/ex-11-bollinger-mean-reversion/index.md): Bollinger Mean Reversion is a strategy that trades EURUSD on 1-hour bars. It holds at most 1 open trade and closes its trade on an opposite signal. - [London Open Breakout](https://algobarsx.com/docs/ex-13-london-open-breakout/index.md): London Open Breakout is a strategy that trades GBPUSD on 5-minute bars. It holds at most 1 open trade and trades only during the London session. - [Supertrend Trend Rider](https://algobarsx.com/docs/ex-14-supertrend-trend-rider/index.md): Supertrend Trend Rider is a strategy that trades XAUUSD on 1-hour bars. It takes long trades only, adds up to 2 entries in the same direction and keep - [Grid Accumulator](https://algobarsx.com/docs/ex-17-grid-accumulator/index.md): Grid Accumulator is a strategy that trades EURUSD on 15-minute bars. It holds at most 5 open trades, takes long trades only and adds up to 5 entries i - [Quiet Hours Trend](https://algobarsx.com/docs/ex-18-quiet-hours-trend/index.md): Quiet Hours Trend is a strategy that trades USDJPY on 15-minute bars. It holds at most 2 open trades (1 per side) and never risks more than 2% across - [Heikin-Ashi Trend](https://algobarsx.com/docs/ex-20-heikin-ashi-trend/index.md): Heikin-Ashi Trend is a strategy that trades BTCUSD on 1-hour Heikin-Ashi bars. It takes long trades only. - [Renko Pullback](https://algobarsx.com/docs/ex-21-renko-pullback/index.md): Renko Pullback is a strategy that trades US500 on 5-point renko bars. It holds at most 1 open trade. - [Momentum Rotation](https://algobarsx.com/docs/ex-24-momentum-rotation/index.md): Momentum Rotation is a strategy that trades EURUSD, GBPUSD, USDJPY and AUDUSD on 4-hour bars. It holds at most 1 open trade. - [Kelly Sized Breakout](https://algobarsx.com/docs/ex-28-kelly-sized-breakout/index.md): Kelly Sized Breakout is a strategy that trades XAUUSD on 30-minute bars. It holds at most 1 open trade. - [Candle Reversal](https://algobarsx.com/docs/ex-29-candle-reversal/index.md): Candle Reversal is a strategy that trades EURUSD on 1-hour bars. It holds at most 1 open trade. - [Squeeze Breakout](https://algobarsx.com/docs/ex-31-squeeze-breakout/index.md): Squeeze Breakout is a strategy that trades NAS100 on 15-minute bars. It holds at most 1 open trade and waits 200 bars before trading. - [DMI Trend Filter](https://algobarsx.com/docs/ex-32-dmi-trend-filter/index.md): DMI Trend Filter is a strategy that trades EURJPY on 1-hour bars. It holds at most 1 open trade and reverses on an opposite signal. - [Turtle Channels](https://algobarsx.com/docs/ex-33-turtle-channels/index.md): Turtle Channels is a strategy that trades XAUUSD on daily bars. It adds up to 4 entries in the same direction, keeps at least 500 points between entri - [Smart Money Pullback](https://algobarsx.com/docs/ex-36-smart-money-pullback/index.md): Smart Money Pullback is a strategy that trades GBPJPY on 15-minute bars. It holds at most 1 open trade and trades only during the London and New York - [Regression Spread](https://algobarsx.com/docs/ex-37-regression-spread/index.md): Regression Spread is a strategy that trades AUDUSD and NZDUSD on 1-hour bars. It holds at most 2 open trades. - [Coverage-Aware Scalper](https://algobarsx.com/docs/ex-42-coverage-aware-scalper/index.md): Coverage-Aware Scalper is a strategy that trades EURUSD on 10-tick range bars. It holds at most 1 open trade. - [Performance Throttle](https://algobarsx.com/docs/ex-44-performance-throttle/index.md): Performance Throttle is a strategy that trades EURUSD on 30-minute bars. It holds at most 1 open trade and stops for the day after losing $500. - [Hedged Breakout](https://algobarsx.com/docs/ex-46-hedged-breakout/index.md): Hedged Breakout is a strategy that trades EURUSD on 1-hour bars. It holds at most 2 open trades (1 per side) and hedges on an opposite signal. - [Active Trade Manager](https://algobarsx.com/docs/ex-47-active-trade-manager/index.md): Active Trade Manager is a strategy that trades XAUUSD on 5-minute bars. It holds at most 1 open trade. - [Pyramid Momentum](https://algobarsx.com/docs/ex-48-pyramid-momentum/index.md): Pyramid Momentum is a strategy that trades NAS100 on 1-hour bars. It takes long trades only, adds up to 3 entries in the same direction, keeps at leas - [Hurst Regime Switch](https://algobarsx.com/docs/ex-49-hurst-regime-switch/index.md): Hurst Regime Switch is a strategy that trades EURUSD on 4-hour bars. It holds at most 1 open trade. - [Aroon Vortex Confirmation](https://algobarsx.com/docs/ex-52-aroon-vortex-confirmation/index.md): Aroon Vortex Confirmation is a strategy that trades GBPUSD on 30-minute bars. It holds at most 1 open trade. - [ALMA Envelope Reversion](https://algobarsx.com/docs/ex-55-alma-envelope-reversion/index.md): ALMA Envelope Reversion is a strategy that trades USDCAD on 15-minute bars. It holds at most 1 open trade. - [Awesome Oscillator Saucer](https://algobarsx.com/docs/ex-57-awesome-saucer/index.md): Awesome Oscillator Saucer is a strategy that trades EURGBP on 1-hour bars. It holds at most 1 open trade. - [State Machine Momentum](https://algobarsx.com/docs/ex-60-state-machine-momentum/index.md): State Machine Momentum is a strategy that trades EURUSD on 15-minute bars. It holds at most 1 open trade and stops for the day after losing 2%. - [Trend Ribbon](https://algobarsx.com/docs/ex-00-trend-ribbon/index.md): Trend Ribbon is an indicator drawn over the price chart. - [Live Order Blocks](https://algobarsx.com/docs/ex-07-live-order-blocks/index.md): Live Order Blocks is an indicator drawn over the price chart. - [MACD Histogram](https://algobarsx.com/docs/ex-15-macd-histogram/index.md): MACD Histogram is an indicator drawn in its own pane. - [Session VWAP and Profile](https://algobarsx.com/docs/ex-16-session-vwap-profile/index.md): Session VWAP and Profile is an indicator drawn over the price chart. - [Fair Value Gaps](https://algobarsx.com/docs/ex-22-fair-value-gaps/index.md): Fair Value Gaps is an indicator drawn over the price chart. - [Ichimoku Cloud](https://algobarsx.com/docs/ex-25-ichimoku-cloud/index.md): Ichimoku Cloud is an indicator drawn over the price chart. - [Opening Range Dashboard](https://algobarsx.com/docs/ex-27-opening-range-dashboard/index.md): Opening Range Dashboard is an indicator drawn over the price chart. - [Volatility Regime Canvas](https://algobarsx.com/docs/ex-30-volatility-regime-canvas/index.md): Volatility Regime Canvas is an indicator drawn in its own pane. - [Support and Resistance](https://algobarsx.com/docs/ex-34-support-resistance-levels/index.md): Support and Resistance is an indicator drawn over the price chart. - [ZigZag Fibonacci](https://algobarsx.com/docs/ex-35-zigzag-fibonacci/index.md): ZigZag Fibonacci is an indicator drawn over the price chart. - [Portfolio Risk Matrix](https://algobarsx.com/docs/ex-38-portfolio-risk-matrix/index.md): Portfolio Risk Matrix is an indicator drawn in its own pane. - [Volume Heatmap](https://algobarsx.com/docs/ex-39-volume-heatmap/index.md): Volume Heatmap is an indicator drawn over the price chart. - [Gradient RSI Candles](https://algobarsx.com/docs/ex-40-gradient-rsi-candles/index.md): Gradient RSI Candles is an indicator drawn in its own pane. - [X-Ray Flow Bands](https://algobarsx.com/docs/ex-43-xray-flow-bands/index.md): X-Ray Flow Bands is an indicator drawn over the price chart. - [Multi-Timeframe Trend Table](https://algobarsx.com/docs/ex-51-multi-timeframe-table/index.md): Multi-Timeframe Trend Table is an indicator drawn over the price chart. - [Fractal Pitchfork](https://algobarsx.com/docs/ex-53-fractal-pitchfork/index.md): Fractal Pitchfork is an indicator drawn over the price chart. - [Move Annotations](https://algobarsx.com/docs/ex-54-annotations/index.md): Move Annotations is an indicator drawn over the price chart. - [Momentum Composite](https://algobarsx.com/docs/ex-58-momentum-composite/index.md): Momentum Composite is an indicator drawn in its own pane. - [Daily risk guard](https://algobarsx.com/docs/ex-06-daily-risk-guard/index.md): Daily risk guard is an alert that checks every 1 minute, can fire every time its condition is met and waits 4 hours between alerts. - [RSI bullish divergence](https://algobarsx.com/docs/ex-12-rsi-divergence-alert/index.md): RSI bullish divergence is an alert that checks every 15 minutes, fires at most once per bar and shows where it fires on the chart. - [Margin and exposure](https://algobarsx.com/docs/ex-23-margin-exposure-alert/index.md): Margin and exposure is an alert that checks every 5 minutes and fires only once. - [Stochastic cross in extremes](https://algobarsx.com/docs/ex-26-stochastic-cross-alert/index.md): Stochastic cross in extremes is an alert that checks every 1 hour, can fire every time its condition is met, waits 3 bars between alerts and shows whe - [Intrabar spike](https://algobarsx.com/docs/ex-41-intrabar-spike-alert/index.md): Intrabar spike is an alert that checks every 1 hour and fires at most once per bar. - [Tokyo open gap](https://algobarsx.com/docs/ex-45-tokyo-open-gap-alert/index.md): Tokyo open gap is an alert that checks every 1 minute and can fire every time its condition is met. - [Distribution shift](https://algobarsx.com/docs/ex-50-distribution-shift-alert/index.md): Distribution shift is an alert that checks every 1 hour and fires at most once per bar. - [Ribbon and TSI agreement](https://algobarsx.com/docs/ex-56-ribbon-tsi-alert/index.md): Ribbon and TSI agreement is an alert that checks every 15 minutes and fires at most once per bar. - [Quant Toolkit](https://algobarsx.com/docs/ex-09-quant-toolkit-library/index.md): Quant Toolkit is a library of reusable functions and constants for other scripts. - [Risk Parity](https://algobarsx.com/docs/ex-19-risk-parity-library/index.md): Risk Parity is a library of reusable functions and constants for other scripts. - [Ranking Tools](https://algobarsx.com/docs/ex-59-ranking-tools-library/index.md): Ranking Tools is a library of reusable functions and constants for other scripts. ## Docs: Importing, Files and Tooling - [Importing from other languages](https://algobarsx.com/docs/importing/index.md): Pine Script, MQL4 and MQL5, NinjaScript, EasyLanguage, thinkScript and Python. - [Files: open and sealed](https://algobarsx.com/docs/abx-files/index.md): Share a script with or without its code. - [What the Terminal does with a script](https://algobarsx.com/docs/terminal-tools/index.md): Compile, describe, run, report, versions, deploy. - [The formal grammar](https://algobarsx.com/docs/grammar/index.md): EBNF, reserved words and lexical rules. ## Optional - [Homepage](https://algobarsx.com/index.md): what AlgoBarsX is, in plain words - [AlgoBars pricing](https://algobars.com/pricing) - [Risk disclosure and terms](https://algobars.com/legal)