On this page, you will find comprehensive information about all types of reports generated by BIASMACHINE, the data collection methods, the event evaluation techniques used for the reports, and the interpretation recommended by the developers.

With this data, and some basic programming skills or the ability to write technical specifications for developers, each of you will be able to reproduce the obtained results.

BIASMACHINE is open to both critics and further research. Comments and suggestions for development are welcomed through the form at the bottom of the page.

HOW IT WORKS:
ACQUIRING TICK DATA HISTORY
It's essential to find high-quality data for analysis. Through experimentation, we have found that obtaining sufficiently deep, high-quality history that can be analyzed programmatically is quite challenging. Regular brokers, such as IC Markets or RoboForex, do not store tick data, and even the depth of candlestick data is significantly limited.
For this reason, BIASMACHINE developers use Ducascopy TICK data (via QuantManager). For each asset being researched, the data is exported to MetaTrader for analysis.
ACQUIRING INFORMATION ON HIGH-VOLATILITY EVENTS
Using the economic calendar from Investing.com, a Python data parser filters the event types (high-impact ***) for the required currencies—specifically USD and EUR using the filters on Investing.com.
The desired historical interval is selected, and then the parser extracts the dates of the news events, calibrated by the type of news.
The result is a list of dates in the format:
{ D'2000.03.01 05:00:00', .... , D'2024.05.28 10:00:00' }.
DATABASE FORMATION
Based on the collected dates, a database is formed, which includes all highs and lows of every 15-minute candle from the start of the Asian session the day before the report release until the end of the news day.
In addition to candle extremes, the structural state before, during, and after the report release is also recorded.
The structure is defined using the HH-HL-LH-LL scheme, following these rules:
  • "A new structural high or low is only formed through an external move."
  • "A high confirms a low, otherwise it is not considered a high; a low confirms a high, otherwise it is not considered a low."
DATA ANALYSIS
Using simple C++ loops and counters available in MQL5 (the scripting editor for MetaTrader 5), each pass through the table corresponding to the type of news event generates probability figures relevant to the selected type of news.
Details on how specific probabilities are calculated are provided below.
VISUALIZATION OF ANALYSIS RESULTS
A custom Python script is used to analyze Investing.com at the start of each day for scheduled news events of the desired type and volatility level. If relevant news events are found, figures from the previous analysis step are programmatically overlaid onto pre-prepared PNG templates. The "puzzle pieces" of the images are then stitched together to form comprehensive reports.

PUBLICATION
Using the same Python script, a schedule is created for each currency pair and news event. At the appropriate time, the script automatically publishes the reports generated in the previous step
TYPES OF REPORTS AND INTERPRETATION:
Everything discussed below is contained within the final loop of this code.
To understand that this is essentially just counters…
for(int i=0; i<ArraySize(news_type); i++){ // каждый проход это таблица
        
      int db=DatabaseOpen(global_file, DATABASE_OPEN_READWRITE | DATABASE_OPEN_CREATE |DATABASE_OPEN_COMMON);
      // Print(__FUNCTION__ , " ", db);
      if(db==INVALID_HANDLE){
          Print(__FUNCTION__, " DB: ", global_file, " open failed with code ", GetLastError());
      }else{

         global_newstype = news_type[i];

         //после подключения к таблице осуществляется поиск данны
         //string req = NormalizeSelect("ID WHERE H4MINUS4HDIR='down'");
         
         string req = NormalizeSelect(preRequest);
         string IDs[]; requestArr(db, req, IDs); //нужные айдишники
 
         //cчетчики
         int   LO_asianContinuationLongs=0, LO_asianContinuationShorts=0, LO_asianRange=0,  
               loAsianHighSeek=0, loAsianLowSeek=0, loAsianDestroy=0, 
               euAsianHighSeek=0, euAsianLowSeek=0, euAsianDestroy=0,
               LO_LONGS_TOKYO_LOW_Seek=0, LO_LONGS_ASIAN_LOW_Seek=0, 
               EU_LONGS_TOKYO_LOW_Seek=0, EU_LONGS_ASIAN_LOW_Seek=0, 
               LO_SHORTS_TOKYO_HIGH_Seek=0, LO_SHORTS_ASIAN_HIGH_Seek=0, 
               EU_SHORTS_TOKYO_HIGH_Seek=0, EU_SHORTS_ASIAN_HIGH_Seek=0,
               AM_LONGS_LO_LOW_Seek =0, AM_LONGS_EU_LOW_Seek   =0, 
               AM_LONGS_TOKYO_LOW_Seek   =0, AM_LONGS_ASIAN_LOW_Seek  =0, 
               USA_LONGS_LO_LOW_Seek  =0, USA_LONGS_EU_LOW_Seek  =0, 
               USA_LONGS_TOKYO_LOW_Seek  =0, USA_LONGS_ASIAN_LOW_Seek  =0,         
               AM_SHORTS_LO_HIGH_Seek=0, AM_SHORTS_EU_HIGH_Seek  =0, 
               AM_SHORTS_TOKYO_HIGH_Seek  =0, AM_SHORTS_ASIAN_HIGH_Seek =0, 
               USA_SHORTS_LO_HIGH_Seek=0, USA_SHORTS_EU_HIGH_Seek=0, 
               USA_SHORTS_TOKYO_HIGH_Seek=0, USA_SHORTS_ASIAN_HIGH_Seek=0;
         int   AM_EUContinuationLongs=0, AM_EUContinuationShorts=0, AM_EURange=0,  
               AMEUHighSeek=0, AMEULowSeek=0, AMEUDestroy=0, 
               USAEUHighSeek=0, USAEULowSeek=0, USAEUDestroy=0;      
         int   euDayLow=0,    loDayLow=0,    asiaDayLow=0,  usaDayLow=0,   amDayLow=0,    
               SopenDayLow=0,    PremarketDayLow=0,   LunchDayLow=0,    PMDayLow=0,    
               LastHourDayLow=0,
               euDayHigh=0,   loDayHigh=0,   asiaDayHigh=0, usaDayHigh=0,  amDayHigh=0,   
               SopenDayHigh=0,   PremarketDayHigh=0,  LunchDayHigh=0,   PMDayHigh=0,   
               LastHourDayHigh=0;
         int   PerviousDayLow=0,      PerviousDayHigh=0, PerviousDayDestroy=0, 
               PerviousDayRange=0,
               euPerviousDayLow=0,    loPerviousDayLow=0,    asiaPerviousDayLow=0,  
               usaPerviousDayLow=0,   amPerviousDayLow=0,    SopenPerviousDayLow=0,    
               PremarketPerviousDayLow=0,   LunchPerviousDayLow=0,    PMPerviousDayLow=0,    
               LastHourPerviousDayLow=0,
               euPerviousDayHigh=0,   loPerviousDayHigh=0,   asiaPerviousDayHigh=0, 
               usaPerviousDayHigh=0,  amPerviousDayHigh=0,   SopenPerviousDayHigh=0,   
               PremarketPerviousDayHigh=0,  LunchPerviousDayHigh=0,   PMPerviousDayHigh=0,   
               LastHourPerviousDayHigh=0;
         int   Monday=0, Tuesday=0, Wednesday=0, Thursday=0, Friday=0,
               WeekHigh_Monday=0, WeekHigh_Tuesday=0, WeekHigh_Wednesday=0, 
               WeekHigh_Thursday=0, WeekHigh_Friday=0,
               WeekLow_Monday=0, WeekLow_Tuesday=0, WeekLow_Wednesday=0, 
               WeekLow_Thursday=0,WeekLow_Friday=0;              
         int   pdlafternewslfill = 0, pdhafternewslfill = 0, 
               pdlbeforenewslfill = 0, pdhbeforenewslfill = 0;
         int   reversal_1D = 0, reversal_4H=0, reversal_1H=0,
               reversal_15m_30=0, reversal_15m_2h=0, 
               reversal_15m_4h=0,reversal_15m_30m2h=0, reversal_15m_30m4h=0,
               reversal_h1_2h =0, reversal_h1_4h=0, reversal_h1_2h4h=0, reversal_h4_4h=0;
         int   d1fvg_before_news=0,d1fvg_after_news=0, h4fvg_before_news=0, 
               h4fvg_after_news=0, h1fvg_before_news=0, h1fvg_after_news=0;
         
  
         for(int l = 0; l < ArraySize(IDs); l++) { //строки таблицы с учетом выборки айдишников
               UpdateDataGlobalCandles(db, IDs[l], l); //правильные свечи 
               UpdateMacroHighsAndLows(); //ключевые хаи-лои
                ................
By simply iterating through all news days (each row of the table represents a news day—all recorded candlestick and structural data from previous steps), when a condition is met, a specific counter is incremented by one. The resulting value of the counter, divided by the number of rows, gives the conditional probability of the event corresponding to that counter for the given type of news (table).
Special mention should be made of the sessions, macros, and session opening values used, referred to as "key values."
KEY VALUES
ASIA: 06:00 PM - 01:00 AM
TOKYO: 7:30 PM - 8:30 PM
NYM: 12:00 AM candle open
EUROPE: 01:00 AM - 09:00 AM
LO: 03:00 AM - 04:00 AM
Sopen: 07:00 AM - 07:30 AM
USA: 09:00 AM - 05:00 PM
Premarket: 08:30 AM - 09:30 AM
AM: 09:30 AM - 12:00 PM
Lunch: 12:00 PM - 01:00 PM
PM: 01:00 PM - 03:00 PM
Last Hour: 03:00 PM - 04:00 PM
// -- ma
      global_ma[0] = StringToDouble(global_PM0600MIN[l]); 
      global_ma[1] = StringToDouble(global_PM0600MAX[l]);
      global_ma[2] = StringToDouble(global_PM0615MIN[l]); 
      global_ma[3] = StringToDouble(global_PM0615MAX[l]);
      global_ma[4] = StringToDouble(global_PM0630MIN[l]); 
      global_ma[5] = StringToDouble(global_PM0630MAX[l]);
      global_ma[6] = StringToDouble(global_PM0645MIN[l]); 
      global_ma[7] = StringToDouble(global_PM0645MAX[l]);
         ......
      global_ma[176] = StringToDouble(global_PM0400MIN[l]); 
      global_ma[177] = StringToDouble(global_PM0400MAX[l]);
      global_ma[178] = StringToDouble(global_PM0415MIN[l]); 
      global_ma[179] = StringToDouble(global_PM0415MAX[l]);
      global_ma[180] = StringToDouble(global_PM0430MIN[l]); 
      global_ma[181] = StringToDouble(global_PM0430MAX[l]);
      global_ma[182] = StringToDouble(global_PM0445MIN[l]); 
      global_ma[183] = StringToDouble(global_PM0445MAX[l]);


void UpdateMacroHighsAndLows(){
   //
   global_ASIAN_HIGH       = findMacroHigh(0, 57, global_ma);        
   global_ASIAN_LOW        = findMacroLow(0, 57, global_ma);
   global_TOKYO_HIGH       = findMacroHigh(12, 21, global_ma);      
   global_TOKYO_LOW        = findMacroLow(12, 21, global_ma);
   
   global_EU_HIGH          = findMacroHigh(56, 121, global_ma);      
   global_EU_LOW           = findMacroLow(56, 121, global_ma);
   global_LO_HIGH          = findMacroHigh(72, 81, global_ma);       
   global_LO_LOW           = findMacroLow(72, 81, global_ma);
   
   global_USA_HIGH         = findMacroHigh(120, 183, global_ma);     
   global_USA_LOW          = findMacroLow(120, 183, global_ma);
   global_Sopen_HIGH       = findMacroHigh(104, 109, global_ma);     
   global_Sopen_LOW        = findMacroLow(104, 109, global_ma);
   global_Premarket_HIGH   = findMacroHigh(114, 125, global_ma);     
   global_Premarket_LOW    = findMacroLow(114, 125, global_ma);
   global_AM_HIGH          = findMacroHigh(124, 145, global_ma);     
   global_AM_LOW           = findMacroLow(124, 145, global_ma);
   
   global_Lunch_HIGH       = findMacroHigh(144, 153, global_ma);     
   global_Lunch_LOW        = findMacroLow(144, 153, global_ma);
   
   global_PM_HIGH          = findMacroHigh(152, 169, global_ma);     
   global_PM_LOW           = findMacroLow(152, 169, global_ma);
   global_LastHour_HIGH    = findMacroHigh(168, 177, global_ma);     
   global_LastHour_LOW     = findMacroLow(168, 177, global_ma);
   
   global_DAY_HIGH         = findMacroHigh(0, 183, global_ma);       
   global_DAY_LOW          = findMacroLow(0, 183, global_ma);
   
}
AM RANGE Profile

When the session opening breaks outside the previous session's range, it leaves only one local question—whether it will be a continuation or a retracement, and where the take profit (TP) levels are.
Assessing the session's opening moment:
//price at the USA session opening - //high and low from 09:30 to 10:00
double AMOPEN_H = findMacroHigh(124, 129, global_ma);
double AMOPEN_L = findMacroLow(124, 129, global_ma);
In cases where the opening is within the previous session, we get a preliminary conclusion that the current session is likely to be range-bound. This leads to the understanding that, one way or another, the session will take out either the previous high or low.
The counters track how often the high, low, or both were taken out, and how often neither was. This gives us the probability shown in the report.

AM TREND Profile

When the session opening breaks outside the previous session's range, it leaves only one local question—whether it will be a continuation or a retracement, and where the take profit (TP) levels are.
Assessing the session's opening moment:
//price at the USA session opening - //high and low from 09:30 to 10:00
double AMOPEN_H = findMacroHigh(124, 129, global_ma);
double AMOPEN_L = findMacroLow(124, 129, global_ma);
In cases where the opening is outside the previous session's range, we get a preliminary conclusion that the current session is prone to a reversal. This also gives the understanding that, one way or another, the session will visit a zone of interest represented by the previous extremes.
Counters track how often each level was taken out, and corresponding probabilities are calculated based on this.

AM SESSION PROFILES
//////-------------- сессионное поведение AM
            if(AMOPEN_H > global_EU_HIGH ){ //уже перехай EU
               AM_EUContinuationLongs++;
               
               if(global_AM_LOW < global_LO_LOW ){
                  AM_LONGS_LO_LOW_Seek++;
               }
               if(global_AM_LOW < global_EU_LOW ){
                  AM_LONGS_EU_LOW_Seek++;
               }
               if(global_AM_LOW < global_TOKYO_LOW ){
                  AM_LONGS_TOKYO_LOW_Seek++;
               }
               if(global_AM_LOW < global_ASIAN_LOW ){
                  AM_LONGS_ASIAN_LOW_Seek++;
               }
               
               if(global_USA_LOW < global_LO_LOW ){
                  USA_LONGS_LO_LOW_Seek++;
               }
               if(global_USA_LOW < global_EU_LOW ){
                  USA_LONGS_EU_LOW_Seek++;
               }
               if(global_USA_LOW < global_TOKYO_LOW ){
                  USA_LONGS_TOKYO_LOW_Seek++;
               }
               if(global_USA_LOW < global_ASIAN_LOW ){
                  USA_LONGS_ASIAN_LOW_Seek++;
               }
               
            }else if(AMOPEN_L < global_EU_LOW ){ //уже перелой 
               AM_EUContinuationShorts++;
               
               if(global_AM_HIGH > global_LO_HIGH ){
                  AM_SHORTS_LO_HIGH_Seek++;
               }
               if(global_AM_HIGH > global_EU_HIGH ){
                  AM_SHORTS_EU_HIGH_Seek++;
               }
               if(global_AM_HIGH > global_TOKYO_HIGH ){
                  AM_SHORTS_TOKYO_HIGH_Seek++;
               }
               if(global_AM_HIGH > global_ASIAN_HIGH ){
                  AM_SHORTS_ASIAN_HIGH_Seek++;
               }
               
               if(global_USA_HIGH > global_LO_HIGH ){
                  USA_SHORTS_LO_HIGH_Seek++;
               }
               if(global_USA_LOW < global_EU_LOW ){
                  USA_SHORTS_EU_HIGH_Seek++;
               }
               if(global_USA_LOW < global_TOKYO_LOW ){
                  USA_SHORTS_TOKYO_HIGH_Seek++;
               }
               if(global_USA_LOW < global_ASIAN_LOW ){
                  USA_SHORTS_ASIAN_HIGH_Seek++;
               }
               
            }else{ //тут цена внутри ренжа
               AM_EURange++;
               // куда придет цена в am
               if(global_AM_HIGH > global_EU_HIGH ){
                  AMEUHighSeek++;
               }
               if( global_AM_LOW < global_EU_LOW ){
                  AMEULowSeek++;
               }
               // как часто снимают обе стороны 
               if(global_AM_HIGH > global_EU_HIGH && global_AM_LOW < global_EU_LOW){
                  AMEUDestroy++; 
               }
               // куда придет цена в USA
               if(global_USA_HIGH > global_EU_HIGH ){
                  USAEUHighSeek++;
               }
               if( global_USA_LOW < global_EU_LOW ){
                  USAEULowSeek++;
               }
               // как часто снимают обе стороны 
               if(global_USA_HIGH > global_EU_HIGH && global_USA_LOW < global_EU_LOW){
                  USAEUDestroy++; 
               }
            }
DAY HIGH


Simple Time Sampling for When the Daily High is Formed, Separated by Sessions
A dedicated counter for each session.
When forming a bias for the day, it is essential to consider the asset's tendency to form key extremes during specific sessions, especially if this tendency resembles a pattern.

DAY HIGH
 // ----- ХАЙ ДНЯ 
 if(global_ASIAN_HIGH==global_DAY_HIGH) asiaDayHigh++; //в азию
 if(global_EU_HIGH==global_DAY_HIGH) euDayHigh++; //в eu
 if(global_LO_HIGH==global_DAY_HIGH) loDayHigh++; //в лондон
 if(global_Sopen_HIGH==global_DAY_HIGH) SopenDayHigh++; //macro 7-00
 if(global_Premarket_HIGH==global_DAY_HIGH) PremarketDayHigh++; //л premarket
 if(global_USA_HIGH==global_DAY_HIGH) usaDayHigh++; // ню
 if(global_AM_HIGH==global_DAY_HIGH) amDayHigh++; // am
 if(global_Lunch_HIGH==global_DAY_HIGH) LunchDayHigh++; // Lunch
 if(global_PM_HIGH==global_DAY_HIGH) PMDayHigh++; // PM
 if(global_LastHour_HIGH==global_DAY_HIGH) LastHourDayHigh++;// LastHour
DAY LOW

Simple Time Sampling for When the Daily Low is Formed, Separated by Sessions
A dedicated counter for each session.
When forming a bias for the day, it is crucial to consider the asset's tendency to form key extremes during specific sessions, especially if this tendency appears to be a pattern.

DAY LOW
 // ----- ЛОЙ ДНЯ 
 if(global_ASIAN_LOW==global_DAY_LOW) asiaDayLow++; //лой дня в азию
 if(global_EU_LOW==global_DAY_LOW) euDayLow++; //лой дня в eu
 if(global_LO_LOW==global_DAY_LOW) loDayLow++; //лой дня в лондон
 if(global_Sopen_LOW==global_DAY_LOW) SopenDayLow++; //лой дня в macro 7-00
 if(global_Premarket_LOW==global_DAY_LOW) PremarketDayLow++; //лой дня в premarket
 if(global_USA_LOW==global_DAY_LOW) usaDayLow++; //лой дня в ню
 if(global_AM_LOW==global_DAY_LOW) amDayLow++; //лой дня в am
 if(global_Lunch_LOW==global_DAY_LOW) LunchDayLow++; //лой дня в Lunch
 if(global_PM_LOW==global_DAY_LOW) PMDayLow++; //лой дня в PM
 if(global_LastHour_LOW==global_DAY_LOW) LastHourDayLow++; //лой дня в LastHo
DAILY PROFILE

Simple counters.
These counters track how often the previous day's highs or lows are taken out and whether or not they are interacted with at all. This helps determine the likelihood of the current session working with the previous day's extremes.

DAY PROFILE
 // ---- DESTROY PD --- PDL+PDH
 if(global_DAY_LOW <= global_PERVIOUS_DAY_LOW && global_DAY_HIGH >= global_PERVIOUS_DAY_HIGH) PerviousDayDestroy++;
// ---- RANGE DAY --- no PDL + no PDH
 if(global_DAY_LOW > global_PERVIOUS_DAY_LOW && global_DAY_HIGH < global_PERVIOUS_DAY_HIGH) PerviousDayRange++;
 // ----- PDL
 if(global_DAY_LOW <= global_PERVIOUS_DAY_LOW) PerviousDayLow++; //общий
 // ----- PDH
 if(global_DAY_HIGH >= global_PERVIOUS_DAY_HIGH) PerviousDayHigh++; //общий
FVG TAP

Probability of Visiting the Nearest Price Imbalance
Separate calculations for D1, H4, and H1 timeframes to assess the chances of reaching these zones and how likely they are in reality. Separate counters are used to calculate the probability of visiting these zones after the release of a news report (re-visit or re-raid will also be counted).


FVG
s=48 - азия не учитывается, логично же
//посещения 1D имба до ньюсов
            for(int s=48; s<afterNews; ++s){ // global_ma[48] = StringToDouble(global_AM1200MIN[l]); 
               if( StringToDouble(global_FVG1DBISIUP[l])    <0 && StringToDouble(global_FVG1DBISIUP[l])     <1  && StringToDouble(global_FVG1DBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <=  StringToDouble(global_FVG1DBISIUP[l]) )    { d1fvg_before_news++; break;    } } // BISI 1D
               if( StringToDouble(global_FVG1DSIBIDOWN[l])  >0 && StringToDouble(global_FVG1DSIBIDOWN[l])   <1 && StringToDouble(global_FVG1DSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG1DSIBIDOWN[l]) )  { d1fvg_before_news ++; break;   } } // SIBI 1D
            }
            // 1D fvg после ньюсов
            for(int s=afterNews; s<ArraySize(global_ma); ++s){
               if( StringToDouble(global_FVG1DBISIUP[l])    <0 && StringToDouble(global_FVG1DBISIUP[l])     <1 && StringToDouble(global_FVG1DBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <= StringToDouble(global_FVG1DBISIUP[l]) )    { d1fvg_after_news++; break;     } } // BISI 1D
               if( StringToDouble(global_FVG1DSIBIDOWN[l])  >0 && StringToDouble(global_FVG1DSIBIDOWN[l])   <1 && StringToDouble(global_FVG1DSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG1DSIBIDOWN[l]) )  { d1fvg_after_news ++; break;    } } // SIBI 1D
            }            
            
             //посещения 4h имба до ньюсов
            for(int s=48; s<afterNews; ++s){ // global_ma[48] = StringToDouble(global_AM1200MIN[l]); 
               if( StringToDouble(global_FVG4HBISIUP[l])    <0 && StringToDouble(global_FVG4HBISIUP[l])     <1 && StringToDouble(global_FVG4HBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <= StringToDouble(global_FVG4HBISIUP[l]) )    { h4fvg_before_news++; break;    } } // BISI 4H
               if( StringToDouble(global_FVG4HSIBIDOWN[l])  >0 && StringToDouble(global_FVG4HSIBIDOWN[l])   <1 && StringToDouble(global_FVG4HSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG4HSIBIDOWN[l]) )  { h4fvg_before_news ++; break;   } } // SIBI 4H
            }
            // 4h fvg после ньюсов
            for(int s=afterNews; s<ArraySize(global_ma); ++s){
               if( StringToDouble(global_FVG4HBISIUP[l])    <0 && StringToDouble(global_FVG4HBISIUP[l])     <1 && StringToDouble(global_FVG4HBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <= StringToDouble(global_FVG4HBISIUP[l]) )    { h4fvg_after_news++; break;     } } // BISI 4H
               if( StringToDouble(global_FVG4HSIBIDOWN[l])  >0 && StringToDouble(global_FVG4HSIBIDOWN[l])   <1 && StringToDouble(global_FVG4HSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG4HSIBIDOWN[l]) )  { h4fvg_after_news ++; break;    } } // SIBI 4H
            }           
            
              //посещения 1h имба до ньюсов
            for(int s=48; s<afterNews; ++s){ // global_ma[48] = StringToDouble(global_AM1200MIN[l]); 
               if( StringToDouble(global_FVG1HBISIUP[l])    <0 && StringToDouble(global_FVG1HBISIUP[l])     <1 && StringToDouble(global_FVG1HBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <= StringToDouble(global_FVG1HBISIUP[l]) )    { h1fvg_before_news++; break;    } } // BISI 1H
               if( StringToDouble(global_FVG1HSIBIDOWN[l])  >0 && StringToDouble(global_FVG1HSIBIDOWN[l])   <1 && StringToDouble(global_FVG1HSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG1HSIBIDOWN[l]) )  { h1fvg_before_news ++; break;   } } // SIBI 1H
            }
             // 1h fvg после ньюсов
            for(int s=afterNews; s<ArraySize(global_ma); ++s){
               if( StringToDouble(global_FVG1HBISIUP[l])    <0 && StringToDouble(global_FVG1HBISIUP[l])     <1 && StringToDouble(global_FVG1HBISIUP[l])     >-1) { if(global_ma[s]!= -1 && global_ma[s] <= StringToDouble(global_FVG1HBISIUP[l]) )    { h1fvg_after_news++; break;     } } // BISI 1H
               if( StringToDouble(global_FVG1HSIBIDOWN[l])  >0 && StringToDouble(global_FVG1HSIBIDOWN[l])   <1 && StringToDouble(global_FVG1HSIBIDOWN[l])   >-1) { if(global_ma[s]!= -1 && global_ma[s] >= StringToDouble(global_FVG1HSIBIDOWN[l]) )  { h1fvg_after_news ++; break;    } } // SIBI 1H
            }
                        
