Skip to content

About

Trading robot (Expert Advisor) for MetaTrader 5. It finds supply and demand zones and trades them, with session, news and daily-loss filters.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZoneTraderPro

Trading robot (Expert Advisor) for MetaTrader 5. It finds supply and demand zones and trades them, with session, news and daily-loss filters.

Proprietary software. © Teenodi Ltd. All rights reserved. The code is shared for viewing only. It is not licensed for reuse or redistribution. See LICENSE.

What it does

  • Finds zones. It scans price history for an apex: a high or low where price turned hard. If the move before and after the apex is deep enough, the area becomes a supply or demand zone.
  • Trades the zone. Entry is by market order or by pending order (EntryMode).
  • Sets the exit. The stop-loss sits behind the zone. The take-profit follows a risk-to-reward ratio, a share of the recent price range, or fixed points (TpMode).
  • Filters risk. Trading sessions, news events, daily gain and loss limits, a cap on open trades and a weekly-open filter.
  • Shows its work. An on-chart panel lets you pause buying or selling and close trades by hand.

Case study: valenteeno.tech/work/zonetrader-pro

ZoneTrader_Pro.mq5

Inputs

Trading Sessions Filter

Input Type Default Description
enableSessionFilter bool true
trade0 bool false 00:00-01:00
trade1 bool false 01:00-02:00 (Late Asian)
trade2 bool true 02:00-03:00 (Asian Session)
trade3 bool true 03:00-04:00 (Asian Session)
trade4 bool true 04:00-05:00 (Asian Session)
trade5 bool false 05:00-06:00
trade6 bool false 06:00-07:00
trade7 bool true 07:00-08:00 (London Pre-Open)
trade8 bool true 08:00-09:00 (London Open)
trade9 bool true 09:00-10:00 (London Session)
trade10 bool true 10:00-11:00 (London Session)
trade11 bool true 11:00-12:00 (London Session)
trade12 bool true 12:00-13:00 (London-NY Overlap)
trade13 bool true 13:00-14:00 (NY Open)
trade14 bool true 14:00-15:00 (NY Session)
trade15 bool true 15:00-16:00 (NY Session)
trade16 bool true 16:00-17:00 (NY Session)
trade17 bool false 17:00-18:00
trade18 bool false 18:00-19:00
trade19 bool false 19:00-20:00
trade20 bool false 20:00-21:00
trade21 bool false 21:00-22:00
trade22 bool false 22:00-23:00
trade23 bool false 23:00-00:00
closeTradesAtSessionEnd bool false

News Filter

Input Type Default Description
enableNewsFilter bool true
timeBefore int 30 Minutes before news
timeAfter int 30 Minutes after news
closeAllDuringNews bool false

Daily Gains Management

Input Type Default Description
enableDailyGainsFilter bool true
gainsMode GainsMode BALANCE_BASED
maxProfit double 5.0 Max daily profit %
maxLoss double 3.0 Max daily loss %

Price Context

Input Type Default Description
contextMode ContextMode CONTEXT
contextSize int 50 Number of bars for context

Zone Signal Settings

Input Type Default Description
minPreApexBars int 3
minPostApexBars int 3
minPreApexDepth double 20.0 PreApex Points or % based on context
minPostApexDepth double 20.0 PostApex Points or % based on context
expiryBars int 100 Zone expiry in bars
maxPostApexDepth double 100.0 Max depth before deactivation
maxDepthMode ContextMode DIRECT Mode for max depth calculation (independent of main context mode)

Trade Execution

Input Type Default Description
entryMode EntryMode MARKET
maxSpread int 10 Max spread in points
pendingOrderOffset int 1 Offset for pending orders
slGapMode SlGapMode FIXED_POINTS
slGap double 10.0 SL gap value
tpMode TpMode BY_RR_VS_DEPTH
tpSetting double 2.0 TP setting value

Lot Management

Input Type Default Description
useFixedRisk bool true
riskPercent double 1.0 Risk % per trade
fixedLots double 0.1 Fixed lot size
maxLots double 10.0 Maximum lot size

Max Trades Filter

Input Type Default Description
maxTradesFilter MaxTradesFilter BY_TYPE
maxTrades int 3 Max trades (per type if BY_TYPE, total if BY_TOTAL)
pendingDeleteDistance int 10 Points distance to delete pending orders when max reached

Weekly Opening Filter

Input Type Default Description
UseWeeklyOpeningFilter bool true
weeklyRangePoints int 100 Range distance in points above/below weekly open

User Interface

Input Type Default Description
enableGUI bool true Enable/Disable GUI completely
enableTP_NoGUI bool true TP setting when GUI disabled
enableBuy_NoGUI bool true Buy execution when GUI disabled
enableSell_NoGUI bool true Sell execution when GUI disabled

Archive

Earlier versions / forks are preserved under archive/ for reference.

Install

  1. Copy the source file(s) into your MetaTrader 5 MQL5/ tree (Experts/, Indicators/, or Scripts/ as appropriate).
  2. In MetaEditor, open the file and compile (F7).
  3. Attach the compiled program to a chart from the terminal Navigator.

Risk note

Trading carries risk. This code shows how the strategy is built. It is not financial advice.

License

Proprietary. © Teenodi Ltd. All rights reserved. The code is shared for viewing only. See LICENSE.

About

Trading robot (Expert Advisor) for MetaTrader 5. It finds supply and demand zones and trades them, with session, news and daily-loss filters.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages