Indicators

Unfortunately, Angle Indicator MAs (12 types) is unavailable

The code has been removed. However, the huge code base still remains at your disposal allowing you to find a suitable code.

Check out other MetaTrader 5 codes:

SessionReopenEA SessionReopenEA

Gold has a daily maintenance break on the CME. The first hour after it rises more than chance explains, in every calendar year of an 11-year sample - while every other hour of the day measures flat. One trade per session, a volatility-scaled server-side stop, no averaging or grid. Then my cost model turned out to be wrong. A real-tick backtest showed the true round-trip cost at the reopen is about 60 points, not the 19 my research had charged - the M1 bar spread field is a per-bar summary and understates it roughly threefold. Re-running 11 years at the corrected cost: +3.34 bps, t 7.40, 59.3% wins -> +1.60 bps, t 3.42, 50.8% wins The edge survives, at less than half its original strength. That second number is the real one. What it is not: about +3.3% a year with 4.6% drawdown, roughly one year in nine negative. At 0.01 lots that is ~130 a year - a figure that measures the position size, not the strategy.

Trade Excursion Report: MFE and MAE of every closed trade, to CSV Trade Excursion Report: MFE and MAE of every closed trade, to CSV

Exports one CSV line per closed trade with the numbers a statement does not carry: the best unrealised profit the trade showed (MFE), the worst unrealised loss it survived (MAE), how much of the MFE was actually kept, how many bars it spanned, and how long it was held. Same measurement as the Trade Excursion indicator, written to a file instead of drawn, because the questions worth asking of this data are ones a chart cannot answer: does the capture ratio depend on the hour of entry? Are the trades I close early the ones I hold longest? Do losers on Mondays reach a different MAE than on Fridays? Those are one pivot table away once the CSV exists. Output is semicolon separated with a header row, in MQL5\Files; opens in any spreadsheet. Measurement limit: excursions come from bar highs and lows on the chosen timeframe; the path inside a bar is unknown. The bars column reports the resolution each trade got, and the summary counts single-bar trades separately instead of averaging them in.

Trade Excursion: how much of each winner you actually kept (MFE/MAE from your own history) Trade Excursion: how much of each winner you actually kept (MFE/MAE from your own history)

Your statement tells you what you KEPT. It does not tell you what you HAD. This indicator reads your own closed trades from the account history and draws, for each one, the full range it travelled: the best unrealised profit it ever showed (MFE) and the worst unrealised loss it survived (MAE). The gap between what a trade showed and what it paid is where two common problems hide, and neither is visible in a balance curve: winners closing far below their best point (the exit leaves money behind), and losers whose worst excursion barely passed the stop (the stop sits inside the noise). The number to look at is the CAPTURE RATIO: of the profit a winner showed at its best, how much did you take home? 90% says the exits are well placed; 30% says the market kept offering and the exit kept refusing. Limit, stated up front: excursions come from the bars each trade spanned, on the chart timeframe; the path inside a bar is unknown. Predicts nothing; measures trades that already happened.

Decision Watchdog: refuse yesterday's decision, fail closed, log once Decision Watchdog: refuse yesterday's decision, fail closed, log once

A daily process writes "today's decision" (which strategy runs, or FLAT) to a file the EAs read at the open. One day the writer did not run. The EAs read yesterday's file, compared its date with TimeCurrent() - the server clock, which had stepped back to the previous day overnight - saw a match, and traded all morning on a 24-hour-old decision. No error anywhere. Two rules, both in this class: 1) staleness is judged against TimeLocal(), which always moves forward; TimeCurrent() is the last tick's stamp - it freezes without ticks and can step back on reconnect. 2) When in doubt the answer is FLAT: missing file, bad date, wrong day, empty line - every failure path returns "do nothing", and each is logged ONCE per state change, not on every tick and not never. File format: line 1 = ISO date, line 2 = decision string. The demo writes a fresh, a stale, a malformed, an empty and a missing file, and shows that only the first is allowed to trade.

Exposure Cap: one position limit per symbol across all your EAs Exposure Cap: one position limit per symbol across all your EAs

Four EAs on the same symbol, each one honest on its own: each checks "do I have a position?" with its own magic number, sees none, and enters. On a demo account this reached 22 contracts on a symbol meant to carry 1, and a watchdog had to close 16 positions in one morning. The cap belongs at the door, not after the fact. ExposureCap::Allowed(symbol, lots, cap) sums the volume of every open position on the symbol - all magic numbers, manual trades included - and refuses the order BEFORE it is sent when it would breach the cap. One log line with the three numbers (held, requested, cap) says why. Deliberately simple: gross exposure, no netting of longs against shorts, no per-EA quota. It is a check, not a lock: two EAs deciding on the same tick can both pass; in practice EAs on different charts decide on different ticks. The demo script prints held / cap / room for the current symbol and shows the refusal line. Nothing is traded.

No suitable codes?
Choose and download
one of the available library codes
for MetaTrader 5