Loading…

Challenge Progress Projector

"Am I on pace to pass this challenge" is usually answered by gut feel somewhere around day twenty. This EA answers it with a number, rebuilt from the trader's own recent closed trades rather than an assumed constant edge: it samples the most recent matching trades, measures average net result per trade (expectancy in money) and how many trades close per distinct trading day (pace), multiplies the two into a money-per-day rate, and divides the remaining distance to target by that rate to project how many days are actually needed at the current pace. That projection is compared against the days genuinely left in the challenge window to report plainly whether the account is on pace or off pace, alongside the flat daily return - in money and in percent of current balance - that would be required to close the gap in the time remaining regardless of past pace. Places no orders; it is a projection tool only. The one thing a restart would otherwise silently corrupt is the starting balance and start date - re-reading AccountBalance() after a terminal restart would mistake today's balance for day one. Both are captured once into terminal global variables keyed by account number the first time this EA ever runs on the account, and reused on every later attach unless the trader supplies them explicitly through the inputs. Notes and limitations The projection is only as good as the recent sample - a short streak of unusually large wins or losses can swing expectancy sharply, and the tool does not smooth or discount for that. Trading pace is measured from distinct closed-trade days, so a trader who suddenly changes frequency (more or less active than their recent history) will see the projection lag behind the new reality for a few trades. It reads the account balance directly, so manual deposits or withdrawals during the challenge will shift the apparent profit progress even though they are not trading results. On MQL5, a heavily part-closed trading history samples slightly differently than on MQL4 - see MQL4 VERSUS MQL5 DIFFERENCES above.

Expert advisor · MT4 · v1.0 · Free

About Challenge Progress Projector

Challenge Progress Projector is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Target profit percent, Starting balance and Max trading days. MQL source code included.

Files in the download: ChallengeProgressProjector.ex4, ChallengeProgressProjector.mq4, ChallengeProgressProjector.txt.

Settings

SettingDefaultWhat it does
Target profit percent10.0Profit target, percent of the starting balance
Starting balance0.0Starting balance override; 0 = capture automatically on first run
Max trading days30Total calendar days allowed for the challenge phase
Challenge start date0Start date override; 0 = capture automatically on first run
Lookback trades for expectancy20Closed trades sampled to measure expectancy and trading pace
Magic filter-1Magic number filter, -1 = every magic number
Recalc seconds60Minimum seconds between recalculations

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Alerts · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria