//+------------------------------------------------------------------+ //| RepaintProbe.mq5 | //| Copyright 2026, Allan Niñal | //| https://www.allanninal.dev/mql5 | //+------------------------------------------------------------------+ //| Test tool for the Strategy Tester (never trades). On every new | //| bar it records the indicator's buffers on the bar that just | //| closed, as they were at that moment. At the end it reads the | //| same bars again and counts every value that changed afterwards | //| (= repainting). It also counts signals that were ever shown on | //| the live bar. Writes Common\Files\repaint_.csv | //+------------------------------------------------------------------+ // SPDX-License-Identifier: LicenseRef-PolyForm-Noncommercial-1.0.0 (see LICENSE) #property copyright "Copyright 2026, Allan Niñal " #property version "1.00" #include input string InpIndicator = "SuperTrendSignalAlerts\\SuperTrendSignalAlerts"; // indicator path under MQL5\Indicators input string InpParams = ""; // parameters (empty = defaults) input string InpBuffers = "2,3"; // buffers to check (signal arrows) input string InpLiveBufs = "2,3"; // buffers that must stay empty on the live bar input string InpTag = "probe"; // file name suffix int g_ind=INVALID_HANDLE; int g_bufs[],g_live[]; datetime g_last=0; datetime g_t[]; double g_v[]; // [bar*nb + j] long g_live_hits=0,g_ticks=0; int OnInit() { ParseInts(InpBuffers,g_bufs); ParseInts(InpLiveBufs,g_live); g_ind=MakeHandle(_Symbol,_Period,InpIndicator,InpParams); return(g_ind==INVALID_HANDLE ? INIT_FAILED : INIT_SUCCEEDED); } void OnTick() { g_ticks++; double x[]; for(int j=0; j