OPEN-SOURCE SCRIPT

The Quantum Leap: Renko + ML

79
(Note: This indicator uses the BackQuant & SuperTrend which takes a 4-5 seconds to load)

This strategy uses the following indicators (please see source code)

  • Synthetic Renko: Ignores time and focuses purely on price movement to detect clear trend reversals (Red-to-Green).
  • ATR (Average True Range): Measures volatility to calculate the Renko brick sizes and SuperTrend sensitivity.
  • Adaptive SuperTrend: A trend filter that uses volatility clustering to confirm if the market is currently in a "Bearish" state.
  • RSI (Relative Strength Index): A momentum gauge ensuring the asset is "Oversold" (exhausted) before we consider a setup.
  • Monthly Pivots: Horizontal support lines based on last month's data acting as price "floors" (S1, S2, S3).
  • SMA (Simple Moving Average): A 100-bar average ensuring we are strictly buying below the long-term mean (deep value).
  • BackQuant (KNN): A Machine Learning engine that compares current data to historical patterns to predict immediate momentum.


This is a sophisticated, multi-stage strategy script. It combines "Old School" price action (Renko) with "New School" Machine Learning (KNN and Clustering).

Here is the high-level summary of how we will break this down:

Topic 1: The "Bottom Hunter" Setup. How the script uses Renko bricks and aggressive filtering (SuperTrend, SMA, RSI, Pivots) to find a potential market bottom.

Topic 2: The ML Engine (BackQuant & SuperTrend). How the script uses K-Nearest Neighbors (KNN) to predict momentum and Volatility Clustering to adjust the SuperTrend.

Topic 3: The "Leap" Execution. How the script synchronizes the Setup (Topic 1) with the ML Trigger (Topic 2) using a time window.

Topic 1: The "Bottom Hunter" Setup
This script is designed as a Mean Reversion strategy (often called "catching a falling knife" or "bottom fishing"). It is trying to find the exact moment a downtrend stops and reverses.

Most strategies buy when price is above the 200 SMA or above the SuperTrend. This script does the exact opposite.

The Logic:

Renko Bricks: It simulates Renko bricks internally (without changing your chart view). It waits for a specific pattern: A Red Brick followed immediately by a Green Brick (a reversal).

The "Bearish" Filters: To generate a "WATCH" signal, the following must be true:

Price < SuperTrend: The market must officially be in a downtrend.

Price < SMA: Long-term trend is down.

Price < Monthly Pivot: Price is deeply discounted.

RSI < Threshold: The asset is oversold (exhausted).

Recommended Settings for daily signals for Stocks :

Confirmation : 10. (How many bars after Renko Buy signal the AI has to identify a bullish move).

Percentage : 2 (This is the Renko bar size. This represents 2% move.)

SMA: 100 (Signal must be found below 100 SMA)

Price must be below: PIVOT (This is the monthly Pivot levels)


ảnh chụp nhanh

ảnh chụp nhanh

ảnh chụp nhanh

ảnh chụp nhanh

ảnh chụp nhanh

ảnh chụp nhanh

ảnh chụp nhanh



Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.