Strategy · Pine Script v5 · On the chart

Lyzer Core Runtime Proxy

by Ciamarro1

A strategy that scores long and short setups from a three-EMA trend alignment, an RSI position above or below 50 and a volume spike above its 20-bar average.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code98
Settings2inputs
LicenceMIT
Last update7 weeks ago5 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

98 lines of Pine Script v5 from lyzer edge/lyzer_proxy.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

lyzer_proxy.pine
//@version=5
strategy("Lyzer Core v0.4 — Runtime Proxy", overlay=true,
     initial_capital=10000,
     default_qty_type=strategy.percent_of_equity,
     default_qty_value=25)

// ======================================================
// 🧠 CONFIG (RuntimeConfig equivalente)
// ======================================================

confidenceThreshold = input.float(50, "Confidence Threshold", minval=45, maxval=85)
riskReward = input.float(2.0, "Risk:Reward (fixed)", minval=1.0, step=0.5)

// ======================================================
// 📡 SIGNAL ENGINE (proxy simplificado do teu sistema)
// ======================================================

// Trend proxy (EMA regime)
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)

// Volume filter (simple impulse detection)
volSpike = volume > ta.sma(volume, 20)

// Momentum proxy
rsi = ta.rsi(close, 14)

// ======================================================
// 🧠 KERNEL (Lyzer simplified confidence model)
// ======================================================

// regime direction
trendUp = ema20 > ema50 and ema50 > ema100
trendDown = ema20 < ema50 and ema50 < ema100

// confidence synthesis (0–100 proxy)
confidenceLong =
     (trendUp ? 60 : 30) +
     (rsi > 50 ? 15 : 0) +
     (volSpike ? 10 : 0)

confidenceShort =
     (trendDown ? 60 : 30) +
     (rsi < 50 ? 15 : 0) +
     (volSpike ? 10 : 0)

// ======================================================
// 🚦 KERNEL DECISION (Lyzer Core logic)
// ======================================================

longSignal  = confidenceLong >= confidenceThreshold
shortSignal = confidenceShort >= confidenceThreshold

// ======================================================
// 💰 EXECUTION LAYER (fixed R:R 2:1)
// ======================================================

riskPct = 1.0  // fixed risk proxy (simplified)

// ATR for dynamic stop sizing
atr = ta.atr(14)

// Long execution
if (longSignal)
    longStop = close - atr
    longTP   = close + (atr * riskReward)

    strategy.entry("LONG", strategy.long)
    strategy.exit("LONG TP/SL", "LONG",
         stop=longStop,
         limit=longTP)

// Short execution
if (shortSignal)
    shortStop = close + atr
    shortTP   = close - (atr * riskReward)

    strategy.entry("SHORT", strategy.short)
    strategy.exit("SHORT TP/SL", "SHORT",
         stop=shortStop,
         limit=shortTP)

// ======================================================
// 📊 VISUALIZATION (debug only)
// ======================================================

plot(ema20, color=color.orange)
plot(ema50, color=color.blue)
plot(ema100, color=color.gray)

bgcolor(longSignal ? color.new(color.green, 90) :
       shortSignal ? color.new(color.red, 90) : na)

// Confidence debug
plot(confidenceLong, title="Long Confidence", color=color.green)
plot(confidenceShort, title="Short Confidence", color=color.red)
hline(confidenceThreshold, "Threshold", color=color.white)

Overview

A trade opens when the score reaches a confidence threshold input. Each entry has an ATR-based stop and a take profit at a risk to reward multiple, with position size as a percent of equity. It plots the EMAs and both scores for debugging.

Details

Published by

Ciamarro1 on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Oscillators & momentum

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Confidence Thresholdfloat50confidenceThreshold
Risk:Reward (fixed)float2.0riskReward
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

330 stars

2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the

Strategy v4 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of 2 EMA/SMA + RSI Strategy [Alorse]

Acrypto - Weighted Strategy

by AlbertoCuadra
318 stars

This strategy plots on the price chart and opens long or short positions when a weighted score from MACD, Stochastic RSI, RSI, Supertrend and a moving-average crossover exceeds a user-set trigger. Each component has its own weight and candle delay. Entries can

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · Custom licence GitHub repository of Acrypto - Weighted Strategy
285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy
218 stars

This strategy generates trading signals based on a selectable momentum engine, supporting MACD, RSI, Stochastic, or Rate of Change. Entries trigger on signal crosses, zero-line crosses, or threshold crosses, with an optional moving average trend filter. Risk m

Strategy v6 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of Momentum Strategy Template

255 EMA Strategy

by hasnocool
106 stars

255 EMA Strategy combines an exponential moving average with Average True Range bands and standard MACD crossovers to generate entry signals. Drawn directly on the price chart, it plots the central 255 EMA along with upper and lower volatility envelopes. Trade

Strategy v4 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 255 EMA Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers