Breakout Scanner V2

15m 30m 1H 4H 1D

Top KuCoin USDT Pairs Loaded: 100

/* ===================================== Part 2 EMA + RSI + Average Volume ===================================== */ function ema($candles,$period){ if(count($candles)<$period){ return 0; } $k=2/($period+1); $ema=$candles[0]['close']; foreach($candles as $c){ $ema=($c['close']*$k)+($ema*(1-$k)); } return round($ema,8); } function rsi($candles,$period=14){ if(count($candles)<($period+1)){ return 50; } $gain=0; $loss=0; for($i=count($candles)-$period;$i0){ $gain+=$change; }elseif($change<0){ $loss+=abs($change); } } if($loss==0){ return 100; } $rs=($gain/$period)/($loss/$period); return round(100-(100/(1+$rs)),2); } function averageVolume($candles,$period=20){ if(count($candles)<=$period){ return 0; } $sum=0; for($i=count($candles)-$period;$i0){ $volumeRatio=$last['volume']/$avgVol; } $market[$symbol]=[ 'candles'=>$candles, 'price'=>$last['close'], 'ema20'=>ema($candles,20), 'ema50'=>ema($candles,50), 'rsi'=>rsi($candles), 'volume_ratio'=>round($volumeRatio,2) ]; } echo "

Pairs Analysed: ".count($market)."

"; /* ===================================== Part 3 Support / Resistance + Breakout Engine ===================================== */ function supportResistance($candles){ $highs=[]; $lows=[]; for($i=10;$i$candles[$i]['high']){ $high=false; } if($candles[$j]['low']<$candles[$i]['low']){ $low=false; } } if($high){ $highs[]=$candles[$i]['high']; } if($low){ $lows[]=$candles[$i]['low']; } } if(empty($highs) || empty($lows)){ return false; } rsort($highs); sort($lows); return [ 'resistance'=>$highs[0], 'support'=>$lows[0] ]; } $signals=[]; foreach($market as $symbol=>$data){ $candles=$data['candles']; $sr=supportResistance($candles); if(!$sr){ continue; } $last=end($candles); $signal="WAIT"; $score=0; if( $last['close']>$sr['resistance'] && $data['ema20']>$data['ema50'] && $data['volume_ratio']>=1.5 && $data['rsi']>=55 && $data['rsi']<=75 ){ $signal="BREAKOUT"; $score=80; } if( $last['close']<$sr['support'] && $data['ema20']<$data['ema50'] && $data['volume_ratio']>=1.5 && $data['rsi']<=45 ){ $signal="BREAKDOWN"; $score=80; } if($signal=="WAIT"){ continue; } $signals[]=[ 'coin'=>$symbol, 'signal'=>$signal, 'score'=>$score, 'price'=>$last['close'], 'support'=>$sr['support'], 'resistance'=>$sr['resistance'], 'ema20'=>$data['ema20'], 'ema50'=>$data['ema50'], 'rsi'=>$data['rsi'], 'volume'=>$data['volume_ratio'] ]; } usort($signals,function($a,$b){ return $b['score'] <=> $a['score']; }); echo "

Signals Found: ".count($signals)."

"; /* ===================================== Part 4 Dashboard ===================================== */ echo "
"; echo "

Breakout Scanner Results

"; echo ""; echo ""; $rank=1; foreach($signals as $row){ $color=$row['signal']=="BREAKOUT" ? "#00d26a" : "#ff4444"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
Rank Coin Signal Score RSI Volume Support Resistance Price
".$rank++."".$row['coin']."".$row['signal']."".$row['score']."%".$row['rsi']."".$row['volume']."x".$row['support']."".$row['resistance']."".$row['price']."
"; echo "
"; echo "

Total KuCoin Pairs: ".count($symbols)."

"; echo "

Pairs Analysed: ".count($market)."

"; echo "

Signals Found: ".count($signals)."

"; echo "

Updated: ".gmdate("Y-m-d H:i:s")." UTC

"; ?>