Nasdaq 100 overnight after a down day 2.00×
ResearchOctober 2025–October 2026 native result of $10,124.70 net, 18.61% maximum equity drawdown.
BACKTESTS · 3
EQUITY · BALANCE (USD)
IDX_NAS_Overnight200 · NAS100 H1 · quality 100% real ticks · drag to zoom, double-click to resetMONTHLY RETURNS
% of balance at month start| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2025 | · | · | · | · | · | · | · | · | · | 6.2% | -10.5% | -0.9% | -5.8% |
| 2026 | 2.4% | 2.3% | 2.6% | 10.6% | 6.0% | 7.7% | -0.5% | -0.4% | -1.5% | -11.8% | · | · | +16.9% |
TRADE STATS
| Gross profit | 138,923.01 | Gross loss | -128,798.31 |
| Expected payoff | 39.86 | Total deals | 472 |
| Long trades | 254 (48.4%) | Short trades | 0 (0.0%) |
| Largest win | 6,931.53 | Largest loss | -5,667.41 |
| Average win | 1,129.46 | Average loss | -983.19 |
| Max consec. wins | 9 | Max consec. losses | 6 |
| Balance DD max | 23,213.48 (17.4%) | Equity DD max | 24,913.86 (18.6%) |
| Leverage | 1:100 | Broker | afx Markets Ltd |
All report fields (46)
| History Quality | 100% real ticks |
| Bars | 6389 |
| Ticks | 166336855 |
| Symbols | 1 |
| Total Net Profit | 10 124.70 |
| Balance Drawdown Absolute | 8 755.81 |
| Equity Drawdown Absolute | 9 761.95 |
| Gross Profit | 138 923.01 |
| Balance Drawdown Maximal | 23 213.48 (17.41%) |
| Equity Drawdown Maximal | 24 913.86 (18.61%) |
| Gross Loss | -128 798.31 |
| Balance Drawdown Relative | 17.41% (23 213.48) |
| Equity Drawdown Relative | 18.61% (24 913.86) |
| Profit Factor | 1.08 |
| Expected Payoff | 39.86 |
| Margin Level | 4747.70% |
| Recovery Factor | 0.41 |
| Sharpe Ratio | 0.69 |
| Z-Score | -1.43 (84.73%) |
| AHPR | 1.0005 (0.05%) |
| LR Correlation | 0.83 |
| OnTester result | 110124.7 |
| GHPR | 1.0004 (0.04%) |
| LR Standard Error | 6 832.77 |
| Total Trades | 254 |
| Short Trades (won %) | 0 (0.00%) |
| Long Trades (won %) | 254 (48.43%) |
| Total Deals | 472 |
| Profit Trades (% of total) | 123 (48.43%) |
| Loss Trades (% of total) | 131 (51.57%) |
| Largest profit trade | 6 931.53 |
| Largest loss trade | -5 667.41 |
| Average profit trade | 1 129.46 |
| Average loss trade | -983.19 |
| Maximum consecutive wins ($) | 9 (6 541.70) |
| Maximum consecutive losses ($) | 6 (-8 360.62) |
| Maximal consecutive profit (count) | 8 997.46 (4) |
| Maximal consecutive loss (count) | -8 360.62 (6) |
| Average consecutive wins | 2 |
| Average consecutive losses | 2 |
| Correlation (Profits,MFE) | 0.70 |
| Correlation (Profits,MAE) | 0.64 |
| Correlation (MFE,MAE) | 0.0835 |
| Minimal position holding time | 0:59:30 |
| Maximal position holding time | 18:00:01 |
| Average position holding time | 10:45:02 |
NOTES
After a lower completed broker daily close, enter long outside 10:00–16:00 New York local time. Target cash during those six hours and after other daily closes. The EA treats broker-hour labels as UTC and converts for US daylight saving time.
Compile the supplied source and use MT5 Strategy Tester on NAS100 H1. Each test starts with USD 100,000, uses 1:100 account leverage, real-tick mode and a fixed 100 ms execution delay. The EA resizes on a new broker date or a change of target. Net results include the broker’s spread, booked swaps and closing commissions under its 0.0014% exit schedule. The source is tester-only.
The post-gap window starts October 1, 2025. Numerous order rejections delayed execution. Real-tick tests spanning the January 2025 data bottleneck have no completed audited statement in this release.
The 2.00× test breached 10% drawdown over the completed 13 months. In the separate unfinished long test, 29 matched month-end equity observations already show a decline of at least 15.67% from November 2022 to February 2023. Those marks cannot establish the final cash result.
| Requested period, inclusive | Net USD | Max equity DD | Trades | Eligible months | Swaps USD | Exit fees USD | Rejections |
|---|---|---|---|---|---|---|---|
| 2025-10-01 to 2026-10-31 | $10,124.70 | 18.61% | 254 | 13/13 | −$6,644.17 | $638.35 | 8,335 |
The monthly CSV reports native month-end equity and leaves missing months blank. Eligible monthly changes are based on equity including open positions. The website’s deal-balance chart uses realized balances. All maximum drawdowns above are the tester’s relative equity drawdowns.
PARAMETERS
↓ IDX_NAS_Overnight200.set| Input | Value | Optimise (start / step / stop) | Section |
|---|---|---|---|
| TesterOnly | true | ||
| AuditToken | 0 | ||
| Exposure | 2.00 |
View source
#property strict
#property version "1.00"
#define DEFAULT_EXPOSURE 2.00
const string LockedAnchor="NAS100";
const ulong LockedMagic=3383400819;
const bool MonthlyRebalance=false;
string LegNames[]={"NAS100"};
string MapNames[]={"NAS100"};
string MapSymbols[]={"NAS100"};
double LegWeights[]={1.0};
datetime ixSizedDate[];
double ixSizedWeight[],ixPendingWeight[];
// Retrospective NAS100 equity overnight inventory study. Broker server labels treated as UTC.
// The 2007 US DST rules apply throughout the available 2022–26 CFD series.
datetime ixSunday(const int year,const int month,const int ordinal,const int utcHour)
{
MqlDateTime t={}; t.year=year; t.mon=month; t.day=1; t.hour=utcHour;
const datetime first=StructToTime(t); TimeToStruct(first,t);
return first+(datetime)(((7-t.day_of_week)%7+7*(ordinal-1))*86400);
}
bool SelectedWeight(const int id,const string sym,const datetime hour,double &weight)
{
MqlDateTime t;
if(!TimeToStruct(hour,t)) return false;
const datetime daylight=ixSunday(t.year,3,2,7), standard=ixSunday(t.year,11,1,6);
const int offset=(hour>=daylight && hour<standard)?-4:-5;
const int localHour=(t.hour+24+offset)%24;
weight=0;
if(localHour>=10 && localHour<16) return true;
static datetime cached=0;
static double stored=0;
const datetime day=hour-hour%86400;
if(day!=cached)
{
MqlRates r[];
const int got=CopyRates(sym,PERIOD_D1,day-1,2,r);
if(got<0 || !SeriesInfoInteger(sym,PERIOD_D1,SERIES_SYNCHRONIZED)) return false;
stored=got==2 && r[1].time<day && r[1].close<r[0].close?1.0:0.0;
cached=day;
}
weight=stored; return true;
}
// Shared MT5 execution for explicitly frozen, per-symbol H1-opening targets.
// The assembler declares LegNames, the maximum LegWeights, the
// broker symbol map, default exposure, and the SelectedWeight() callback.
#include <Trade/Trade.mqh>
input bool TesterOnly = true;
input ulong AuditToken = 0;
input double Exposure = DEFAULT_EXPOSURE;
CTrade dsTrade;
string dsSymbols[];
bool dsDone[],dsReady[];
int dsSides[];
double dsVolumes[];
datetime dsHour=0, dsWake=0;
double dsOpeningEquity=0;
bool dsFinished=false;
uint dsErrors=0;
int dsMonthlyFile=INVALID_HANDLE;
datetime dsMonthStart=0,dsNextMonth=0,dsLastTick=0,dsFirstMonthTick=0;
double dsLastMarkedEquity=0,dsLastMarkedBalance=0;
void DSWriteMonth(const bool finalRow,const double ending)
{
if(dsMonthlyFile==INVALID_HANDLE || dsLastTick<=0) return;
FileWrite(dsMonthlyFile,TimeToString(dsMonthStart,TIME_DATE),TimeToString(dsFirstMonthTick,TIME_DATE|TIME_SECONDS),
TimeToString(dsLastTick,TIME_DATE|TIME_SECONDS),DoubleToString(dsLastMarkedEquity,2),
DoubleToString(dsLastMarkedBalance,2),finalRow?DoubleToString(ending,2):"");
FileFlush(dsMonthlyFile);
PrintFormat("Research tester monthly equity %s %.2f",TimeToString(dsMonthStart,TIME_DATE),dsLastMarkedEquity);
}
void DSObserveMonth(const datetime now)
{
if(dsMonthlyFile==INVALID_HANDLE) return;
if(now>=dsNextMonth)
{
DSWriteMonth(false,0);
MqlDateTime t;
if(!TimeToStruct(now,t)) return;
t.day=1; t.hour=0; t.min=0; t.sec=0;
dsMonthStart=StructToTime(t); dsFirstMonthTick=now;
if(t.mon==12) { t.year++; t.mon=1; } else t.mon++;
dsNextMonth=StructToTime(t);
}
dsLastTick=now;
dsLastMarkedEquity=AccountInfoDouble(ACCOUNT_EQUITY);
dsLastMarkedBalance=AccountInfoDouble(ACCOUNT_BALANCE);
}
string DSBrokerSymbol(const string canonical)
{
for(int i=0;i<ArraySize(MapNames);i++)
if(MapNames[i]==canonical) return MapSymbols[i];
return "";
}
bool DSAllowed(const string canonical)
{
for(int i=0;i<ArraySize(LegNames);i++) if(canonical==LegNames[i]) return true;
return false;
}
bool DSSized(const string sym,const int side,const MqlTick &tick,const double allocation,double &lots)
{
lots=0;
if(side==0) return true;
const double price=(tick.bid+tick.ask)/2;
const double contract=SymbolInfoDouble(sym,SYMBOL_TRADE_CONTRACT_SIZE);
const double step=SymbolInfoDouble(sym,SYMBOL_VOLUME_STEP);
if(price<=0 || contract<=0 || step<=0 || dsOpeningEquity<=0) return false;
const int digits=(int)SymbolInfoInteger(sym,SYMBOL_DIGITS);
const double ref=NormalizeDouble(price*1.01,digits);
double movement=0, margin=0;
const ENUM_ORDER_TYPE sideType=side>0?ORDER_TYPE_BUY:ORDER_TYPE_SELL;
if(ref<=price || !OrderCalcProfit(ORDER_TYPE_BUY,sym,1.0,price,ref,movement) || movement<=0 ||
!OrderCalcMargin(sideType,sym,1.0,price,margin) || margin<=0)
{
static int failures=0;
failures++;
if(failures<=3 || failures%10000==0) PrintFormat("Index USD sensitivity or margin unavailable %s events=%d",sym,failures);
return false;
}
const double notional=movement*price/(ref-price);
// Reserve at least 20% of account equity even if the contract margin rate changes.
double raw=MathMin(dsOpeningEquity*Exposure*allocation/notional,0.80*dsOpeningEquity*allocation/margin);
const double bound=SymbolInfoDouble(sym,SYMBOL_VOLUME_LIMIT);
if(bound>0) raw=MathMin(raw,bound);
lots=NormalizeDouble(MathFloor(raw/step+1e-10)*step,8);
if(lots<SymbolInfoDouble(sym,SYMBOL_VOLUME_MIN)) lots=0;
return true;
}
bool DSFilled(const bool sent,const string symbol)
{
const uint rc=dsTrade.ResultRetcode();
if(sent && (rc==TRADE_RETCODE_DONE || rc==TRADE_RETCODE_DONE_PARTIAL)) return true;
dsErrors++;
if(dsErrors<=8 || dsErrors%500==0)
PrintFormat("Research execution %s: %u %s (events %u)",symbol,rc,dsTrade.ResultRetcodeDescription(),dsErrors);
return false;
}
bool DSAlign(const string sym,int side,const double lots)
{
// Return true only after actual position volume has been confirmed.
if(lots==0) side=0;
const bool hedge=AccountInfoInteger(ACCOUNT_MARGIN_MODE)==ACCOUNT_MARGIN_MODE_RETAIL_HEDGING;
double owned=0;
ulong reduceTicket=0;
double reduceLots=0;
if(!dsTrade.SetTypeFillingBySymbol(sym)) return false;
for(int i=PositionsTotal()-1;i>=0;i--)
{
const ulong ticket=PositionGetTicket(i);
if(ticket==0 || PositionGetString(POSITION_SYMBOL)!=sym) continue;
if((ulong)PositionGetInteger(POSITION_MAGIC)!=LockedMagic)
{
if(!hedge) return true; // Shared net position cannot be attributed safely.
continue;
}
const int held=PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY?1:-1;
const double v=PositionGetDouble(POSITION_VOLUME);
if(held!=side)
{
DSFilled(dsTrade.PositionClose(ticket),sym);
return false;
}
owned+=v;
if(v>reduceLots) { reduceTicket=ticket; reduceLots=v; }
}
const double step=SymbolInfoDouble(sym,SYMBOL_VOLUME_STEP);
const double maximum=SymbolInfoDouble(sym,SYMBOL_VOLUME_MAX);
const double minimum=SymbolInfoDouble(sym,SYMBOL_VOLUME_MIN);
if(step<=0 || maximum<=0 || minimum<=0) return false;
const double diff=NormalizeDouble(lots-owned,8);
if(MathAbs(diff)<minimum-step*0.01) return true;
double qty=MathMin(MathAbs(diff),maximum);
qty=NormalizeDouble(MathFloor(qty/step+1e-8)*step,8);
if(qty<minimum) return true;
if(hedge && diff<0)
{
if(qty>=reduceLots-step*0.01)
DSFilled(dsTrade.PositionClose(reduceTicket),sym);
else
DSFilled(dsTrade.PositionClosePartial(reduceTicket,qty),sym);
return false;
}
const bool buy=(side>0)==(diff>0);
DSFilled(buy?dsTrade.Buy(qty,sym):dsTrade.Sell(qty,sym),sym);
return false;
}
int OnInit()
{
if(!MQLInfoInteger(MQL_TESTER) || !TesterOnly || AccountInfoString(ACCOUNT_CURRENCY)!="USD") return INIT_FAILED;
if((TesterOnly && !MQLInfoInteger(MQL_TESTER)) || Exposure<=0 || !MathIsValidNumber(Exposure)) return INIT_PARAMETERS_INCORRECT;
const int n=ArraySize(LegNames);
if(n==0 || n!=ArraySize(LegWeights) || ArraySize(MapNames)!=ArraySize(MapSymbols)) return INIT_PARAMETERS_INCORRECT;
ArrayResize(dsSymbols,n); ArrayResize(dsDone,n); ArrayResize(dsReady,n);
ArrayResize(ixSizedDate,n); ArrayResize(ixSizedWeight,n); ArrayResize(ixPendingWeight,n);
ArrayInitialize(ixSizedDate,0); ArrayInitialize(ixSizedWeight,0);
ArrayResize(dsSides,n); ArrayResize(dsVolumes,n);
double total=0;
for(int i=0;i<n;i++)
{
dsSymbols[i]=DSBrokerSymbol(LegNames[i]);
if(!DSAllowed(LegNames[i]) || dsSymbols[i]=="" || LegWeights[i]<=0 || !SymbolSelect(dsSymbols[i],true)) return INIT_PARAMETERS_INCORRECT;
total+=LegWeights[i];
}
if(total<=0 || _Symbol!=LockedAnchor) return INIT_PARAMETERS_INCORRECT;
if(MQLInfoInteger(MQL_TESTER) && AuditToken>0)
{
const string fn="AFXResearch\\monthly-"+IntegerToString((long)AuditToken)+".csv";
dsMonthlyFile=FileOpen(fn,FILE_WRITE|FILE_CSV|FILE_ANSI|FILE_COMMON,',');
if(dsMonthlyFile==INVALID_HANDLE) { PrintFormat("Research tester monthly file error %d",GetLastError()); return INIT_FAILED; }
FileWrite(dsMonthlyFile,"month","first_tick","last_tick","marked_equity","marked_balance","final_tester_equity");
}
dsTrade.SetExpertMagicNumber(LockedMagic);
dsTrade.SetAsyncMode(false);
return INIT_SUCCEEDED;
}
void OnTick()
{
const datetime now=TimeCurrent();
DSObserveMonth(now);
const datetime hour=(datetime)(((long)now/3600)*3600);
if(hour!=dsHour)
{
dsHour=hour;
dsWake=0;
dsFinished=false;
dsOpeningEquity=AccountInfoDouble(ACCOUNT_EQUITY);
ArrayInitialize(dsDone,false);
ArrayInitialize(dsReady,false);
}
if(dsFinished || now<dsWake) return;
bool all=true;
for(int i=0;i<ArraySize(dsSymbols);i++)
{
if(dsDone[i]) continue;
MqlTick tick;
const string sym=dsSymbols[i];
if(!SymbolInfoTick(sym,tick) || tick.time<hour || tick.time>now || tick.bid<=0 ||
tick.ask<tick.bid || iTime(sym,PERIOD_H1,0)!=hour) { all=false; continue; }
if(!dsReady[i])
{
double weight=0;
if(!SelectedWeight(i,sym,hour,weight) || !MathIsValidNumber(weight) ||
MathAbs(weight)>LegWeights[i]+1e-8) { all=false; continue; }
const int side=weight>0?1:(weight<0?-1:0);
// Research weights rebalance at first executable bar per broker date or weight change.
const datetime today=hour-hour%86400;
if(ixSizedDate[i]==today && MathAbs(weight-ixSizedWeight[i])<1.e-9)
{ dsDone[i]=true; continue; }
if(!DSSized(sym,side,tick,MathAbs(weight),dsVolumes[i])) { all=false; continue; }
ixPendingWeight[i]=weight;
dsSides[i]=side;
dsReady[i]=true;
}
dsDone[i]=DSAlign(sym,dsSides[i],dsVolumes[i]);
if(dsDone[i]) { ixSizedDate[i]=hour-hour%86400; ixSizedWeight[i]=ixPendingWeight[i]; }
if(!dsDone[i]) all=false;
}
if(dsMonthlyFile!=INVALID_HANDLE)
{
dsLastMarkedEquity=AccountInfoDouble(ACCOUNT_EQUITY);
dsLastMarkedBalance=AccountInfoDouble(ACCOUNT_BALANCE);
}
dsFinished=all;
dsWake=now+(now-hour<30?1:30);
}
double OnTester()
{
const double ending=TesterStatistics(STAT_INITIAL_DEPOSIT)+TesterStatistics(STAT_PROFIT);
DSWriteMonth(true,ending);
return ending;
}
void OnDeinit(const int reason)
{
if(dsMonthlyFile!=INVALID_HANDLE) FileClose(dsMonthlyFile);
PrintFormat("Research execution ended, trade error responses=%u.",dsErrors);
}
FILES
every upload is kept| Type | File | Notes | Size | DL | SHA-256 | Uploaded |
|---|---|---|---|---|---|---|
| FILE | IDX_NAS_Overnight200_recentm1_MT5_monthly_equity.csv latest | Native monthly MT5 equity marks for 2025-01-01 through 2026-10-31, M1 OHLC. Includes observed first and last quotes and full-month eligibility. | 2.5 KB | 0 | fa67f52dc270 | 2026-11-29 09:46 |
| BACKTEST | IDX_NAS_Overnight200_recentm1_2025-01-01_to_2026-11-01_MT5.html latest | M1 OHLC. 2025-01-01 through 2026-10-31. NAS100 H1, $100,000 starting capital, 1:100 account leverage and 100 ms delay. The statement booked USD 899.51 in exit commission at the supplied 0.0014% schedule, with USD -9,911.29 swap. Native month-end marks span 2025.01.01 00:00:00 to 2026.10.30 20:59:59 broker time. 4 original images and all deals are included. Orders table omitted. M1 OHLC uses four simulated prices per minute. The tester journal recorded 8629 order error responses. | 275.6 KB | 0 | 0cafe8008ede | 2026-11-29 09:46 |
| FILE | IDX_NAS_Overnight200_longm1_MT5_monthly_equity.csv latest | Native monthly MT5 equity marks for 2022-08-01 through 2026-10-31, M1 OHLC. Includes observed first and last quotes and full-month eligibility. | 5.8 KB | 0 | f61bac7e982f | 2026-11-29 09:46 |
| BACKTEST | IDX_NAS_Overnight200_longm1_2022-08-01_to_2026-11-01_MT5.html latest | M1 OHLC. 2022-08-01 through 2026-10-31. NAS100 H1, $100,000 starting capital, 1:100 account leverage and 100 ms delay. The statement booked USD 2,558.64 in exit commission at the supplied 0.0014% schedule, with USD -37,472.16 swap. Native month-end marks span 2022.08.01 00:00:00 to 2026.10.30 20:59:59 broker time. 4 original images and all deals are included. Orders table omitted. M1 OHLC uses four simulated prices per minute. The tester journal recorded 21593 order error responses. | 481.0 KB | 0 | 90a6692e5f90 | 2026-11-29 09:46 |
| FILE | IDX_NAS_Overnight200_monthly_equity.csv latest | Native intratest USD equity marks by requested calendar month. Empty cells indicate missing observations or an ineligible monthly change. The platform’s deal-balance charts use a different series. | 1.5 KB | 0 | ecf02a9ae194 | 2026-11-29 01:20 |
| BACKTEST | IDX_NAS_Overnight200_2025-10-01_to_2026-10-31.html latest | MT5 real-tick mode. 13 eligible months of 13 requested. Financing −$6,644.17. Closing fees $638.35. | 349.2 KB | 0 | 446c368ffdb1 | 2026-11-29 01:20 |
| PARAMS | IDX_NAS_Overnight200.set latest | Tested economic inputs. The internal monthly recording identifier has been reset to zero. | 94 B | 0 | afa42ad0e5c5 | 2026-11-29 01:20 |
| SOURCE | IDX_NAS_Overnight200.mq5 latest | Original compiled-and-tested MQL5 source. The EA requires MT5 Strategy Tester and a USD account. | 11.1 KB | 0 | 56de7bcfca5c | 2026-11-29 01:20 |
Other sizes of this rule
This page is the 2.00× exposure. The main research page is the 0.50× baseline: Nasdaq 100 overnight after a down day 0.50×. Figures scale with the multiplier. They are Strategy Tester simulations, not live results.