NEWS JUDAS

**Structure Evaluation Before and After News**
For M15, the structure is assessed 30 minutes before the report and 30 minutes after, as well as 120 and 240 minutes after. Additionally, cross-comparisons are made between the structure 30 minutes before and 120 or 240 minutes after. Each comparison is tracked by a separate counter.
For H1, the structure is analyzed 2 and 4 hours before and after the report.
For H4, the structure is assessed only for ±4 hours around the report.

The report takes the maximum probability from all the comparisons for each category: M15, H1, and H4.

JUDAS
  //джудасы м15
            if(global_M15MINUS30MDIR[l] != global_M15PLUS30MDIR[l]) reversal_15m_30 ++;
            if(global_M15MINUS2HDIR[l] != global_M15PLUS2HDIR[l])   reversal_15m_2h ++;
            if(global_M15MINUS4HDIR[l] != global_M15PLUS4HDIR[l])   reversal_15m_4h ++;
               //отложенные джудасы
               if(global_M15MINUS30MDIR[l] != global_M15PLUS2HDIR[l])  reversal_15m_30m2h ++;
               if(global_M15MINUS30MDIR[l] != global_M15PLUS4HDIR[l])  reversal_15m_30m4h ++;
               
            //джудасы h1
            if(global_H1MINUS2HDIR[l] != global_H1PLUS2HDIR[l])   reversal_h1_2h ++;
            if(global_H1MINUS4HDIR[l] != global_H1PLUS4HDIR[l])   reversal_h1_4h ++;
                //отоложенные
               if(global_H1MINUS2HDIR[l] != global_H1PLUS4HDIR[l])  reversal_h1_2h4h ++;
            //джудасы h4
            if(global_H4MINUS4HDIR[l] != global_H4PLUS4HDIR[l])   reversal_h4_4h ++;
            
