OPEN-SOURCE SCRIPT

Enigma Unlocked

ที่อัปเดต:
ENIGMA Indicator: A Comprehensive Market Bias & Success Tracker

The ENIGMA Indicator is a powerful tool designed for traders who aim to identify market bias, track price movements, and evaluate trade performance using multiple timeframes. It combines multiple indicators and advanced logic to provide real-time insights into market trends, helping traders make more informed decisions.

Key Features
1. Multi-Timeframe Bias Calculation:
The ENIGMA Indicator tracks the market bias across multiple timeframes—Daily (D), 4-Hour (H4), 1-Hour (H1), 30-Minute (30M), 15-Minute (15M), 5-Minute (5M), and 1-Minute (1M).

How the Bias is Created:
The Bias is a key feature of the ENIGMA Indicator and is determined by comparing the current price with previous price levels for each timeframe.

- Bullish Bias (1): The market is considered **bullish** if the **current closing price** is higher than the **previous timeframe’s high**. This suggests that the market is trending upwards, and buyers are in control.

- Bearish Bias (-1): The market is considered **bearish** if the **current closing price** is lower than the **previous timeframe’s low**. This suggests that the market is trending downwards, and sellers are in control.

- Neutral Bias (0): The market is considered **neutral** if the price is between the **previous high** and **previous low**, indicating indecision or a range-bound market.

This bias calculation is performed independently for each timeframe. The **Bias** for each timeframe is then displayed in the **Bias Table** on your chart, providing a clear view of market direction across multiple timeframes.

2. **Customizable Table Display:**
- The indicator provides a table that displays the bias for each selected timeframe, clearly marking whether the market is **Bullish**, **Bearish**, or **Neutral**.
- Users can choose where to place the table on the chart: top-left, top-right, bottom-left, bottom-right, or center positions, allowing for easy and personalized chart management.

3. **Win/Loss Tracker:**
- The table also tracks the **success rate** of **buy** and **sell** trades based on price retests of key bias levels.
- For each period (Day, Week, Month), it tracks how often the price has moved in the direction of the initial bias, counting **Buy Wins**, **Sell Wins**, **Buy Losses**, and **Sell Losses**.
- This helps traders assess the effectiveness of the market bias over time and adjust their strategies accordingly.

#### **How the Success Calculation Determines the Success Rate:**
The **Success Calculation** is designed to track how often the price follows the direction of the market bias. It does this by evaluating how the price retests key levels associated with the identified market bias:

1. **Buy Success Calculation**:
- The success of a **Buy Trade** is determined when the price breaks above the **previous high** after a **bullish bias** has been identified.
- If the price continues to move higher (i.e., makes a new high) after breaking the previous high, the **buy trade is considered successful**.
- The indicator tracks how many times this condition is met and counts it as a **Buy Win**.

2. **Sell Success Calculation**:
- The success of a **Sell Trade** is determined when the price breaks below the **previous low** after a **bearish bias** has been identified.
- If the price continues to move lower (i.e., makes a new low) after breaking the previous low, the **sell trade is considered successful**.
- The indicator tracks how many times this condition is met and counts it as a **Sell Win**.

3. **Failure Calculations**:
- If the price does not move as expected (i.e., it does not continue in the direction of the identified bias), the trade is considered a **loss** and is tracked as **Buy Loss** or **Sell Loss**, depending on whether it was a bullish or bearish trade.

The ENIGMA Indicator keeps a running tally of **Buy Wins**, **Sell Wins**, **Buy Losses**, and **Sell Losses** over a set period (which can be customized to Days, Weeks, or Months). These statistics are updated dynamically in the **Bias Table**, allowing you to track your success rate in real-time and gain insights into the effectiveness of the market bias.

#### **Customizable Period Tracking:**
- The ENIGMA Indicator allows you to set custom tracking periods (e.g., 30 days, 2 weeks, etc.). The performance metrics reset after each tracking period, helping you monitor your success in different market conditions.

5. **Interactive Settings:**
- **Lookback Period**: Define how many bars the indicator should consider for bias calculations.
- **Success Tracking**: Set the number of candles to track for calculating the win/loss performance.
- **Time Threshold**: Set a time threshold to help define the period during which price retests are considered valid.
- **Info Tooltip**: You can enable the information tool in the settings to view detailed explanations of how wins and losses are calculated, ensuring you understand how the indicator works and how the results are derived.

