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;