LO RANGE Profile

When the session opening breaks outside the previous session's range, the only local question remaining is whether it will be a continuation or retracement, and where the take-profit levels (TP) are.
To assess the session's opening moment:
// price at the London opening - // high and low from 01:00 to 01:30
double LOOPEN_H = findMacroHigh(56, 61, global_ma);
double LOOPEN_L = findMacroLow(56, 61, global_ma);
For cases where the opening is within the previous session's range, we get a preliminary conclusion that the current session is likely to be range-bound. This leads to the understanding that, one way or another, the session will take out either the high or the low of the previous session.
Counters track how often the high, low, both, or neither were taken out. This provides the probability reflected in the report.

AM TREND Profile

When the session opening breaks outside the previous session's range, the only local question is whether it will result in a continuation or a retracement, and where the take-profit (TP) levels are.
To assess the session's opening moment:
// price at the London opening - // high and low from 01:00 to 01:30
double LOOPEN_H = findMacroHigh(56, 61, global_ma);
double LOOPEN_L = findMacroLow(56, 61, global_ma);
For cases where the opening is outside the previous session's range, we get a preliminary conclusion that the current session is prone to a reversal. This also implies that, one way or another, the session will visit a zone of interest represented by the previous session's extremes.
Counters track how often the high, low, or both were taken out, providing the corresponding probabilities in the report.

