거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
315
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

backtest 15 min GBPUSDHere is a brief, technical narration of the core logic driving your Expert Advisor. The architecture relies on an equity-based portfolio management model rather than traditional pip-based static targets.

1. Entry Logic (Conditionals)

The EA evaluates trading conditions on a per-bar basis, comparing the previous completed candle ( Close[1] ) and the current developing candle ( Open[0] ) against indicator buffers.

  • Cycle 1 (Moving Average): Acts as a basic trend-following module.

    • Buy: Triggers if Close[1] and Open[0] are both strictly above the MA line.

    • Sell: Triggers if Close[1] and Open[0] are both strictly below the MA line.

  • Cycles 2 & 3 (Envelopes): Acts as a breakout or momentum module.

    • Buy: Triggers if Close[1] and Open[0] are both above the Upper Envelope band.

    • Sell: Triggers if Close[1] and Open[0] are both below the Lower Envelope band.

    • (Note: Cycle 3 is a direct clone of Cycle 2 logic, simply running on an independent magic number and deviation parameter).

2. Take Profit (TP) and Stop Loss (SL) Logic

Instead of sending hardcoded SL/TP price levels to the broker, this EA manages risk internally by monitoring floating equity.

When a cycle initiates its first trade (e.g., Buycount == 0 ), the EA snapshots the current Account Equity and calculates two monetary thresholds:

  • Target Price (TP): Initial Equity + (Initial Equity * target_percent / 100)

  • Risk Price (SL): Initial Equity - (Initial Equity * risk_percent / 100)

Execution: On every tick, custom functions ( MyAccountProfit_Buy / MyAccountProfit_Sell ) aggregate the floating profit, swap, and commission for all active positions tied to a specific Cycle's Magic Number. If Initial Equity + Floating Profit hits either the Target (TP) or Risk (SL) threshold, the EA triggers a routine to close all positions for that cycle and resets the cycle state.

Codebase Anomaly Note: In your original Cycle 1 Buy logic, the target/risk math divides by 1000 instead of 100, which calculates a 0.1% target instead of 1%. Cycles 2, 3, and Cycle 1 Sells divide by 100.

3. Execution & State Management

  • Bar Lock: To prevent opening hundreds of trades on a single candle, the EA stores the Open[0] price into open_price . A new trade is only authorized if the current open price differs from the stored variable (ensuring one entry per bar).

  • Alternation / Grid: Variables like c1_Buycycle and c1_sellcycle are used to toggle the availability of the opposing signal. For instance, successfully executing a Buy disables further independent Buys but primes the Sell cycle, suggesting a loosely structured hedging or reversal grid.


T5Copier - MT 5 client to client Local trade copier T5Copier - MT 5 client to client Local trade copier

A local client to client trade copier with custom dashboard in C# and transport pipe in golang , complete src is provided in archive ( socket based ver ) ultra low latency

Envelope SAR Envelope SAR

This indicator is a trend-momentum oscillator that tracks where price sits relative to its structural volatility channel using a normalized relationship between the Parabolic SAR and Envelopes.

Market Miner Market Miner

A multi strategy EA gold mine :)

Candle Timer Candle Timer

"An MT5 on-chart trading utility panel that displays real-time floating profit and loss (P&L) for active positions based on specific lot sizes, paired with a candle countdown timer to track market structure sessions.