#### **How to Use the ENIGMA Indicator:**
1. **Install the Indicator**:
- Add the ENIGMA Indicator to your chart. It will automatically calculate and display the bias for multiple timeframes.

2. **Interpret the Bias Table**:
- The bias table will show whether the market is **Bullish**, **Bearish**, or **Neutral** across different timeframes.
- Look for alignment between the timeframes—when multiple timeframes show the same bias, it may indicate a stronger trend.

3. **Use the Win/Loss Tracker**:
- Track how well your trades align with the bias using the **Win/Loss Tracker**. This helps you refine your strategy by understanding which timeframes and biases lead to higher success rates.
- For example, if you see a high number of **Buy Wins** and a low number of **Sell Wins**, you may decide to focus more on buying during bullish trends and avoid selling during bearish retracements.

4. **Track Your Period Performance**:
- The indicator will automatically track your performance over the set period (Days, Weeks, Months). Use this data to adjust your approach and evaluate the effectiveness of your trading strategy.

5. **Position the Table**:
- Customize the placement of the table on your chart based on your preferences. You can choose from options like **Top Left**, **Top Right**, **Bottom Left**, **Bottom Right**, or **Center** to keep the chart uncluttered.

6. **Adjust Settings**:
- Modify the indicator settings according to your trading style. You can adjust the **Lookback Period**, **Number of Candles to Track**, and **Time Threshold** to match the pace of your trading.

7. **Use the Info Tooltip**:
- Enable the **Info Tool** in the settings to understand how the Buy/Sell Wins and Losses are calculated. The tooltip provides a breakdown of how the indicator tracks price movements and calculates the success rate.

**Conclusion:**
The **ENIGMA Indicator** is designed to help traders make informed decisions by providing a clear view of the market bias and performance data. With the ability to track bias across multiple timeframes and evaluate your trading success, it can be a powerful tool for refining your trading strategies.

Whether you're looking to focus on a single timeframe or analyze multiple timeframes for a stronger bias, the ENIGMA Indicator adapts to your needs, providing both real-time market insights and performance feedback.

เอกสารเผยแพร่
Enigma Unlocked Indicator Description & How to Use It

The **Enigma Unlocked** indicator is a comprehensive trading tool designed to assist traders by identifying potential buy and sell signals, drawing key price levels on the chart, and tracking performance metrics such as wins, losses, and pips moved. It also offers customization for line styles, labels, and performance tracking, making it a versatile addition to any trading strategy.

#### **Key Features**:
1. **Buy and Sell Signals**: The indicator detects buy and sell signals based on price movement relative to recent swing highs and lows. A buy signal occurs when the price closes above a recent swing high, while a sell signal occurs when the price closes below a recent swing low.
สแนปชอต
สแนปชอต
สแนปชอต
สแนปชอต
สแนปชอต
สแนปชอต
2. **Price Levels (Buy/Sell)**: The indicator draws horizontal lines at significant price levels, such as the high of the last bullish candle (for buy levels) and the low of the last bearish candle (for sell levels). These levels act as potential entry points for trades.


3. **Customization Options**:
- **Line Style**: You can select from three line styles: Solid, Dashed, or Dotted, to display the buy/sell levels.
- **Labels**: Labels for buy and sell signals are customizable, with the option to display or hide them.
- **Line Length & Distance**: Adjust the length of the lines that extend from the identified price levels and the distance (in bars) between the identified high/low and the line.

4. **Performance Tracking**:
- Tracks your wins and losses by calculating the pips moved from the entry level (buy/sell) to the exit.
- **Win Threshold**: Set a minimum pip movement required for a trade to be considered a win.
- **Loss Threshold**: Set a minimum pip movement to consider a trade a loss.
- **Pips Moved**: The indicator calculates and displays the total pips moved from the entry level, both for wins and losses.

5. **Arrows and Alerts**:
- **Arrows**: It places up and down arrows on the chart to visually indicate potential buy or sell signals.
- **Alerts**: Alerts can be triggered when price crosses the buy/sell levels, giving traders the opportunity to act when the market reaches these critical levels.

6. **Performance Table**:
- The performance table is dynamically updated to show a summary of the trade outcomes, including buy/sell signals, wins/losses, total pips moved, and the number of wins and losses.

---

