PROTECTED SOURCE SCRIPT
Emas cryptosmart strategy (Multi-MA + MTF)

Core Concept: Aligning Two Timeframes
The fundamental purpose of this indicator is to solve the most common problem in trading: fighting the main trend.
It achieves this by visualizing two "universes" of trend data at the same time on a single chart:
The Immediate Trend (Your Current Chart): This is shown by the color of the candles.
The Dominant Trend (Higher Timeframe): This is shown by the "Long/Short" labels.
By separating these two signals, the indicator allows you to see when your short-term trend (your candles) aligns with the long-term trend (the labels), giving you a high-probability confluence signal.
Detailed Components and Logic
The indicator is divided into four systems that work together.
1. The Dual Moving Average Sets (The 8 Lines)
The indicator calculates two identical sets of four moving averages (MA Fast, Mid, Slow, Ex-Slow).
Set 1: Current Timeframe MAs (Solid Lines)
These 4 MAs react to every candle on the chart you are currently watching (e.g., 1-Hour).
They show you the immediate price structure and trend.
Their sole job is to define the color of your candles.
Set 2: Multi-Timeframe (MTF) MAs (Stepped Lines)
You can toggle this set on or off with the Use MAs from Another Timeframe checkbox.
It calculates the same 4 MAs but using data from a higher timeframe you choose (e.g., 1-Day).
These lines look "stepped" or "blocky" because they represent the dominant trend.
Their sole job is to define when the "Long" and "Short" labels appear.
2. 🧠 The Candle Coloring Logic (Your Current Trend)
This is the first part of the core logic:
The candle color (barcolor) is based exclusively on the MAs from the current timeframe.
The Source for Signal and Color menu lets you choose which crossover on your current timeframe defines the trend.
"Fast / Mid": Candles are green if the Fast MA is above the Mid MA.
"Price / Slow": Candles are green if the Price is above the Slow MA.
Result: This gives you an instant read on the short-term trend. If the candles are green, the micro-trend is bullish.
3. The Signal/Label System (Your Main Trend Filter)
This is the second and most important part of the logic:
The "Long" and "Short" labels (label.new) are based exclusively on the MAs from the higher timeframe (MTF) (assuming useMTF is checked).
If you choose "Fast / Mid" as your source and your MTF is "Daily," a "Long" label will only appear when the Daily Fast MA crosses above the Daily Mid MA.
Result: The labels act as a major trend filter. They don't give you an immediate entry signal, but rather tell you, "The wind is at your back to look for buys" ("Long" label) or "The wind is against you" ("Short" label).
4. Advanced Customization (The Inputs)
This indicator gives you full control over every component:
MA Type: You can change all 8 lines from EMA to SMA, WMA, VWMA, or SMMA (RMA), allowing you to test which MA type best fits your strategy.
Visibility: You can hide or show any of the 8 MA lines independently (both current and MTF) to keep your chart clean.
Additional Filter: The Use Trend Filter checkbox adds an extra layer of safety to the labels, requiring the price to also be above the slow MTF MA to confirm the signal.
Aesthetics: You can fully control the style, size, and distance (based on ATR) of the labels so they don't clutter the price.
How To Use the Indicator (Strategy)
The true power of this indicator is seen when you combine its signals:
High-Probability Buy (Long) Scenario:
A "Long" label appears on your chart. This confirms your main trend (e.g., Daily) is bullish. This is your bias.
You ignore all sell signals.
The price pulls back on your current timeframe (e.g., 1-Hour), causing the candles to turn red.
You wait. When the 1-Hour trend realigns with the Daily trend, the candles flip back to green.
This candle color change (from red to green) while the "Long" label is present is your high-confluence entry signal.
"Bull Trap" Scenario (That the Indicator Helps You Avoid):
You are on a 1H chart and the candles turn green (micro-trend is bullish).
You look at the background and see there is no "Long" label (or worse, there is a "Short" label from the Daily trend).
Conclusion: The indicator is visually warning you that this bullish move is likely just a pullback/rally within a larger bearish trend. It saves you from buying into a "bull trap."
The fundamental purpose of this indicator is to solve the most common problem in trading: fighting the main trend.
It achieves this by visualizing two "universes" of trend data at the same time on a single chart:
The Immediate Trend (Your Current Chart): This is shown by the color of the candles.
The Dominant Trend (Higher Timeframe): This is shown by the "Long/Short" labels.
By separating these two signals, the indicator allows you to see when your short-term trend (your candles) aligns with the long-term trend (the labels), giving you a high-probability confluence signal.
Detailed Components and Logic
The indicator is divided into four systems that work together.
1. The Dual Moving Average Sets (The 8 Lines)
The indicator calculates two identical sets of four moving averages (MA Fast, Mid, Slow, Ex-Slow).
Set 1: Current Timeframe MAs (Solid Lines)
These 4 MAs react to every candle on the chart you are currently watching (e.g., 1-Hour).
They show you the immediate price structure and trend.
Their sole job is to define the color of your candles.
Set 2: Multi-Timeframe (MTF) MAs (Stepped Lines)
You can toggle this set on or off with the Use MAs from Another Timeframe checkbox.
It calculates the same 4 MAs but using data from a higher timeframe you choose (e.g., 1-Day).
These lines look "stepped" or "blocky" because they represent the dominant trend.
Their sole job is to define when the "Long" and "Short" labels appear.
2. 🧠 The Candle Coloring Logic (Your Current Trend)
This is the first part of the core logic:
The candle color (barcolor) is based exclusively on the MAs from the current timeframe.
The Source for Signal and Color menu lets you choose which crossover on your current timeframe defines the trend.
"Fast / Mid": Candles are green if the Fast MA is above the Mid MA.
"Price / Slow": Candles are green if the Price is above the Slow MA.
Result: This gives you an instant read on the short-term trend. If the candles are green, the micro-trend is bullish.
3. The Signal/Label System (Your Main Trend Filter)
This is the second and most important part of the logic:
The "Long" and "Short" labels (label.new) are based exclusively on the MAs from the higher timeframe (MTF) (assuming useMTF is checked).
If you choose "Fast / Mid" as your source and your MTF is "Daily," a "Long" label will only appear when the Daily Fast MA crosses above the Daily Mid MA.
Result: The labels act as a major trend filter. They don't give you an immediate entry signal, but rather tell you, "The wind is at your back to look for buys" ("Long" label) or "The wind is against you" ("Short" label).
4. Advanced Customization (The Inputs)
This indicator gives you full control over every component:
MA Type: You can change all 8 lines from EMA to SMA, WMA, VWMA, or SMMA (RMA), allowing you to test which MA type best fits your strategy.
Visibility: You can hide or show any of the 8 MA lines independently (both current and MTF) to keep your chart clean.
Additional Filter: The Use Trend Filter checkbox adds an extra layer of safety to the labels, requiring the price to also be above the slow MTF MA to confirm the signal.
Aesthetics: You can fully control the style, size, and distance (based on ATR) of the labels so they don't clutter the price.
How To Use the Indicator (Strategy)
The true power of this indicator is seen when you combine its signals:
High-Probability Buy (Long) Scenario:
A "Long" label appears on your chart. This confirms your main trend (e.g., Daily) is bullish. This is your bias.
You ignore all sell signals.
The price pulls back on your current timeframe (e.g., 1-Hour), causing the candles to turn red.
You wait. When the 1-Hour trend realigns with the Daily trend, the candles flip back to green.
This candle color change (from red to green) while the "Long" label is present is your high-confluence entry signal.
"Bull Trap" Scenario (That the Indicator Helps You Avoid):
You are on a 1H chart and the candles turn green (micro-trend is bullish).
You look at the background and see there is no "Long" label (or worse, there is a "Short" label from the Daily trend).
Conclusion: The indicator is visually warning you that this bullish move is likely just a pullback/rally within a larger bearish trend. It saves you from buying into a "bull trap."
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน