OPENSTRATS

SOL weekend direction at 0.30×

Research

Jul 2021–Oct 2026 MT5 results showed +$73,878.17 net and 10.94% maximum equity drawdown. The January 2025 restart lost $480.67.

SYM SOLUSDTF H1TEST 2021-07-01 → 2026-10-31UPDATED VIEWS 0DOWNLOADS 0#trend

BACKTESTS · 2

1 of 2
NET PROFIT · USD
+73,878
from 100,000 USD
RETURN
+73.9%
CAGR
+10.9%
5.3 yrs
PROFIT FACTOR
1.41
SHARPE
2.09
MAX DD
-10.9%
equity, relative
RECOVERY
3.55
TRADES
10642
49.6% win

EQUITY · BALANCE (USD)

Crypto_SessionRelative · SOLUSD H1 · quality 73% real ticks · drag to zoom, double-click to reset

MONTHLY RETURNS

% of balance at month start
YearJanFebMarAprMayJunJulAugSepOctNovDecYear
2021······-1.2%5.3%2.0%0.5%-0.4%1.0%+7.3%
20221.5%-1.2%-1.1%0.0%4.3%7.0%0.6%-0.0%-1.2%2.9%7.0%-2.5%+18.0%
20238.4%-1.9%3.1%-1.0%1.9%3.4%0.4%-1.5%0.7%6.7%-0.1%6.3%+29.2%
20243.0%-3.0%0.6%0.7%1.9%-2.2%2.5%5.6%-1.3%-0.5%4.0%-4.3%+6.8%
20252.4%2.4%0.8%-0.8%-0.1%-2.0%0.1%-0.9%0.5%-0.2%-0.0%0.5%+2.7%
2026-1.9%-1.4%0.9%1.6%2.6%-2.8%-2.4%2.8%-2.6%0.3%··-3.1%

TRADE STATS

Gross profit252,507.03Gross loss-178,628.86
Expected payoff6.94Total deals15992
Long trades5742 (54.3%)Short trades4900 (44.2%)
Largest win7,444.33Largest loss-4,331.60
Average win47.83Average loss-33.31
Max consec. wins72Max consec. losses96
Balance DD max13,531.76 (7.3%)Equity DD max20,790.09 (10.9%)
Leverage1:100BrokerWithheld
All report fields (46)
History Quality73% real ticks
Bars43877
Ticks267573897
Symbols1
Total Net Profit73 878.17
Balance Drawdown Absolute1 458.83
Equity Drawdown Absolute3 411.18
Gross Profit252 507.03
Balance Drawdown Maximal13 531.76 (7.29%)
Equity Drawdown Maximal20 790.09 (10.94%)
Gross Loss-178 628.86
Balance Drawdown Relative7.29% (13 531.76)
Equity Drawdown Relative10.94% (20 790.09)
Profit Factor1.41
Expected Payoff6.94
Margin Level249016.63%
Recovery Factor3.55
Sharpe Ratio2.09
Z-Score-79.27 (99.74%)
AHPR1.0001 (0.01%)
LR Correlation0.97
OnTester result173878.1699999999
GHPR1.0001 (0.01%)
LR Standard Error6 434.17
Total Trades10642
Short Trades (won %)4900 (44.16%)
Long Trades (won %)5742 (54.25%)
Total Deals15992
Profit Trades (% of total)5279 (49.61%)
Loss Trades (% of total)5363 (50.39%)
Largest profit trade7 444.33
Largest loss trade-4 331.60
Average profit trade47.83
Average loss trade-33.31
Maximum consecutive wins ($)72 (3 821.39)
Maximum consecutive losses ($)96 (-5 361.85)
Maximal consecutive profit (count)8 228.55 (49)
Maximal consecutive loss (count)-6 279.36 (84)
Average consecutive wins9
Average consecutive losses9
Correlation (Profits,MFE)0.67
Correlation (Profits,MAE)0.18
Correlation (MFE,MAE)-0.4191
Minimal position holding time0:00:15
Maximal position holding time47:45:16
Average position holding time22:29:48

NOTES

Holds SOL over the weekend in the direction of its completed Friday return, targeting 30% of equity. A positive Friday close-to-close return sets a long Saturday–Sunday target. A negative return sets a short target. Weekdays target cash.

Jul 2021–Oct 2026: +$73,878.17 net, +$1,154.35 per month, 0.868% compounded monthly, 10.94% maximum equity drawdown. Jan 2025–Oct 2026: −$480.67 net, −$21.85 per month, -0.022% compounded monthly, 10.94% maximum equity drawdown. Each MT5 window starts with USD 100,000. The later windows overlap the long history. The tester booked 0.0014% of closing notional, with swap and spread reflected in the net results.