LO SESSION PROFILES
   //////-------------- сессионное поведение LO
            if(LOOPEN_H > global_ASIAN_HIGH ){ //уже перехай азии
               LO_asianContinuationLongs++;
             
               //я уже знаю квантили те максимальные таргеты
               //хочу понять как часто развернет и побреет
               //LO
               if(global_LO_LOW < global_TOKYO_LOW ){
                  LO_LONGS_TOKYO_LOW_Seek++;
               }
               if(global_LO_LOW < global_ASIAN_LOW ){
                  LO_LONGS_ASIAN_LOW_Seek++;
               }
               //EU
               if(global_EU_LOW < global_TOKYO_LOW ){
                  EU_LONGS_TOKYO_LOW_Seek++;
               }
               if(global_EU_LOW < global_ASIAN_LOW ){
                  EU_LONGS_ASIAN_LOW_Seek++;
               }
               
               
            }else if(LOOPEN_L < global_ASIAN_LOW ){ //уже перелой азии           
               LO_asianContinuationShorts++;
               
               //я уже знаю квантили те максимальные таргеты
               //хочу понять как часто развернет и побреет
               //LO
               if(global_LO_HIGH > global_TOKYO_HIGH ){
                  LO_SHORTS_TOKYO_HIGH_Seek++;
               }
               if(global_LO_HIGH > global_ASIAN_HIGH ){
                  LO_SHORTS_ASIAN_HIGH_Seek++;
               }
               //EU
               if(global_EU_HIGH > global_TOKYO_HIGH ){
                  EU_SHORTS_TOKYO_HIGH_Seek++;
               }
               if(global_EU_HIGH > global_ASIAN_HIGH ){
                  EU_SHORTS_ASIAN_HIGH_Seek++;
               }
               
            }else{ //тут цена внутри азиатского ренжа
               LO_asianRange++;
               // куда придет цена в лондон
               if(global_LO_HIGH > global_ASIAN_HIGH ){
                  loAsianHighSeek++;
               }
               if( global_LO_LOW < global_ASIAN_LOW ){
                  loAsianLowSeek++;
               }
               // как часто снимают обе стороны 
               if(global_LO_HIGH > global_ASIAN_HIGH && global_LO_LOW < global_ASIAN_LOW){
                  loAsianDestroy++; 
               }
               // куда придет цена в EU 
               if(global_EU_HIGH > global_ASIAN_HIGH ){
                  euAsianHighSeek++;
               }
               if( global_EU_LOW < global_ASIAN_LOW ){
                  euAsianLowSeek++;
               }
               // как часто снимают обе стороны 
               if(global_EU_HIGH > global_ASIAN_HIGH && global_EU_LOW < global_ASIAN_LOW){
                  euAsianDestroy++; 
               }
            }
