OPEN-SOURCE SCRIPT
Candle Engine Educative

candle education engine is an educational visual tool designed to help traders study normal candles, heikin ashi candle behavior, reversal candles, and multi-candle pattern sequences directly on the chart.
this script is for education and market study only. it is not financial advice, not a trading strategy, not a signal service, and not a recommendation to buy or sell any asset. the goal is to help users understand candle structure, candle context, and pattern behavior. every label, panel note, score, and alert should be used as a learning reference only.
what this tool does
this indicator is built around three main study areas:
1. normal candle study
the normal candle engine reads standard chart candles and identifies candle structures such as doji, marubozu, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, rejection candles, sweep candles, displacement candles, imbalance candles, exhaustion candles, wide range candles, and compression candles.
this part is designed to be used on a normal candlestick chart.
2. heikin ashi candle study
the heikin ashi engine studies smoothed heikin ashi candle behavior. it can identify strong ha candles, weak ha candles, ha doji candles, ha continuation, ha pullback, ha acceleration, ha color flip, ha exhaustion, ha weakening, and ha reversal conditions.
for best learning, switch your chart to heikin ashi candles when studying the ha sections. this helps beginners compare the script labels with the actual ha candle shape.
3. pattern sequence study
the pattern engine studies one-candle, two-candle, three-candle, four-candle, and five-candle formations. it includes classic and modern patterns such as morning star, evening star, engulfing patterns, harami patterns, piercing line, dark cloud cover, three inside up, three inside down, three outside up, three outside down, three white soldiers, three black crows, rising three methods, falling three methods, traps, breakouts, kickers, and breakaway patterns.
the purpose is not to predict the future. the purpose is to learn how candles combine into structure.
why candles matter
candles show the battle between buyers and sellers during a specific period.
a candle can teach several things:
* the body shows who controlled the open-to-close move
* the wick shows where price was rejected
* the close shows where control finished
* the range shows how much activity happened
* repeated candles show pressure, hesitation, exhaustion, or continuation
* patterns show how control changes across several candles
a candle is not automatically bullish or bearish in every situation. the same candle can have different meaning depending on where it appears. for example, a hammer after a strong drop can be a bullish rejection clue, but a hammer in the middle of a range can simply be noise. a doji is not a buy or sell signal by itself. it teaches indecision and requires confirmation.
how beginners should use this indicator
start slowly. do not activate everything at once.
recommended learning path:
step 1: study normal candles first
use a regular candlestick chart. enable the normal candle engine and a few simple labels such as doji, hammer, shooting star, engulfing, inside bar, rejection, and sweep.
focus on the candle body, wick, close location, and where the candle appears.
step 2: study reversal candles separately
enable the reversal candle module if you want to focus only on candle structures that may teach rejection, exhaustion, liquidity sweep, or control transfer.
this is useful for beginners because it separates reversal education from general candle noise.
step 3: switch to heikin ashi for ha study
when studying the ha module, switch the chart type to heikin ashi. the script calculates ha behavior internally, but visually switching the chart helps you understand why a candle is classified as strong, weak, reversal, exhaustion, or continuation.
heikin ashi is useful for learning trend rhythm, but it smooths price, so it should not replace normal candle study.
step 4: study ha reversal separately
the reversal ha module is designed to focus on ha color flips, ha weakening, ha exhaustion, and possible smoothed reversal behavior.
use it to learn when trend rhythm begins to slow, not as an automatic entry tool.
step 5: study pattern sequences
after learning single candles, enable the pattern engine. start with one-candle and two-candle patterns before studying complex three, four, or five-candle patterns.
multi-candle patterns are easier to understand when you ask:
* what did the first candle show?
* did the second candle confirm or reject it?
* did the final candle close with buyer or seller control?
* did the pattern happen near a meaningful level?
* did the pattern appear in trend, range, pullback, or exhaustion?
step 6: read the panels
the panels are designed as an educational journal. they show recent candle or pattern events with a short educational note. the notes explain what the candle teaches, not what you must trade.
main settings explained
candle engine
enable candle engine turns the normal candle module on or off.
show candle type on chart displays candle names directly on the chart.
show candle panel displays the candle history panel.
candle panel position selects where the candle history panel appears.
max candle labels visible controls how many normal candle labels or panel rows are kept before cleanup.
scoring mode controls how the candle quality score is calculated. body mode focuses on candle body size. volume mode focuses on relative volume. hybrid mode combines both.
use global trend context adjusts the score using a simple trend context. beginners should treat this as context only, not a decision rule.
candle type filters
these settings enable or disable specific normal candle names. examples include doji, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, sweeps, rejection candles, imbalance candles, displacement candles, and exhaustion candles.
beginners should start with fewer candle types and add more later.
reversal candle
enable reversal candle turns on the reversal candle module.
show reversal candle labels displays reversal candle labels directly on the chart.
show reversal candle panel displays the reversal candle panel.
reversal candle position selects where the reversal candle panel appears.
max candle reversal label controls how many reversal candle labels or rows are kept.
this module is useful when you want to focus only on candle behavior linked to rejection, sweep, exhaustion, liquidity reaction, or possible control transfer.
candle ha
enable candle ha turns on the heikin ashi study module.
show ha candle labels displays ha labels on the chart.
show heikin ashi panel displays the ha history panel.
ha panel position selects where the ha panel appears.
show ha secondary tags controls whether extra ha structure details are shown. when off, the label stays cleaner and shows the main ha idea. when on, it can show additional details such as no wick, long body, continuation, or acceleration.
max ha labels visible controls how many ha labels or panel rows are kept.
use this module on a heikin ashi chart for best visual learning.
reversal ha
enable reversal ha candle turns on the ha reversal module.
show reversal ha labels displays reversal ha labels on the chart.
show reversal ha panel displays the reversal ha panel.
reversal ha position selects where the reversal ha panel appears.
show reversal ha secondary tags controls whether extra ha reversal details are shown.
max ha reversal label controls how many reversal ha labels or panel rows are kept.
reversal ha name lets users choose which ha reversal-related conditions are active, such as ha bull reversal, ha bear reversal, ha color flip, ha exhaustion, ha weakening, and ha doji reversal.
this section is useful for learning when a smoothed trend may be slowing or changing rhythm.
candle sequence engine
enable candle sequence engine turns on the pattern sequence module.
show detected sequence displays detected pattern labels on the chart.
show pattern panel displays the pattern history panel.
pattern panel position selects where the pattern panel appears.
detection sensitivity adjusts how strict the sequence detection is.
max pattern labels visible controls how many pattern labels or panel rows are kept.
pattern length filters allow users to enable or disable one-candle, two-candle, three-candle, four-candle, and five-candle pattern groups.
pattern name filters let users select individual patterns. beginners should start with fewer patterns, such as engulfing, harami, morning star, evening star, hammer, shooting star, inside bar break, and traps.
reversal pattern
enable reversal patterns only mode allows the script to focus only on reversal-related patterns without requiring the full pattern engine to be used in the same way.
show pattern reversal labels displays reversal pattern labels on the chart.
show pattern reversal panel displays the pattern reversal panel.
pattern reversal position selects where the reversal pattern panel appears.
max pattern reversal label controls how many reversal pattern labels or rows are kept.
this section is useful when the user wants to study only patterns that teach failed control, rejection, traps, transition, or possible reversal behavior.
ai context
the ai context section does not predict the future. it provides a visual context score based on internal trend, volume, and volatility calculations.
show ai context bull/bear gauge displays a small visual gauge.
gauge position moves the gauge between top center and bottom center.
gauge basis selects whether the gauge is based on trend, volume, volatility, or combined context.
gauge precision cells controls the visual resolution of the gauge.
bear, neutral, and bull colors control the gradient colors of the gauge.
the gauge should be used as a context tool, not as a trade entry tool.
educational history panels
the history panels show recent detected events. each row includes the candle or pattern name, score, and a short educational note.
the panels are designed to help beginners review what happened recently and learn the meaning of each structure.
panel position settings control where each panel appears.
panel colors and transparency control the visual style.
alerts
alerts can notify when selected candle, ha, or pattern events occur.
alerts are educational reminders only. they are not automatic trade signals.
beginners should create alerts only after understanding what each candle or pattern means.
how to interpret bull, bear, and neutral
bull means the candle or pattern teaches buyer pressure, recovery, demand, or bullish rejection.
bear means the candle or pattern teaches seller pressure, rejection, supply, or bearish control.
neutral means the candle or pattern teaches indecision, compression, balance, or a situation where direction is not yet confirmed.
neutral is not useless. neutral candles are important because they often teach patience.
important beginner lessons
do not read a candle alone.
a candle needs context:
* is price trending or ranging?
* did the candle appear near support or resistance?
* did the wick reject a meaningful level?
* did the close confirm control?
* did the next candle follow through?
* is the pattern forming after expansion, compression, or exhaustion?
a pattern is not a guarantee. it is a lesson about structure.
good candles usually have clear body, wick, and close behavior. weak candles are harder to read and need more confirmation.
reversal patterns need extra care. a reversal clue is not a confirmed reversal until price follows through.
continuation patterns need trend context. without trend, continuation patterns can become noise.
compression patterns teach patience. the direction is usually learned after the range breaks.
best beginner workflow
1. use normal candles first.
2. enable only a few basic candle labels.
3. study the educational notes.
4. add reversal candle only when you understand rejection and wick behavior.
5. switch to heikin ashi before studying ha modules.
6. keep ha secondary tags off at first for cleaner reading.
7. enable ha secondary tags later to study extra structure.
8. study pattern sequences after you understand single candles.
9. use the panels as a learning journal.
10. never use one label alone as a trading decision.
educational disclaimer
this script is provided for educational and informational purposes only. it does not provide financial advice, investment advice, trading advice, or a recommendation to buy or sell any financial instrument.
the indicator does not guarantee results and does not predict future market movement. users are responsible for their own research, risk management, and trading decisions.
the best use of this tool is to learn how candles, heikin ashi candles, and pattern sequences communicate market behavior.
this script is for education and market study only. it is not financial advice, not a trading strategy, not a signal service, and not a recommendation to buy or sell any asset. the goal is to help users understand candle structure, candle context, and pattern behavior. every label, panel note, score, and alert should be used as a learning reference only.
what this tool does
this indicator is built around three main study areas:
1. normal candle study
the normal candle engine reads standard chart candles and identifies candle structures such as doji, marubozu, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, rejection candles, sweep candles, displacement candles, imbalance candles, exhaustion candles, wide range candles, and compression candles.
this part is designed to be used on a normal candlestick chart.
2. heikin ashi candle study
the heikin ashi engine studies smoothed heikin ashi candle behavior. it can identify strong ha candles, weak ha candles, ha doji candles, ha continuation, ha pullback, ha acceleration, ha color flip, ha exhaustion, ha weakening, and ha reversal conditions.
for best learning, switch your chart to heikin ashi candles when studying the ha sections. this helps beginners compare the script labels with the actual ha candle shape.
3. pattern sequence study
the pattern engine studies one-candle, two-candle, three-candle, four-candle, and five-candle formations. it includes classic and modern patterns such as morning star, evening star, engulfing patterns, harami patterns, piercing line, dark cloud cover, three inside up, three inside down, three outside up, three outside down, three white soldiers, three black crows, rising three methods, falling three methods, traps, breakouts, kickers, and breakaway patterns.
the purpose is not to predict the future. the purpose is to learn how candles combine into structure.
why candles matter
candles show the battle between buyers and sellers during a specific period.
a candle can teach several things:
* the body shows who controlled the open-to-close move
* the wick shows where price was rejected
* the close shows where control finished
* the range shows how much activity happened
* repeated candles show pressure, hesitation, exhaustion, or continuation
* patterns show how control changes across several candles
a candle is not automatically bullish or bearish in every situation. the same candle can have different meaning depending on where it appears. for example, a hammer after a strong drop can be a bullish rejection clue, but a hammer in the middle of a range can simply be noise. a doji is not a buy or sell signal by itself. it teaches indecision and requires confirmation.
how beginners should use this indicator
start slowly. do not activate everything at once.
recommended learning path:
step 1: study normal candles first
use a regular candlestick chart. enable the normal candle engine and a few simple labels such as doji, hammer, shooting star, engulfing, inside bar, rejection, and sweep.
focus on the candle body, wick, close location, and where the candle appears.
step 2: study reversal candles separately
enable the reversal candle module if you want to focus only on candle structures that may teach rejection, exhaustion, liquidity sweep, or control transfer.
this is useful for beginners because it separates reversal education from general candle noise.
step 3: switch to heikin ashi for ha study
when studying the ha module, switch the chart type to heikin ashi. the script calculates ha behavior internally, but visually switching the chart helps you understand why a candle is classified as strong, weak, reversal, exhaustion, or continuation.
heikin ashi is useful for learning trend rhythm, but it smooths price, so it should not replace normal candle study.
step 4: study ha reversal separately
the reversal ha module is designed to focus on ha color flips, ha weakening, ha exhaustion, and possible smoothed reversal behavior.
use it to learn when trend rhythm begins to slow, not as an automatic entry tool.
step 5: study pattern sequences
after learning single candles, enable the pattern engine. start with one-candle and two-candle patterns before studying complex three, four, or five-candle patterns.
multi-candle patterns are easier to understand when you ask:
* what did the first candle show?
* did the second candle confirm or reject it?
* did the final candle close with buyer or seller control?
* did the pattern happen near a meaningful level?
* did the pattern appear in trend, range, pullback, or exhaustion?
step 6: read the panels
the panels are designed as an educational journal. they show recent candle or pattern events with a short educational note. the notes explain what the candle teaches, not what you must trade.
main settings explained
candle engine
enable candle engine turns the normal candle module on or off.
show candle type on chart displays candle names directly on the chart.
show candle panel displays the candle history panel.
candle panel position selects where the candle history panel appears.
max candle labels visible controls how many normal candle labels or panel rows are kept before cleanup.
scoring mode controls how the candle quality score is calculated. body mode focuses on candle body size. volume mode focuses on relative volume. hybrid mode combines both.
use global trend context adjusts the score using a simple trend context. beginners should treat this as context only, not a decision rule.
candle type filters
these settings enable or disable specific normal candle names. examples include doji, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, sweeps, rejection candles, imbalance candles, displacement candles, and exhaustion candles.
beginners should start with fewer candle types and add more later.
reversal candle
enable reversal candle turns on the reversal candle module.
show reversal candle labels displays reversal candle labels directly on the chart.
show reversal candle panel displays the reversal candle panel.
reversal candle position selects where the reversal candle panel appears.
max candle reversal label controls how many reversal candle labels or rows are kept.
this module is useful when you want to focus only on candle behavior linked to rejection, sweep, exhaustion, liquidity reaction, or possible control transfer.
candle ha
enable candle ha turns on the heikin ashi study module.
show ha candle labels displays ha labels on the chart.
show heikin ashi panel displays the ha history panel.
ha panel position selects where the ha panel appears.
show ha secondary tags controls whether extra ha structure details are shown. when off, the label stays cleaner and shows the main ha idea. when on, it can show additional details such as no wick, long body, continuation, or acceleration.
max ha labels visible controls how many ha labels or panel rows are kept.
use this module on a heikin ashi chart for best visual learning.
reversal ha
enable reversal ha candle turns on the ha reversal module.
show reversal ha labels displays reversal ha labels on the chart.
show reversal ha panel displays the reversal ha panel.
reversal ha position selects where the reversal ha panel appears.
show reversal ha secondary tags controls whether extra ha reversal details are shown.
max ha reversal label controls how many reversal ha labels or panel rows are kept.
reversal ha name lets users choose which ha reversal-related conditions are active, such as ha bull reversal, ha bear reversal, ha color flip, ha exhaustion, ha weakening, and ha doji reversal.
this section is useful for learning when a smoothed trend may be slowing or changing rhythm.
candle sequence engine
enable candle sequence engine turns on the pattern sequence module.
show detected sequence displays detected pattern labels on the chart.
show pattern panel displays the pattern history panel.
pattern panel position selects where the pattern panel appears.
detection sensitivity adjusts how strict the sequence detection is.
max pattern labels visible controls how many pattern labels or panel rows are kept.
pattern length filters allow users to enable or disable one-candle, two-candle, three-candle, four-candle, and five-candle pattern groups.
pattern name filters let users select individual patterns. beginners should start with fewer patterns, such as engulfing, harami, morning star, evening star, hammer, shooting star, inside bar break, and traps.
reversal pattern
enable reversal patterns only mode allows the script to focus only on reversal-related patterns without requiring the full pattern engine to be used in the same way.
show pattern reversal labels displays reversal pattern labels on the chart.
show pattern reversal panel displays the pattern reversal panel.
pattern reversal position selects where the reversal pattern panel appears.
max pattern reversal label controls how many reversal pattern labels or rows are kept.
this section is useful when the user wants to study only patterns that teach failed control, rejection, traps, transition, or possible reversal behavior.
ai context
the ai context section does not predict the future. it provides a visual context score based on internal trend, volume, and volatility calculations.
show ai context bull/bear gauge displays a small visual gauge.
gauge position moves the gauge between top center and bottom center.
gauge basis selects whether the gauge is based on trend, volume, volatility, or combined context.
gauge precision cells controls the visual resolution of the gauge.
bear, neutral, and bull colors control the gradient colors of the gauge.
the gauge should be used as a context tool, not as a trade entry tool.
educational history panels
the history panels show recent detected events. each row includes the candle or pattern name, score, and a short educational note.
the panels are designed to help beginners review what happened recently and learn the meaning of each structure.
panel position settings control where each panel appears.
panel colors and transparency control the visual style.
alerts
alerts can notify when selected candle, ha, or pattern events occur.
alerts are educational reminders only. they are not automatic trade signals.
beginners should create alerts only after understanding what each candle or pattern means.
how to interpret bull, bear, and neutral
bull means the candle or pattern teaches buyer pressure, recovery, demand, or bullish rejection.
bear means the candle or pattern teaches seller pressure, rejection, supply, or bearish control.
neutral means the candle or pattern teaches indecision, compression, balance, or a situation where direction is not yet confirmed.
neutral is not useless. neutral candles are important because they often teach patience.
important beginner lessons
do not read a candle alone.
a candle needs context:
* is price trending or ranging?
* did the candle appear near support or resistance?
* did the wick reject a meaningful level?
* did the close confirm control?
* did the next candle follow through?
* is the pattern forming after expansion, compression, or exhaustion?
a pattern is not a guarantee. it is a lesson about structure.
good candles usually have clear body, wick, and close behavior. weak candles are harder to read and need more confirmation.
reversal patterns need extra care. a reversal clue is not a confirmed reversal until price follows through.
continuation patterns need trend context. without trend, continuation patterns can become noise.
compression patterns teach patience. the direction is usually learned after the range breaks.
best beginner workflow
1. use normal candles first.
2. enable only a few basic candle labels.
3. study the educational notes.
4. add reversal candle only when you understand rejection and wick behavior.
5. switch to heikin ashi before studying ha modules.
6. keep ha secondary tags off at first for cleaner reading.
7. enable ha secondary tags later to study extra structure.
8. study pattern sequences after you understand single candles.
9. use the panels as a learning journal.
10. never use one label alone as a trading decision.
educational disclaimer
this script is provided for educational and informational purposes only. it does not provide financial advice, investment advice, trading advice, or a recommendation to buy or sell any financial instrument.
the indicator does not guarantee results and does not predict future market movement. users are responsible for their own research, risk management, and trading decisions.
the best use of this tool is to learn how candles, heikin ashi candles, and pattern sequences communicate market behavior.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Light the candle that sleeps within you.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Light the candle that sleeps within you.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.