Quant Gold Hassle
- Experts
- 버전: 1.1
Hassila Quant Gold trades gold (XAUUSD) on the H1 timeframe with one rule set. It waits for the price to close outside the range of the last 120 hourly bars and then follows the move in that direction. It holds one position at a time, and every order goes to the server with its stop loss and take profit already in place.
How it trades
A close above the highest high of the previous 120 bars opens a buy. A close below the lowest low opens a sell. The stop loss sits 3 x ATR(24) away from the entry and the take profit 8 x ATR(24) away. The trade also closes when the price closes through the opposite 60 bar channel, or when it has been open for 120 bars, whichever comes first.
This is a trend following system, so most trades are small losses and a few are large wins. In the simulation from January 2015 to October 2026, about 36% of the trades were winners. The average winner was about 2.2 times the stop and the average loser about 1 times the stop. The longest losing run was 19 trades in a row. It made around 53 trades a year, close to one a week, and the median trade lasted about two days.
Risk and protections
Risk per trade is a percentage of equity, 1% by default. The lot size comes from the stop distance and is checked against free margin, the symbol volume limits and a maximum lot input. After 4 losses in a row the EA skips the next 2 signals and resets the risk multiplier to 1.0. It takes no new entries between 21:00 and 23:59 UTC, when spreads widen during the broker rollover, and it skips a signal when the spread is wider than 0.10 x ATR. Stop and freeze levels are checked before each order and before each close.
The news filter uses the MetaTrader 5 economic calendar and blocks new entries 30 minutes before and after high impact US releases. It can also close an open trade before a release if you turn that option on. The calendar does not exist in the Strategy Tester, so the filter only works on a live or demo chart.
There is an optional Friday close, off by default. The losing streak, the multiplier and the pause are saved, so a terminal restart does not reset them.
The panel
The on-chart panel shows the channel levels and how far the price is from each one in ATR, the open position with its P/L, stop, target, exit level and bars used, the risk being applied, the next red news release, and the result so far. A PAUSE button stops new entries and a CLOSE button closes the trade opened by the EA.
Before you use it
Attach it to an XAUUSD chart. The timeframe of the chart does not matter, the signals are always read from H1 unless you change the input. If your broker uses a suffix such as XAUUSD.pro, attach it to that symbol. Hours are in UTC, so set the server GMT offset for summer and winter once to match your broker (3 and 2 by default, which fits most brokers that follow New York close). Trades can stay open overnight and over the weekend, so swap and weekend gaps apply. Results depend on spread, commission and execution. Run your own test with your broker's data and costs, and then use a demo account before going live.
About the results in the screenshots
The long term results come from a historical simulation on H1 data from January 2015 to October 2026 with $0.35 per ounce of spread and slippage on every trade, and a stress run with $0.70. Commission is not included. The 2026 Strategy Tester report was made with the EA in MetaTrader 5 on broker data. The simulation had losing years in 2015, 2016, 2018 and 2022, and losing years can happen again. Past results do not guarantee future results.
Inputs
Strategy
- Signal timeframe: H1
- Entry channel (bars): 120
- Exit channel, opposite side (bars): 60
- ATR period: 24
- Stop loss (x ATR): 3.0
- Take profit (x ATR, 0 = off): 8.0
- Maximum bars in the trade (0 = off): 120
Risk
- Risk per trade (% of equity): 1.0
- Risk multiplier after a win / after a loss: 1.0 / 1.0 (1.0 means off)
- Max and min risk multiplier: 2.0 / 0.5
- Max lots per trade: 50
- Scale the lot with an external weight file: if the file MQL5\Files\hassila_pesos.json is missing or older than two days, the lot is not changed
Protection
- Losses in a row that trigger a pause: 4 (0 = off)
- Signals skipped after that streak: 2
- UTC hours without new entries: 21,22,23
- Max spread as a fraction of ATR: 0.10 (0 = off)
- Close the trade on Friday: false, at 20 UTC
News filter (live and demo only)
- No new entries around red news: true
- Minutes before and after the release: 30 / 30
- Countries: US
- Close the open trade before a red release: false
Server time
- Server GMT offset in US summer time / winter time: 3 / 2
Panel and files
- Magic number: 660601
- Files subfolder for the status file: quantgold
- Accept pause, resume and close from a command file: true, with its key
- Show the panel, its position, and draw it behind the candles: true, 12, 28, false