SESSIONS BEST MOVE

The maximum distance the price travels during a session—from its high to its low—is calculated.
All distances for a specific type of news and session are collected into a separate array for each session. From the resulting array, the 10th quantile is taken, meaning the top 10% of the sharpest movements are filtered out. This prevents setting overly high expectations, as even 90% of the maximum values is already significant.
Targets for short-term positions should be selected within the range of values provided in the repor

NEWS MOVE

Logic Similar to the "BEST MOVE" Report but with Additional Quantiles (10% and 40%)
In this case, both the 10% and 40% quantiles are considered. Essentially, the value for the 40th quantile covers 60% of all price movements, representing a high-probability zone for the price to visit. The 10th quantile represents a lower probability zone.
The optimal approach is to select a liquidity pool or another area of interest within these ranges. It's important to understand that this refers to the size of the news candle itself, without indicating its direction. Therefore, it's crucial to calculate all potential scenarios and choose the one that best fits the current price action.

BEST MOVES
 // расстояние пройдденное за сессию 
            EU_movement[l]  = (string)MathAbs(global_EU_HIGH-global_EU_LOW);
            LO_movement[l] = (string)MathAbs(global_LO_HIGH-global_LO_LOW);
            USA_movement[l] = (string)MathAbs(global_USA_HIGH-global_USA_LOW);
            AM_movement[l] = (string)MathAbs(global_AM_HIGH-global_AM_LOW);
            PM_movement[l] = (string)MathAbs(global_PM_HIGH-global_PM_LOW); 
              
            NEWS_movement[l] = (string)MathAbs(global_NEWS_HIGH-global_NEWS_LOW);
             q = 0.1; 

        // double EU_deviation = Quantile(EU_Q, 0.10);               
         EU_max_movement = (string)NormalizeTPSL( 
                     NormalizeDouble(100 * StringToDouble(Quantile(EU_movement, q)), 2));  
         LO_max_movement = (string)NormalizeTPSL( 
                     NormalizeDouble(100 * StringToDouble(Quantile(LO_movement, q)), 2)); 
         USA_max_movement = (string)NormalizeTPSL( 
                     NormalizeDouble(100 * StringToDouble(Quantile(USA_movement, q)), 2)); 
         AM_max_movement = (string)NormalizeTPSL( 
                     NormalizeDouble(100 * StringToDouble(Quantile(AM_movement, q)), 2)); 
         PM_max_movement = (string)NormalizeTPSL( 
                     NormalizeDouble(100 * StringToDouble(Quantile(PM_movement, q)), 2));  
         
         NEWS_90_max_movement = (string)NormalizeTPSL( 
                    NormalizeDouble(100 * StringToDouble(Quantile(NEWS_movement, q)), 2)); 
         
         q = 0.4;
         NEWS_60_max_movement = (string)NormalizeTPSL( 
                    NormalizeDouble(100 * StringToDouble(Quantile(NEWS_movement, q)), 2)); 

