OPEN-SOURCE SCRIPT

3-Bar (Outside Bar) Scanner with Table Display

От mmtrades5643
# 3-Bar (Outside Bar) Scanner with Table Display

## Overview

The **3-Bar (Outside Bar) Scanner with Table Display** is a custom TradingView indicator designed for traders who utilize **The Strat** methodology. This indicator scans for **3-bar (Outside Bar)** patterns across multiple symbols and displays the results in a convenient table format directly on your chart.

## Purpose

- **Efficient Multi-Symbol Scanning**: Monitor up to four symbols simultaneously for 3-bar patterns without the need to switch between charts.
- **Real-Time Updates**: The table dynamically updates with new price data, providing immediate insights into potential trading opportunities.
- **Visual Clarity**: Displays whether a 3-bar is bullish ("3 Up") or bearish ("3 Down"), helping you quickly interpret market sentiment.

## How It Works

- **Data Retrieval**: The indicator uses `request.security()` to fetch high, low, open, and close prices for the specified symbols and timeframe.
- **3-Bar Detection**:
- **Outside Bar Criteria**: Checks if the current candle's high is higher than the previous candle's high and the current low is lower than the previous low.
- **Direction Determination**:
- **"3 Up"**: If the candle closes higher than it opens (bullish candle).
- **"3 Down"**: If the candle closes lower than it opens (bearish candle).
- **Table Display**:
- The table shows the **Symbol**, **Timeframe**, and **State** ("3 Up", "3 Down", or blank if no pattern detected).
- Customizable colors and positioning to fit your chart's aesthetics.

## Best Use Cases

- **Rapid Market Analysis**: Ideal for traders needing a quick overview of multiple assets for potential 3-bar setups.
- **Strategic Decision-Making**: Helps identify key reversal or continuation patterns in alignment with **The Strat** principles.
- **Scalable Monitoring**: By utilizing TradingView's multi-chart layouts, you can expand monitoring beyond four symbols.

## Instructions for Use

### Adding the Indicator to Your Chart

1. **Copy the Code**: Use the provided Pine Script code for the indicator.
2. **Create a New Indicator**:
- In TradingView, click on **Pine Editor** at the bottom of the platform.
- Paste the code into the editor.
3. **Save and Add to Chart**:
- Click **Save** and give your indicator a name.
- Click **Add to Chart** to apply it.

### Customizing the Inputs

- **Symbols**:
- **Symbol 1**: Leave blank to use the current chart's symbol or enter a specific symbol (e.g., `AAPL`).
- **Symbol 2 to Symbol 4**: Enter additional symbols or leave them blank.
- **Timeframe**: Select your desired timeframe (e.g., `D` for Daily, `60` for 60-minute).
- **Table Colors**:
- Customize header and data colors for better visibility against your chart background.

### Interpreting the Table

- **Symbol**: Displays the symbol without the exchange prefix for clarity.
- **Timeframe**: Shows the timeframe applied to the analysis.
- **State**:
- **"3 Up"**: A bullish outside bar where the candle closed higher than it opened.
- **"3 Down"**: A bearish outside bar where the candle closed lower than it opened.
- **Blank**: No 3-bar pattern detected on the latest candle.

### Monitoring More Than Four Symbols

- **Multi-Chart Layout**:
- Use TradingView's multi-chart feature to display multiple charts within a single workspace.
- Apply the indicator to each chart. For example:
- **Four-Chart Grid**: Monitor up to 16 symbols by setting up four charts, each with the indicator tracking four symbols.
- **Steps**:
1. Arrange your workspace into a multi-chart layout.
2. Add the indicator to each chart.
3. Input different symbols into the indicator on each chart.

## Example Usage

Suppose you want to monitor the following symbols on a Daily timeframe:

- **Symbol 1**: *(Leave blank to use the current chart's symbol, e.g., `SPY`)*
- **Symbol 2**: `AAPL`
- **Symbol 3**: `TSLA`
- **Symbol 4**: `AMZN`

After adding the indicator and entering these symbols:

- **SPY**: The table shows "3 Up" in the State column, indicating a bullish outside bar.
- **AAPL**: No 3-bar pattern detected; the State column is blank.
- **TSLA**: The table shows "3 Down," indicating a bearish outside bar.
- **AMZN**: The table shows "3 Up," indicating another bullish outside bar.

This setup allows you to quickly assess which symbols are exhibiting significant patterns that may warrant further analysis or action.

## Notes

- **Customization**: Feel free to adjust the table's position and colors to suit your preferences.
- **Limitations**:
- Be aware of TradingView's limitations on `request.security()` calls, which may vary based on your subscription plan.
- The indicator is designed to monitor up to four symbols per instance due to these limitations.
- **Scalability**:
- By using multi-chart layouts, you can effectively monitor more symbols without overloading a single chart.
- This approach allows you to scale up your monitoring capabilities to fit your trading strategy.

## Conclusion

The **3-Bar (Outside Bar) Scanner with Table Display** is a valuable tool for traders who utilize **The Strat** methodology. It streamlines the process of identifying key 3-bar patterns across multiple symbols and timeframes, enhancing your ability to make informed trading decisions quickly.

By integrating this indicator into your trading routine, you can:

- Stay alert to significant market movements.
- Reduce the time spent manually scanning charts.
- Increase efficiency in executing your trading strategy.

---

Feel free to share this indicator with the Strat community. Feedback and suggestions are welcome to further enhance its functionality. Happy trading!снимок
Chart patternsmultitimeframeTrend Analysis
mmtrades5643

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности