OPEN-SOURCE SCRIPT
OAT Minervini PRO v5 - Dynamic VCP Pivot

# OAT Minervini PRO v5 — Dynamic VCP Pivot
**Developed by Dr.Kor Endo**
Inspired by the trading principles and concepts presented in *Think and Trade Like a Champion* by Mark Minervini.
## Overview
OAT Minervini PRO v5 is a comprehensive trend, relative strength, and VCP setup analysis tool designed to help traders identify high-quality Stage 2 stocks and evaluate whether they are approaching a potentially actionable breakout setup.
The script combines three major components:
1. **Minervini Trend Template**
2. **Relative Strength Analysis**
3. **Volatility Contraction Pattern (VCP) and Dynamic Pivot Detection**
The goal of this indicator is not to generate automatic buy signals, but to help traders systematically filter, rank, and monitor stocks that may have the characteristics of potential market leaders.
## 1. Minervini Trend Template
The indicator evaluates eight trend conditions using EMA-based calculations:
* Price above EMA 150 and EMA 200
* EMA 150 above EMA 200
* EMA 200 trending upward
* EMA 50 above EMA 150 and EMA 200
* Price at least 25% above the 52-week low
* Price within 25% of the 52-week high
* Positive Relative Strength characteristics
* Price above EMA 50
The dashboard provides a **Trend Score from 0 to 8**.
A score of **8/8** indicates that the stock has passed all trend-template conditions defined by this script.
## 2. Relative Strength Analysis
Relative Strength is calculated by comparing the current stock with a user-selected market benchmark.
For example:
**Stock Price / SET Index**
The default benchmark is the Thai SET Index, but users can change the benchmark in the indicator settings.
The Relative Strength module evaluates:
* 6-week RS trend
* 13-week RS trend
* RS above its fast EMA
* Fast RS EMA above slow RS EMA
* Rising RS trend
* RS near a 52-week high
* RS making a new high before the stock price
The script generates a proprietary **RS Score from 0 to 7**.
**Important:** This RS Score is not the official IBD Relative Strength Rating and should not be interpreted as an IBD RS score from 1–99.
## 3. VCP and Contraction Analysis
The indicator attempts to identify characteristics commonly associated with a Volatility Contraction Pattern.
It analyzes progressively shorter price ranges:
* 40-day range
* 20-day range
* 10-day range
A constructive contraction structure is identified when volatility decreases from the longer window toward the shorter window.
The script also evaluates:
* Base formation
* Base depth
* ATR contraction
* Final price tightness
* Volume dry-up
* Relative Strength quality
* Distance from the Dynamic Pivot
These factors are combined into a **Setup Score from 0 to 7**.
## 4. Dynamic VCP Pivot
Unlike a simple fixed-period highest-high breakout level, this version uses confirmed swing highs to estimate the most relevant resistance level on the right side of the base.
The Dynamic Pivot is generated using confirmed pivot-high logic.
This is intended to better approximate the concept of the final resistance area or the "line of least resistance" before a potential breakout.
The script also displays:
* Dynamic Pivot price
* Pivot age
* Distance to Pivot
* Breakout status
* Breakout volume confirmation
* Price extension above Pivot
* Price extension above EMA 50
## 5. Setup Phase Detection
The script classifies the stock into one of several phases:
**NOT READY**
The stock does not yet meet sufficient trend or setup criteria.
**TREND ONLY**
The stock has a constructive trend but does not yet show a clear base.
**BASE FORMING**
The stock appears to be consolidating.
**CONTRACTING**
Price volatility is beginning to contract.
**FINAL CONTRACTION**
The right side of the base is becoming tighter and volume may be drying up.
**VCP READY**
Trend, Relative Strength, contraction, volume, and Pivot conditions are approaching a potentially actionable setup.
**BREAKOUT**
Price has broken above the Dynamic Pivot with volume confirmation.
**EXTENDED**
The stock has moved too far above the Pivot or EMA 50 according to the configured thresholds.
## Dashboard
The indicator includes four dashboard pages:
### Page 1 — Trend
Displays the complete Minervini-style trend evaluation and EMA structure.
### Page 2 — Relative Strength
Displays RS trend, RS EMA structure, RS highs, leadership characteristics, and RS Score.
### Page 3 — VCP Setup
Displays base depth, contraction structure, ATR contraction, volume dry-up, Setup Score, and current setup phase.
### Page 4 — Pivot & Entry
Displays Dynamic Pivot information, distance to Pivot, breakout volume, extension status, and entry-condition guidance.
## Alerts
Alert conditions are included for:
* New Trend Template 8/8 qualification
* VCP Ready
* Dynamic Pivot breakout with volume confirmation
* RS making a new high before price
* Possible Leader Bottom First behavior
## Recommended Use
This indicator is designed primarily for the **Daily timeframe**.
A practical workflow is:
**Trend quality → Relative Strength → Base/VCP structure → Dynamic Pivot → Breakout confirmation**
Passing the Trend Template should be considered a **qualification condition**, not an automatic buy signal.
## Disclaimer
This script is intended for educational and analytical purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security.
All trading decisions and risk management remain the sole responsibility of the user.
**Developed by Dr.Kor Endo**
Based on concepts inspired by *Think and Trade Like a Champion* by Mark Minervini.
**Developed by Dr.Kor Endo**
Inspired by the trading principles and concepts presented in *Think and Trade Like a Champion* by Mark Minervini.
## Overview
OAT Minervini PRO v5 is a comprehensive trend, relative strength, and VCP setup analysis tool designed to help traders identify high-quality Stage 2 stocks and evaluate whether they are approaching a potentially actionable breakout setup.
The script combines three major components:
1. **Minervini Trend Template**
2. **Relative Strength Analysis**
3. **Volatility Contraction Pattern (VCP) and Dynamic Pivot Detection**
The goal of this indicator is not to generate automatic buy signals, but to help traders systematically filter, rank, and monitor stocks that may have the characteristics of potential market leaders.
## 1. Minervini Trend Template
The indicator evaluates eight trend conditions using EMA-based calculations:
* Price above EMA 150 and EMA 200
* EMA 150 above EMA 200
* EMA 200 trending upward
* EMA 50 above EMA 150 and EMA 200
* Price at least 25% above the 52-week low
* Price within 25% of the 52-week high
* Positive Relative Strength characteristics
* Price above EMA 50
The dashboard provides a **Trend Score from 0 to 8**.
A score of **8/8** indicates that the stock has passed all trend-template conditions defined by this script.
## 2. Relative Strength Analysis
Relative Strength is calculated by comparing the current stock with a user-selected market benchmark.
For example:
**Stock Price / SET Index**
The default benchmark is the Thai SET Index, but users can change the benchmark in the indicator settings.
The Relative Strength module evaluates:
* 6-week RS trend
* 13-week RS trend
* RS above its fast EMA
* Fast RS EMA above slow RS EMA
* Rising RS trend
* RS near a 52-week high
* RS making a new high before the stock price
The script generates a proprietary **RS Score from 0 to 7**.
**Important:** This RS Score is not the official IBD Relative Strength Rating and should not be interpreted as an IBD RS score from 1–99.
## 3. VCP and Contraction Analysis
The indicator attempts to identify characteristics commonly associated with a Volatility Contraction Pattern.
It analyzes progressively shorter price ranges:
* 40-day range
* 20-day range
* 10-day range
A constructive contraction structure is identified when volatility decreases from the longer window toward the shorter window.
The script also evaluates:
* Base formation
* Base depth
* ATR contraction
* Final price tightness
* Volume dry-up
* Relative Strength quality
* Distance from the Dynamic Pivot
These factors are combined into a **Setup Score from 0 to 7**.
## 4. Dynamic VCP Pivot
Unlike a simple fixed-period highest-high breakout level, this version uses confirmed swing highs to estimate the most relevant resistance level on the right side of the base.
The Dynamic Pivot is generated using confirmed pivot-high logic.
This is intended to better approximate the concept of the final resistance area or the "line of least resistance" before a potential breakout.
The script also displays:
* Dynamic Pivot price
* Pivot age
* Distance to Pivot
* Breakout status
* Breakout volume confirmation
* Price extension above Pivot
* Price extension above EMA 50
## 5. Setup Phase Detection
The script classifies the stock into one of several phases:
**NOT READY**
The stock does not yet meet sufficient trend or setup criteria.
**TREND ONLY**
The stock has a constructive trend but does not yet show a clear base.
**BASE FORMING**
The stock appears to be consolidating.
**CONTRACTING**
Price volatility is beginning to contract.
**FINAL CONTRACTION**
The right side of the base is becoming tighter and volume may be drying up.
**VCP READY**
Trend, Relative Strength, contraction, volume, and Pivot conditions are approaching a potentially actionable setup.
**BREAKOUT**
Price has broken above the Dynamic Pivot with volume confirmation.
**EXTENDED**
The stock has moved too far above the Pivot or EMA 50 according to the configured thresholds.
## Dashboard
The indicator includes four dashboard pages:
### Page 1 — Trend
Displays the complete Minervini-style trend evaluation and EMA structure.
### Page 2 — Relative Strength
Displays RS trend, RS EMA structure, RS highs, leadership characteristics, and RS Score.
### Page 3 — VCP Setup
Displays base depth, contraction structure, ATR contraction, volume dry-up, Setup Score, and current setup phase.
### Page 4 — Pivot & Entry
Displays Dynamic Pivot information, distance to Pivot, breakout volume, extension status, and entry-condition guidance.
## Alerts
Alert conditions are included for:
* New Trend Template 8/8 qualification
* VCP Ready
* Dynamic Pivot breakout with volume confirmation
* RS making a new high before price
* Possible Leader Bottom First behavior
## Recommended Use
This indicator is designed primarily for the **Daily timeframe**.
A practical workflow is:
**Trend quality → Relative Strength → Base/VCP structure → Dynamic Pivot → Breakout confirmation**
Passing the Trend Template should be considered a **qualification condition**, not an automatic buy signal.
## Disclaimer
This script is intended for educational and analytical purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security.
All trading decisions and risk management remain the sole responsibility of the user.
**Developed by Dr.Kor Endo**
Based on concepts inspired by *Think and Trade Like a Champion* by Mark Minervini.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.