The USD 100,000 account earned $73,878.17 net from July 2021 through October 2026. It booked $29,852.81 before December 2, 2022, when the tester journal first recorded SOL real-tick history. It entered that date flat with $129,852.81 and earned another $44,025.36 through October 2026 on the same account, without resetting equity. MT5 could still generate replacement ticks for later minutes with absent or inconsistent tick data.

InputValueOptimise (start / step / stop)Section
TesterOnlytrue
EquityLogId0
Exposure0.3
Crypto_SessionRelative.mq5264 lines · 9.8 KB · 2026-11-29 ↓ download
View source
#property strict
#property version "1.00"
// Historical research only. Frozen coin-contract sizing, instrument universe and rule.
const ulong LockedMagic=209416941003;
const string LockedAnchor="SOLUSD";
string LegNames[]={"SOLUSD"};
double LegWeights[]={1.0};
string MapNames[]={"SOLUSD"};
string MapSymbols[]={"SOLUSD"};

// The same Friday return applies on Saturday and Sunday. Weekdays are flat.
bool SelectedWeight(const int leg,const string sym,const datetime hour,double &weight)
{
   MqlDateTime d; TimeToStruct(hour,d);
   weight=0.0;
   if(d.day_of_week!=6 && d.day_of_week!=0) return true;
   const datetime day=(datetime)(((long)hour/86400)*86400);
   const datetime friday=day-(d.day_of_week==6?86400:172800);
   MqlRates r[];
   const int n=CopyRates(sym,PERIOD_D1,friday+86399,2,r);
   if(n<0) return false;
   if(n!=2 || r[1].time!=friday || r[0].close<=0) return true;
   weight=r[1].close>r[0].close?1.0:(r[1].close<r[0].close?-1.0:0.0);
   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 EquityLogId = 0;
input double Exposure = 0.3;
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)
{
   if(canonical=="BTCUSD" || canonical=="SOLUSD" || canonical=="ETHUSD") return true;
   if(StringLen(canonical)!=6) return false;
   const string base=StringSubstr(canonical,0,3), quote=StringSubstr(canonical,3);
   const string fx="|USD|EUR|GBP|JPY|CHF|CAD|AUD|NZD|";
   return base!=quote && StringFind(fx,"|"+base+"|")>=0 && StringFind(fx,"|"+quote+"|")>=0;
}

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 string account=AccountInfoString(ACCOUNT_CURRENCY);
   const string base=SymbolInfoString(sym,SYMBOL_CURRENCY_BASE);
   const string quote=SymbolInfoString(sym,SYMBOL_CURRENCY_PROFIT);
   double notional=contract;
   if(base!=account)
   {
      if(quote==account) notional=contract*price;
      else
      {
         double move=0;
         if(!OrderCalcProfit(ORDER_TYPE_BUY,sym,1.0,price,price*1.01,move) || move<=0) return false;
         notional=move*100;
      }
   }
   double raw=dsOpeningEquity*Exposure*allocation/notional;
   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" || _Period!=PERIOD_H1) || 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(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) && EquityLogId>0)
   {
      const string fn="StrategyResearch\\monthly-"+IntegerToString((long)EquityLogId)+".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);
         if(!DSSized(sym,side,tick,MathAbs(weight),dsVolumes[i])) { all=false; continue; }
         dsSides[i]=side;
         dsReady[i]=true;
      }
      dsDone[i]=DSAlign(sym,dsSides[i],dsVolumes[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
TypeFileNotesSizeDLSHA-256Uploaded
FILECrypto_SessionRelative_monthly_equity.csv latestMonth-end marked equity by independent MT5 account. A partial month is identified by its observed broker timestamps.9.0 KB0ceea62d625a22026-11-29 01:22
BACKTESTCrypto_SessionRelative_holdfee.html latestMT5 Strategy Tester, USD 100,000 initial capital. 1,988 closed trades. Native net P&L includes −$41.02 commission and +$0.00 swap. MT5 history quality: 100% real ticks. Rejected requests: 0.1.5 MB005c9b5da49fe2026-11-29 01:22
BACKTESTCrypto_SessionRelative_fullfee.html latestMT5 Strategy Tester, USD 100,000 initial capital. 10,642 closed trades. Native net P&L includes −$184.96 commission and +$0.00 swap. MT5 history quality: 73% real ticks. Rejected requests: 0.7.3 MB07c7bcc4750b02026-11-29 01:22
PARAMSCrypto_SessionRelative.set latestStrategy MT5 Strategy Tester preset. Exposure 0.3×.94 B08ab4424a4f692026-11-29 01:22
SOURCECrypto_SessionRelative.mq5 latestStrategy MQL5 source. Trade rules and sizing are preserved. The optional equity log uses a public identifier.9.8 KB015c538b910cc2026-11-29 01:22

MORE CRYPTO STRATEGIES

all Crypto →