......


// Функция для нахождения квантили
string Quantile(string &array[], double percentile)
{
  // Копируем массив для сортировки и берем модули всех значений
  double sorted_array[];
  int x =0;
  if(ArraySize(array) == 0) { Print(__FUNCTION__, " emty arr "); return "-1"; }
  for (int i = 0; i < ArraySize(array); i++)
  {
      if(StringToDouble(array[i])>-1) {
         x = ArraySize(sorted_array)+1;
         ArrayResize(sorted_array, x);
        
         sorted_array[ x-1] = MathAbs(StringToDouble(array[i]));
      }
  }
  if(ArraySize(sorted_array) < 1){
   ArrayPrint(array);
  }
  // Сортируем массив
  ArraySort(sorted_array);
  
  int index = (int)MathCeil( (1-percentile) * ArraySize(sorted_array)) - 1;

  // Возвращаем значение квантиля
  return (string)sorted_array[index];
}
NEWS INFO


Report Describing the Upcoming News Event (For General Awareness)

PDH TAP PROFILE

Shows which sessions break out beyond the PDH (Previous Day High).
Helps to understand whether a prolonged reversal is likely after taking out this liquidity pool.
Each session’s visit beyond the PDH is counted separately.
The probability figures should be considered individually for each session, not as part of a cumulative 100%.
The shifts between morning and evening figures can be interpreted as a general tendency towards trending price action with shallow retracements during the day, whereas a gradual increase in figures from morning to evening sessions signals a strong trend with little to no retracement within it.

PDL TAP PROFILE

Shows which sessions break out beyond the PDL (Previous Day Low).
Helps to understand whether a prolonged reversal is likely after taking out this liquidity pool.
Each session’s visit beyond the PDL is counted separately.
The probability figures should be considered individually for each session, not as part of a cumulative 100%.
The shifts between morning and evening figures can be interpreted as a general tendency towards trending price action with shallow retracements during the day, whereas a gradual increase in figures from morning to evening sessions signals a strong trend with little to no retracement within it.

PDH-PDL SESSIONS PROFILE
 // -----  PDL
if(global_ASIAN_LOW     <    global_PERVIOUS_DAY_LOW) asiaPerviousDayLow++; //аз
 if(global_EU_LOW        <   global_PERVIOUS_DAY_LOW) euPerviousDayLow++;//в eu
if(global_LO_LOW        <    global_PERVIOUS_DAY_LOW) loPerviousDayLow++; // в лондон
if(global_Sopen_LOW     <   global_PERVIOUS_DAY_LOW) SopenPerviousDayLow++; //в 7-30
if(global_Premarket_LOW <    global_PERVIOUS_DAY_LOW) PremarketPerviousDayLow++; //premarket     
 if(global_USA_LOW       <  global_PERVIOUS_DAY_LOW) usaPerviousDayLow++;   //в ню
 if(global_AM_LOW        <   global_PERVIOUS_DAY_LOW) amPerviousDayLow++;  //в am
if(global_Lunch_LOW     < global_PERVIOUS_DAY_LOW) LunchPerviousDayLow++;   //в Lunch
 if(global_PM_LOW        <   global_PERVIOUS_DAY_LOW) PMPerviousDayLow++; //в PM
 if(global_LastHour_LOW  <  global_PERVIOUS_DAY_LOW) LastHourPerviousDayLow++;  //в LastHour
            // -----  PDH
 if(global_ASIAN_HIGH     >    global_PERVIOUS_DAY_HIGH) asiaPerviousDayHigh++;   //в азию
if(global_EU_HIGH          >    global_PERVIOUS_DAY_HIGH) euPerviousDayHigh++;     //в eu
if(global_LO_HIGH          >    global_PERVIOUS_DAY_HIGH) loPerviousDayHigh++;     // в лондон
if(global_Sopen_HIGH       >    global_PERVIOUS_DAY_HIGH) SopenPerviousDayHigh++;  //в  7-30
if(global_Premarket_HIGH   >    global_PERVIOUS_DAY_HIGH) PremarketPerviousDayHigh++; //premark
if(global_USA_HIGH         >    global_PERVIOUS_DAY_HIGH) usaPerviousDayHigh++;    //в ню
if(global_AM_HIGH          >    global_PERVIOUS_DAY_HIGH) amPerviousDayHigh++;     //в am
 if(global_Lunch_HIGH       >    global_PERVIOUS_DAY_HIGH) LunchPerviousDayHigh++;  //в Lunch
