From 0135d122d98fa2b82593c448ad4d50ccf2afea19 Mon Sep 17 00:00:00 2001 From: pietro_giacobazzi Date: Tue, 16 Jun 2026 10:16:47 +0200 Subject: [PATCH] PaPP v2: flag escursione resettano solo a mediana, non bordo banda --- PaPP v2/PaPP_Median_EA.mq5 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PaPP v2/PaPP_Median_EA.mq5 b/PaPP v2/PaPP_Median_EA.mq5 index 647228e..de97f7c 100644 --- a/PaPP v2/PaPP_Median_EA.mq5 +++ b/PaPP v2/PaPP_Median_EA.mq5 @@ -182,8 +182,9 @@ void OnTick() int nBuy = CountPos(POSITION_TYPE_BUY); int nSell = CountPos(POSITION_TYPE_SELL); - //--- Reset escursion flags quando price rientra nel cluster - if(bid>=buyBand && bid<=sellBand) { buyFired=false; sellFired=false; } + //--- Reset escursion flags solo quando price torna alla mediana + if(bid>=median) buyFired=false; + if(bid<=median) sellFired=false; //--- MA alignment: se tutte monotone = trend, blocca mean reversion bool trendUp=true, trendDown=true;