#### **How to Use the Enigma Unlocked Indicator**:

1. **Setting Up the Indicator**:
- Add the **Enigma Unlocked** indicator to your chart on TradingView by copying and pasting the provided Pine Script.
- Adjust the customizable parameters in the settings window to fit your trading style:
- **Line Distance**: Controls how far the price levels are from the point where the high/low is broken.
- **Buy and Sell Labels**: Set the labels you wish to display when a signal is triggered.
- **Line Length**: Controls how far the horizontal lines extend.
- **Show Labels**: Toggle the visibility of the labels.
- **Win/Loss Thresholds**: Define the minimum pips for a trade to be counted as a win or loss.

2. **Understanding the Signals**:
- **Buy Signal**: When a bullish candle closes above the previous swing high, a buy signal is generated. The high of the last bullish candle is drawn as a "Buy @ or Below" level.
- **Sell Signal**: When a bearish candle closes below the previous swing low, a sell signal is generated. The low of the last bearish candle is drawn as a "Sell @ or Above" level.

3. **Monitoring the Performance Table**:
- After each buy or sell signal, the performance table updates with real-time data showing how the trade has performed.
- The table displays:
- The type of trade (Buy/Sell).
- Whether the trade was a win or loss.
- The total number of pips moved.
- The overall number of wins and losses.

4. **Visual Guidance**:
- **Arrows**: Green up arrows indicate potential buy signals, and red down arrows indicate potential sell signals. These arrows help you visually spot trade opportunities.
- **Horizontal Lines**: These lines indicate the key price levels for entry. The green line shows the level where a buy trade may be triggered, and the red line shows the sell level.

5. **Performance Tracking**:
- The performance tracking feature ensures you can evaluate the effectiveness of your trades based on the minimum pips moved.
- Each trade's outcome is tracked, and the indicator updates your overall performance, helping you assess whether your strategy is working.
- The table also helps you understand the risk/reward profile of your trades by showing the number of wins versus losses and how much the price moved during each trade.

6. **Using the Indicator for Trade Execution**:
- Once a buy or sell signal is generated, monitor the price action for confirmation. If the price reaches the corresponding buy/sell level, you can enter the trade.
- Use the performance table to help make decisions by evaluating past trades' results.
- The indicator can help inform both entry points and risk management, as you can visually assess the levels and performance metrics before making trading decisions.

---

#### **Conclusion**:
The **Enigma Unlocked** indicator is a powerful tool for traders seeking to identify high-probability trade setups while also providing a built-in mechanism for performance tracking. By customizing your inputs, you can tailor the indicator to suit your trading style and risk tolerance. The buy and sell levels, along with the real-time performance table, allow for more informed and data-driven decision-making, improving the overall trading experience.
เอกสารเผยแพร่
### **Enigma Unlocked Indicator** - Description

**Enigma Unlocked** is a powerful and sophisticated trading tool designed to identify key price levels and high-probability trade setups using multi-timeframe analysis. It combines insights from higher timeframes, such as H4, with confirmation signals from lower timeframes (M5 and M1), allowing traders to capture high-quality entry points with precision. This indicator is especially useful for traders who prefer to trade during active market hours by leveraging session-based filters.

#### **Key Features**:

- **Multi-Timeframe Analysis**: Detects critical price levels based on **H4** (or higher) highs and lows, and confirms trade signals on **M5** and **M1** timeframes.
- **Session-Based Filtering**: Signals are filtered based on the **London** and **New York** trading sessions (02:00-05:00 and 09:30-11:00 respectively), ensuring trades occur during high liquidity periods.
- **Automatic Line Drawing**: Automatically plots key levels as horizontal lines on your chart, extending over multiple bars to assist in visualizing potential entry points.
- **Customizable Line Styles**: Choose between **Solid**, **Dashed**, or **Dotted** line styles for clear visual cues.
- **Real-Time Alerts**: Set custom alerts to be notified when a **Buy** or **Sell** signal is confirmed, allowing you to take action without constantly monitoring the chart.
- **Session Highlighting**: The indicator shades the chart to visually highlight the active **London** and **New York** session times, helping you focus on the best trading windows.