if(global_PM_HIGH          >    global_PERVIOUS_DAY_HIGH) PMPerviousDayHigh++;     //в PM
if(global_LastHour_HIGH    >    global_PERVIOUS_DAY_HIGH) LastHourPerviousDayHigh++;  //в LastHou
SESSION QUANTILES

Quantiles of session deviations show how far from NYM (New York Midnight) a session tends to go at any given moment. Similar to the news quantile, 0.1 and 0.4 quantiles are calculated, and the resulting values can be interpreted as high-probability areas on the chart relative to NYM where a session extremum is likely to form. In these areas, during counter-trend movements, intermediate profit-taking of counter-trend positions should be considered, and entry points for trend-following positions should be sought.


SESSION QUANTILES
q = 0.1; 
         updateGlobalQuantiles(q);

         QASIA_90 = (string)NormalizeTPSL( 
                  NormalizeDouble(100 * StringToDouble(Quantile(global_QASIA, q)), 2)); 
         QTOKYO_90 = (string)NormalizeTPSL(
                  NormalizeDouble(100 * StringToDouble(Quantile(global_QTOKYO, q)), 2));
         QEU_90 = (string)NormalizeTPSL(
                  NormalizeDouble(100 * StringToDouble(Quantile(global_QEU, q)), 2));
         QLO_90 = (string)NormalizeTPSL(
                  NormalizeDouble(100 * StringToDouble(Quantile(global_QLO, q)), 2));
         QSO_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QSOPEN, q)), 2));
         QPREMARKET_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QPREMARKET, q)), 2));
         QUSA_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QUSA, q)), 2));
         QAM_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QAM, q)), 2));
         QLUNCH_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QLUNCH, q)), 2));
         QPM_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QPM, q)), 2));
         QLASTHOUR_90 = (string)NormalizeTPSL(
                 NormalizeDouble(100 * StringToDouble(Quantile(global_QLASTHOUR, q)), 2));
         
         q = 0.4;
         updateGlobalQuantiles(q); 
         
         QASIA_60 = (string)NormalizeTPSL( 
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QASIA, q)), 2)); 
         QTOKYO_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QTOKYO, q)), 2));
         QEU_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QEU, q)), 2));
         QLO_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QLO, q)), 2));
         QSO_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QSOPEN, q)), 2));
         QPREMARKET_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QPREMARKET,q)), 2));
         QUSA_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QUSA, q)), 2));
         QAM_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QAM, q)), 2));
         QLUNCH_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QLUNCH, q)), 2));
         QPM_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QPM, q)), 2));
         QLASTHOUR_60 = (string)NormalizeTPSL(
                   NormalizeDouble(100 * StringToDouble(Quantile(global_QLASTHOUR, q)), 2));
+24H STRUCTURE

To understand what typically happens the day after a news event, the HH-HL-LH-LL structure is evaluated 24 hours (+24 hours) after the report, relative to its release time. When it’s assumed that increased news-related volatility will form a long-term Judas or a range, an opposite move to the news-driven direction is expected the following day. The +24H STRUCTURE report helps determine the real probability of such an outcome.
A simple structural reversal counter is used for the calculation.

24H STRUCTURE
  //дирекшоны
            if(global_PD1DDIR[l] != global_ND1DDIR[l]) reversal_1D ++;
            if(global_PD4HDIR[l] != global_ND4HDIR[l]) reversal_4H ++;
            if(global_PD1HDIR[l] != global_ND1HDIR[l]) reversal_1H ++;
WEEK HIGH

Simple Time Sampling for the Day the Weekly High Was Formed
A dedicated counter for each day of the week.
When forming a bias for the week, it's essential to consider the asset's tendency to form key extremes on specific days, especially if this tendency appears to be a pattern.

WEEK LOW

Simple Time Sampling for the Day the Weekly Low Was Formed
A dedicated counter for each day of the week.
When forming a bias for the week, it is important to consider the asset's tendency to form key extremes on specific days, especially if this tendency resembles a pattern.

WEEK HIGH - LOW
 // ------- хай недели
            if( FindWeekHigh(IDs[l])  == "Monday") WeekHigh_Monday++;
            if( FindWeekHigh(IDs[l])  == "Tuesday") WeekHigh_Tuesday++;
            if( FindWeekHigh(IDs[l])  == "Wednesday") WeekHigh_Wednesday++;
            if( FindWeekHigh(IDs[l])  == "Thursday") WeekHigh_Thursday++;
            if( FindWeekHigh(IDs[l])  == "Friday") WeekHigh_Friday++;
            // ------- лой недели
            if( FindWeekLow(IDs[l])  == "Monday") WeekLow_Monday++;
            if( FindWeekLow(IDs[l])  == "Tuesday") WeekLow_Tuesday++;
            if( FindWeekLow(IDs[l])  == "Wednesday") WeekLow_Wednesday++;
            if( FindWeekLow(IDs[l])  == "Thursday") WeekLow_Thursday++;
            if( FindWeekLow(IDs[l])  == "Friday") WeekLow_Friday++;

The data provided by the BIASMACHINE service is for informational purposes only and does not constitute investment and/or financial advice. The data and figures provided by the service do not guarantee profits in the future or the present.