HassilAI EURUSD is a mean-reversion expert advisor written for one pair and one
timeframe: EUR/USD on M15. It is not a multi-pair robot and it has no universal
mode. Its distances, its filters and its trading window are calibrated on how
the euro behaves against the dollar, and running it on another instrument means
running it outside the conditions it was measured in.
It trades one direction only: it sells when price has stretched above its recent
average and looks for the move back. It does not buy. That is a deliberate
decision rather than a half-finished setting — the long side of this market
behaves differently and does not share the edge that supports the short side, so
it was left out instead of being included to make the product look more complete.
It always works on closed bars. At the close of every M15 bar it reads a
short-period momentum oscillator to decide whether there is a signal, and the
pair's recent volatility, measured with the average true range, to decide how
much room the trade needs. Stop and target are set at the same distance,
adjusted to the broker's minimum stop level, and sent to the server inside the
order itself, so the position is never left unprotected even if the connection
drops or the terminal is closed.
It holds one position at a time. It does not average into a loser, it does not
open grids, it does not double after a loss and it uses no hidden stops. A trade
closes at its stop, at its target, or on time if it has stayed too many bars in
the market — and that time-based exit is postponed when price is sitting right
on the stop or the target, or when the spread is abnormal, because closing at
market under those conditions is expensive.
Position size comes from account equity and from the actual stop distance of
that particular entry, not from a fixed lot. On top of that calculation sits an
anti-martingale factor: it increases after a winning trade and decreases after a
losing one, the exact opposite of a martingale. The factor has a ceiling and a
floor, so a good run cannot turn it into a gamble and a bad one cannot shrink it
to nothing, and it is stored in the terminal so restarting MetaTrader does not
erase the penalty of a losing streak in progress. The resulting lot is rounded
to the broker's volume step, respects the minimum, the maximum and the symbol's
total volume limit, and is trimmed down if it does not fit in the free margin
available.
The brakes are on by default. After every loss there is a mandatory cooldown,
counted in bars, before it may enter again. There is a cap on trades per day.
Signals are discarded when the spread is above what is reasonable, because with
target and stop at the same distance the cost of entry is felt on every trade.
And a regime watchdog looks at the win rate of the recent trades and, if it
falls below a threshold, stops the advisor for several trading days instead of
letting it keep pressing in conditions that no longer suit it.
It also controls when it trades. The session window is defined in UTC and the
advisor resolves the broker server's offset by itself, so the same configuration
works on brokers whose clocks differ. Outside that window it looks for nothing.
There are three risk profiles — conservative, normal and aggressive — which
change the risk per trade, the cooldown after a loss and the daily cap all at
once. You pick one in the settings or with a button on the chart, and the chosen
profile is remembered between sessions.
An on-chart panel shows the full state: effective risk and the lot that would be
sent right now, stop and target distances, current spread, whether the session
is open, how far the signal is from firing, the streak and the next factor, the
result for the day and the state of each brake. When the advisor cannot trade it
says so there, in one line, instead of leaving you to read the log. It can also
export that same state to JSON files if you want to follow it from an external
dashboard; that is optional and not needed to trade.
Requirements. Symbol EUR/USD, timeframe M15. Netting and hedging accounts both
work, since there is never more than one position open. This is a cost-sensitive
system: use a low-spread account with commission properly declared in the symbol
settings. A VPS is recommended so the session window is not missed. And before
going live, run it on a demo account with your broker, your spread and your
commission, because execution conditions change the outcome and are not the same
at two different brokers.
For questions or help with the settings, send me a private message on MQL5.
Trading Forex involves risk of loss. No past result, real or simulated,
guarantees future results.
Kullanıcı değerlendirmeye herhangi bir yorum bırakmadı