PROTECTED SOURCE SCRIPT

ECG Sanbot Indicator

54
Not my best but my first strategy to pass prop firms. Strength based signals. Change the length and repainting settings before setting alerts up.

First strategy to pass my prop firm. Change the tf and length to see reliable signals. Option to remove repainting if you want to set alerts. Not the best compared to my other scripts but will always get you in the green.

Core Logic

Calculates a double-smoothed EMA source on a higher timeframe (tf input).

Builds two RSI streams:

Repainting RSI (lookahead on) → reacts quickly to market changes.

Non-repainting RSI (lookahead off) → provides stable, confirmed values.

Computes the ECG difference between the two RSI streams.

Generates a buy signal when the ECG difference crosses above the upper threshold.

Generates a sell signal when the ECG difference crosses below the lower threshold.

Risk Management

Each trade uses a fixed trade size (trade_size).

Built-in stop-loss and take-profit controls:

Stop Loss: default 0.1% from entry price.

Take Profit: default 0.2% from entry price.

Both long and short entries are supported (direction selectable).

Customization Options

Adjustable timeframe (tf) for RSI source.

Fully configurable thresholds, lengths, and EMA smoothing.

Toggle between repainting vs. non-repainting behavior.

Backtest period controls (start and end date).

Visualization

Plots the ECG difference line in red.

Displays horizontal threshold lines for signal reference.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.