AIGC

AI GEMINI COLLEGE

Trading Algorithm v2.4

Methodology Overview

DEEP CONFLUENCE

Why use one indicator when you can engineer a stack? The algorithm combines EMA (Trend), VWAP (Value), and MACD (Momentum) to eliminate market noise and capture high-probability entries.

EMA

Structural Integrity

VWAP

Institutional Value

MACD

Momentum Velocity

The Compass

Variable: $ema / $p_ema

The 50-period Exponential Moving Average acts as our primary directional filter. We don't guess the trend; we calculate its slope.

$trendUp = $ema > $p_ema;

By comparing current EMA to its previous state, the algorithm confirms structural strength. If the slope is negative, all long signals are discarded.

Past
Present

Slope: Positive (Trend Up)

Institutional Value

Variable: $vwap

VWAP represents the true "Fair Value" of an asset weighted by volume. The algorithm uses this to ensure we aren't buying extended prices.

$aboveValue = $price > $vwap;
Status Logic Check
Above VWAP ✓ Institutional Support
Below VWAP ✗ Distribution Zone

The Gatekeeper

Variable: $macd_f / $macd_s

Trend and Value define the environment; MACD defines the Timing. By tracking the Fast (12) and Slow (26) lines, we identify the exact moment momentum shifts in our favor.

Code Logic

$macdBullish = $macd_f > $macd_s;

Trade Status

MOMENTUM GO

75 — OVERBOUGHT (SELL)
NEUTRAL ZONE
25 — OVERSOLD (BUY)

The Exhaustion Metric

Variable: $rsi

"The algorithm's safety valve."

elseif ($rsi > 75) { return 'SELL'; }
elseif ($rsi < 25) { return 'BUY'; }

Regardless of other signals, extreme RSI overrides suggest a reversal is imminent. This protects capital from chasing overextended moves.

Stackable Confirmation (BUY)

1

price > ema // Holding above structure

2

trendUp // EMA is ascending

3

low <= (ema * 1.002) // Valid Pullback detected

4

macdBullish // Positive Momentum Crossover

5

aboveValue // Institutional Price Support

CONFLUENCE ACHIEVED: BUY SIGNAL

High Probability Result

Visualizing the logic execution

RESULT: BUY

Entry Trigger

Deep Confluence

EMA+MACD+VWAP Aligned

🛡️

Risk Management

An algorithm is only as good as its protection. Deep Confluence requires strict position sizing. Never risk more than 1-2% of total equity on any single confluence trigger.

  • Stop Loss anchored below EMA 50 structure.
  • Trailing Stop activated once 1:1 RR is met.
  • Hard Exit on RSI extreme overbought (>75).

Patience in Confluence

"The algorithm returns HOLD for a reason."

Wait for the boxes to check. Chasing half-signals results in equity drawdown. True wealth is built on the entries where all five pillars align perfectly.

Continuous Optimization

The market is a dynamic engine; your variables must evolve.

Backtest Rigor

Simulate confluence logic over 5 years of historical data to verify alpha stability.

Execution Speed

Optimize PHP runtime for zero-latency execution on high-frequency candle closures.

Institutional Grade Output Ready

Slide 1 / 10