Experts: EA KCI Embeded Sniper

 

EA KCI Embeded Sniper:

The KCI Embedded Sniper is an algorithmic trading solution designed for high-precision reversal entries. Unlike conventional Expert Advisors that rely on external indicator dependencies (which often suffer from thread desynchronization and latency), this EA features a fully embedded Kinetic Compression Index (KCI) engine. By transplanting the entire mathematical framework of the KCI—calculating Velocity Quotients, Kinetic Displacement, Energy Dispersion, and Phase Velocity—directly into the EA’s core logic, we have eliminated "asynchronous lag." The result is a lightning-fast sniper engine that validates market exhaustion (Singularity) and momentum extremes (Williams %R) with micro-second precision, operating solely on completed bars to ensure zero-repaint performance.

EA KCI Embeded Sniper

Author: Syamsurizal Dimjati

 

Syamsurizal Dimjati: "Attach it to your preferred currency pair, and the "Sniper" will begin scanning for market exhaustion points immediately."


It would be more helpful to traders if you disclose the currency pair on which you ran your posted backtest. Most retail currency pairs today are in either 3 or 5 digit pricing format, and I see that you tested on a 1 digit price format─and your chart symbol is blacked out.

On a related, posting your full backtest statistics (without cropping them) might instill more confidence in your EA.

 
Ryan L Johnson #:

Syamsurizal Dimjati: "Attach it to your preferred currency pair, and the "Sniper" will begin scanning for market exhaustion points immediately."


It would be more helpful to traders if you disclose the currency pair on which you ran your posted backtest. Most retail currency pairs today are in either 3 or 5 digit pricing format, and I see that you tested on a 1 digit price format─and your chart symbol is blacked out.

On a related, posting your full backtest statistics (without cropping them) might instill more confidence in your EA.

Yes, I missed to attach the details, here are the results of the EA BeckTest on XAUUSD RAW 3 digits after the decimal point, without changing the parameters, Good luck trying and exploring.

XAUUSD 3 Digit


Result Detail :

Result
 
Thanks For posting , nice clean and clear code example , much appreciated
 
linfo2 #:
Thanks For posting , nice clean and clear code example , much appreciated
you're welcome
 
Hi thanks for your code you shared. I did some analysis and found some critical bugs>

1. Trend Filter Logic is Fatal — Both branches cause return

if(SymbolInfoDouble(_Symbol, SYMBOL_BID) < trend_ma) return; // blocks BUY
if(SymbolInfoDouble(_Symbol, SYMBOL_BID) > trend_ma) return; // blocks SELL
Whichever side the price is on, one of these always fires and the EA never trades. You must split the filter per direction:

int trend_dir = 0; // -1 = down, +1 = up, 0 = flat
if(InpUseTrendFilter)
{
if(CopyBuffer(handle_trend, 0, 1, 1, buf_trend) <= 0) return;
double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
if(bid > buf_trend[0]) trend_dir = +1;
else if(bid < buf_trend[0]) trend_dir = -1;
}
else trend_dir = 0; // disabled → allow both

Then in the execution block:

bool allow_buy = (trend_dir >= 0); // up or off
bool allow_sell = (trend_dir <= 0); // down or off
if(kci_signal == 1 && buf_wpr[0] <= InpWPRBuyLevel && allow_buy) { ... }
if(kci_signal == -1 && buf_wpr[0] >= InpWPRSellLevel && allow_sell) { ... }

2. Trailing-Stop Math is Wrong

For BUY you compare sl < price - (Start+Step)*_Point but then set SL to price - Start*_Point — so the SL keeps moving up by every tick of price increase, ignoring Step . Replace with a strict step guard:

double new_sl = price - InpTrailingStart * _Point;
if(sl == 0 || new_sl - sl >= InpTrailingStep * _Point)
trade.PositionModify(ticket, NormalizeDouble(new_sl, _Digits), tp);

Same fix mirrored for SELL. Also add a breakeven floor so trailing never moves SL below open price.

3. PositionsTotal() > 0 Blocks Trades From Other EAs

Replace with a magic+symbol-scoped counter:

int CountMyPositions()
{
int n = 0;
for(int i = PositionsTotal() - 1; i >= 0; i--)
{
ulong t = PositionGetTicket(i);
if(PositionSelectByTicket(t)
&& PositionGetString(POSITION_SYMBOL) == _Symbol
&& PositionGetInteger(POSITION_MAGIC) == InpMagicNumber) n++;
}
return n;
}

Also add InpMaxOpenPositions input (default 1).

 
teapeak #:
Hi thanks for your code you shared. I did some analysis and found some critical bugs>

1. Trend Filter Logic is Fatal — Both branches cause return

Whichever side the price is on, one of these always fires and the EA never trades. You must split the filter per direction:

Then in the execution block:

2. Trailing-Stop Math is Wrong

For BUY you compare sl < price - (Start+Step)*_Point but then set SL to price - Start*_Point — so the SL keeps moving up by every tick of price increase, ignoring Step . Replace with a strict step guard:

Same fix mirrored for SELL. Also add a breakeven floor so trailing never moves SL below open price.

3. PositionsTotal() > 0 Blocks Trades From Other EAs

Replace with a magic+symbol-scoped counter:

Also add InpMaxOpenPositions input (default 1).

it brings forward development, of course you can improve it, other code with embedded KCI is at : https://www.mql5.com/en/code/74840
EA KCI N-Matrix engine
EA KCI N-Matrix engine
  • 2026.07.10
  • www.mql5.com
The Apex of Algorithmic Grid & Kinetic Momentum. Welcome to the KCI Native Matrix Engine—a merciless, mathematically driven algorithmic behemoth built natively for MetaTrader 5. Engineered for High-Frequency Trading (HFT) environments, this EA strips away bloated standard libraries and operates directly at the server routing level.
 
woooow