Trading methods
Is algorithmic trading halal? Bots, EAs and automation
Automated trading looks like a new question, but it isn't one. A program placing orders is an instrument of your intention, in the same way a standing instruction to a broker is. The ruling follows the contracts it creates, not the code that creates them.
Read our methodology and editorial policy.
Short answer
Automation itself raises no Shariah objection — a program executing your instructions is a tool, and you remain the contracting party. The ruling is determined by what it trades: permissible spot instruments with no interest accruing are fine, financed contracts for difference are not. Two things need specific attention: that the strategy cannot drift outside your swap-free instrument scope, and that you retain the ability to supervise and stop it.
The code is not the contract
When an Expert Advisor opens a position, the contract is between you and your broker. The program is the means, like a limit order left overnight or a standing instruction given to a dealer. There is no basis for treating an automated order differently from a manual one.
That also settles the frequently asked version of this question — whether profit earned 'without working' is legitimate. Profit in trade comes from bearing commercial risk on something you own, not from labour. A sleeping investor's shares can rise permissibly; so can an automated trader's spot position.
Where automation creates real risk of non-compliance
Drift is the specific danger. A strategy backtested on FX majors may widen its symbol list, add gold or indices, or start carrying positions over weekends. Each of those can take the account outside a swap-free scope that only ever covered majors — and the charges accrue silently while you are not watching.
So automation needs constraints that a manual trader applies by hand: an explicit symbol whitelist, a rule that closes positions before rollover if you are relying on intraday closure, and a periodic statement review. The obligation to verify does not go away because the execution is automatic.
- Whitelist the symbols the program may trade; do not let it discover new ones
- Cap leverage at the account level, not only in the strategy parameters
- If you rely on intraday closure, enforce it in code and check Wednesdays
- Review the swap column weekly — the drift shows up there first
Buying, selling and renting strategies
Selling a trading program is selling software: permissible, as a service or a product with known specifications. Where it becomes problematic is misrepresentation — advertising backtested curves as achieved results, or claiming guaranteed returns. That is a truthfulness issue rather than a riba issue, and it is the most common failing in this market.
If you buy a strategy, you inherit responsibility for its contracts. Ask which instruments it trades and whether it holds overnight before you ask about its returns.
High frequency, latency and the maysir line
At very high frequency, the honest question is whether any reasoned basis remains or whether the system is extracting value from noise and speed. Scholars who object here are making the maysir argument discussed in our scalping guide: an outcome determined by chance rather than analysis is not trade.
There is no bright line, and we do not claim one. A documented method with risk limits is defensible. A system whose entire edge is a millisecond advantage on a financed instrument is not, and the financing alone would settle it anyway.
If you trade this through a broker
Liquid Brokers is our affiliate partner and the broker we document in most depth: a $10 documented minimum, MetaTrader 5, 300+ instruments. Swap-free status is not automatic — its own account table lists swap fees as enabled on all four standard accounts, so request the status in writing and verify a zero financing line before you fund.
Frequently asked questions
Is algorithmic trading halal?
Automation is a neutral tool, so it raises no objection in itself. The ruling follows the contracts the program places: permissible spot instruments with no interest accruing are fine, financed contracts for difference are not.
Is bot trading halal if I don't choose the trades?
Yes in principle — the program acts on your instruction, and the contracts are yours. That also means you keep responsibility for them, so the strategy's instrument list and overnight behaviour need checking.
Is it halal to profit without working?
Profit in trade comes from bearing commercial risk on something you own, not from labour. An investor's shares may rise while they sleep. Automation does not change that basis.
Is high-frequency trading halal?
Contested. Where the outcome is determined by chance or pure speed rather than any reasoned basis, the maysir objection applies. In practice most HFT runs on financed instruments, which settles the question on riba grounds first.
Is selling a trading bot halal?
Selling software is permissible. Misrepresenting backtested results as achieved performance, or guaranteeing returns, is not — that is a truthfulness problem, and it is common in this market.