Parent Child Timeframe Trend Trader
- Experts
- Versione: 2.0
- Attivazioni: 10
Parent Child Timeframe Trend Trader is an automated Expert Advisor for MetaTrader 5.
IMPORTANT RISK NOTICE
Trading leveraged products is risky. This EA uses a stop loss on its trades, but a stop loss can be skipped by gaps and slippage. Past or simulated results do not guarantee future results. Test on a demo account first and only risk money you can afford to lose.
How it works
- Choose a pair set: for example D1 as the parent and H4 as the child. All decisions use closed candles.
- BUY: the parent is rising (or turning up) and the child has just closed back up after a pullback. SELL is the mirror image.
- Stop loss at the swing of the pullback on the child timeframe, optional take profit in R multiples, optional direction filter with D1/H4.
- The trade is closed when the child candle closes against the position, after a maximum holding time, or at SL/TP.
- Lot is a fixed lot or a risk percentage of the balance. Orders are retried when the market is closed.
Safety and broker compatibility
- Volume is normalized to the symbol minimum, maximum and step before every order.
- Free margin is checked with OrderCalcMargin before an order is sent.
- Stops level and freeze level are respected when placing or modifying orders and SL/TP; a modification is not sent when the values are unchanged and nothing is modified inside the freeze zone.
- Symbol trade mode, trading session, order limit and filling mode are checked before sending requests.
- No DLL, no web requests, no files are written.
BOTKRIT recovery core and dashboard
This build includes a basket recovery core and a standard BOTKRIT panel. When the open basket of this EA loses more than the set percentage of the balance the EA pauses its own new entries and the core can open balancing (hedge) trades with its own magic number until the basket can be closed at break-even plus a target; the basket is cut at the set loss percentage. Balancing trades can increase exposure. The core works on hedging accounts only and can be switched off with InpRKOn = false. The panel can be collapsed and moved to another corner.
Inputs
- InpPair (default PAIR_D1_H4): Pair
- InpFilter (default FILTER_NONE): Filter
- InpSides (default SIDES_BOTH): Sides
- InpTP_R (default 0.0): Tp r
- InpMaxHoldHours (default 720): Max hold hours
- InpSLBufferPts (default 0): Slbuffer pts
- InpRiskPercent (default 1.0): Risk percent
- InpFixedLot (default 0.01): Fixed lot
- InpDeviationPts (default 30): Deviation pts
- InpRetrySec (default 5): Retry sec
- InpMagic (default 26092800): Magic
- InpWarmupBars (default 300): Warmup bars
- InpLogStates (default false): Log states
- InpFilePrefix (default PairEA): File prefix
Recovery core and dashboard inputs:
- InpRKOn (default true): Recovery core on/off: when the basket loss grows, new entries of the EA are paused and balancing trades can be opened until the basket closes
- InpRKStartPct (default 3.0): Start recovery when the basket loss exceeds this percent of the balance at basket start
- InpRKStartATR (default 3.0): or when price runs against the net position by this many ATR (0 = off)
- InpRKCutPct (default 30.0): Close the whole basket at this percent loss of the start balance
- InpRKShockATR (default 10.0): Shock distance to survive (ATR multiples), used for the lot ceiling
- InpRKMinMargin (default 300.0): Do not open a recovery trade if the margin level after opening would be below this percent
- InpRKSpreadMul (default 2.0): Pause recovery trades when the spread is above this multiple of the 60-minute median
- InpRKCorner (default bottom right): Corner of the BOTKRIT panel
- InpRKBar0 (default FULL): Bar-0 label (basket profit, spread and leverage)
Recommended setup
- Any symbol. Default pair D1/H4, so use the H4 or D1 chart and several months of history.
- Minimum capital: A balance of 500 USD or more with the default 1 percent risk or 0.01 lot.
- Test on a demo account first and keep the lot small.