#### **How It Works**:
- **Key Level Detection**: The indicator identifies significant highs and lows from higher timeframes (H4 or above) and draws them on the chart as horizontal lines.
- **Signal Logic**: Once price approaches or breaks these key levels, the indicator checks for confirmation on lower timeframes (M5 and M1). A **Buy Signal** is confirmed when price breaks above a key level, while a **Sell Signal** is triggered when price breaks below a key level.
- **Session Filtering**: The indicator only generates signals within the **London** and **New York** trading sessions, helping you avoid low-volume, unreliable signals from other times of the day.

#### **Ideal For**:
- Traders looking for high-probability setups during active market hours.
- Those using multi-timeframe analysis to refine their entries.
- Anyone who wants to trade with confidence based on reliable session and price action signals.

**Enigma Unlocked** is the perfect tool for traders who want to simplify their analysis and focus on the most actionable price levels, all while ensuring that their trades are aligned with optimal market conditions. With its intuitive design and customizable settings, this indicator helps you unlock new potential in your trading strategy.
เอกสารเผยแพร่
### **Description of the Code:**

This script is an indicator designed to display **ENIGMA strategy-based signals** on the chart. It identifies **buy and sell opportunities** based on retests of key levels (swing highs and lows). The indicator does the following:

1. **Sell Signals**:
- Detects bearish candles that close below a swing low (support level) and signals a sell opportunity if this occurs.
- Marks these levels with red horizontal lines labeled `"SELL - AT OR ABOVE"`, allowing the trader to track potential retest zones.

2. **Buy Signals**:
- Detects bullish candles that close above a swing high (resistance level) and signals a buy opportunity if this occurs.
- Marks these levels with green horizontal lines labeled `"BUY - AT OR BELOW"`, allowing the trader to track potential retest zones.

3. **Customization Options**:
- **Line Length**: Adjust how far the horizontal lines extend.
- **Line Style**: Choose between solid, dashed, or dotted lines.
- **Labels**: Option to display text labels (`SELL - AT OR ABOVE` or `BUY - AT OR BELOW`) at each level.
- **Max Trades**: Limits the number of visible trade levels (default is 3).

4. **Visual Markers**:
- Displays arrows above or below candles where a signal is generated (red for sell, green for buy).

5. **Dynamic Management**:
- Ensures that only the last `maxTrades` levels are displayed by dynamically removing older levels.

---

### **How to Use the Indicator:**

1. **Apply the Indicator to Your Chart**:
- Copy and paste the script into TradingView’s Pine Editor.
- Save and add it to your chart.

2. **Setup Your Preferences**:
- **Key Inputs**:
- `Max Number of Previous Trades`: Set how many historical levels (signals) you want visible on the chart.
- `Line Length`: Define how far each horizontal line extends.
- `Line Style`: Select whether lines should be solid, dashed, or dotted.
- `Show Labels`: Enable/disable the text labels for the buy/sell signals.

3. **Interpreting the Signals**:
- **Sell Signal**:
- Look for a **red arrow** above a bearish candle that has broken below a previous swing low.
- Use the **red horizontal line** as the retest zone for a potential sell entry.
- **Buy Signal**:
- Look for a **green arrow** below a bullish candle that has broken above a previous swing high.
- Use the **green horizontal line** as the retest zone for a potential buy entry.

4. **Use in Conjunction with Sessions**:
- While this indicator does not track session times, you can use it alongside session indicators to focus on specific trading hours (e.g., Asian, London, or New York).

5. **Alerts**:
- Although this version doesn’t include alerts, you can add them manually by defining `alertcondition` for `sellSignal` and `buySignal`.

---

### **Indicator Workflow:**
- The indicator continuously monitors candles to identify:
- **Swing Lows** (lowest points within the last 5 candles).
- **Swing Highs** (highest points within the last 5 candles).
- When a candle closes below a swing low (for a sell) or above a swing high (for a buy), it:
1. Creates a **horizontal line** at the swing level.
2. Marks the level with a corresponding **arrow and label**.
3. Removes older levels to maintain chart clarity (based on `Max Number of Previous Trades`).

---

### **Recommended Usage**:
This indicator is most effective when:
1. Paired with a session indicator to align signals with active trading hours.
2. Used in conjunction with additional confluences such as trend direction or volume analysis to improve signal accuracy.
3. Monitored for retests of generated levels, as the strategy expects price to return to these levels before entering a trade.

If you need further customization or enhancements (e.g., adding alerts or filtering by session times), let me know!
Candlestick analysisChart patternsmultitimeframe

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