PROTECTED SOURCE SCRIPT

US30 Challenge Complement

Cập nhật
Purpose of the Script
This script is designed to analyze bullish and bearish engulfing patterns on the US30 index. It combines moving averages (MA and EMA) on both daily and hourly charts to detect crossovers, evaluates engulfing candlestick patterns, and adds additional conditions based on the size of candlestick wicks. The script provides visual feedback by coloring bars and plotting flags when certain conditions are met.

Explanation of the Key Features
User Input Parameters:

The script allows users to customize the period and color of both a simple moving average (SMA) and an exponential moving average (EMA). This flexibility enables users to adapt the moving average settings to their preferred strategy.
Moving Averages (MA and EMA):

Two key moving averages are calculated:
A simple moving average (SMA) with a period of 18 for both daily and hourly timeframes.
An exponential moving average (EMA) with a period of 8 for both daily and hourly timeframes.
These moving averages are used to detect whether the EMA is above or below the SMA in both the daily and hourly charts, providing trend direction insights.
Engulfing Patterns:

The script detects bullish and bearish engulfing patterns across multiple candlesticks.
Bullish Engulfing: Occurs when a green candlestick (closing higher than it opens) completely engulfs the body of the previous red candlestick.
Bearish Engulfing: Occurs when a red candlestick (closing lower than it opens) completely engulfs the body of the previous green candlestick.
The script detects these patterns not only for a single previous candle but also up to three previous candles, making it more versatile in recognizing different engulfing scenarios.
A percentage threshold is introduced to ensure that the engulfing candles meet a minimum size requirement, which can be customized by the user.
Cross-Detection on Multiple Timeframes:

The script checks whether the EMA is above or below the SMA on both daily and hourly charts.
This crossover is critical for confirming bullish or bearish conditions. If the EMA is below the SMA on the hourly chart, combined with a bullish engulfing pattern, it suggests a potential bullish reversal. Conversely, if the EMA is above the SMA with a bearish engulfing pattern, it signals a potential bearish reversal.
Candlestick Size and Wick Filters:

The script includes functions to filter candlesticks based on their wick sizes.
Bullish Wick Filter: Ensures that the upper wick of a bullish candle is not too large compared to the body.
Bearish Wick Filter: Ensures that the lower wick of a bearish candle is not too large compared to the body.
These filters help confirm strong candlesticks, reducing noise from candles with long wicks that might indicate indecision.
Visual Cues (Bar Coloring and Flags):

The script colors bars green if bullish engulfing conditions are met and red if bearish engulfing conditions are met. This provides an immediate visual indication of potential reversal points.
It also plots flags above bullish candlesticks and below bearish candlesticks if they have favorable wick characteristics. This adds an extra layer of confirmation for identifying stronger candles.
How to Use the Script
Adjust Parameters:

Before using the script, traders can customize the moving average periods, colors, and the percentage threshold for the engulfing candlesticks. This allows users to fine-tune the script to different timeframes and market conditions.
Engulfing Pattern Detection:

Traders can rely on the script to automatically detect and highlight bullish and bearish engulfing patterns, making it easier to spot potential reversal points. The script considers both single and multi-candlestick engulfing patterns, adding robustness to its detection logic.
Cross-Verification with Moving Averages:

The script adds a layer of confirmation by checking the relationship between the EMA and SMA. Traders can look for alignment between the moving averages and the engulfing patterns to increase the likelihood of successful trades.
Filter Candles Based on Wick Size:

Traders can use the additional wick filters to focus on stronger, more decisive candles. Flags are plotted on these candles, making them easier to identify.
Differences from Other Scripts
Multi-Candle Engulfing Detection: The script detects engulfing patterns over multiple previous candles (up to three), which is not commonly found in most scripts.
Customizable Engulfing Size: The user can set a minimum size threshold for engulfing candles, providing greater control over the pattern detection.
Wick Filters: The inclusion of filters to check for wick size makes this script more precise in identifying strong engulfing candles, reducing false signals from indecisive candles with large wicks.
EMA and SMA Crossover Integration: By integrating moving average crossovers, the script provides additional trend confirmation, increasing the reliability of the engulfing signals.


***************************************************(Español)
Propósito del Script
Este script está diseñado para analizar patrones de envolvente alcista y bajista en el índice US30. Combina medias móviles (MA y EMA) en gráficos diarios y horarios para detectar cruces, evalúa patrones de velas envolventes y añade condiciones adicionales basadas en el tamaño de las mechas. El script ofrece retroalimentación visual coloreando barras y trazando banderas cuando se cumplen ciertas condiciones.

Explicación de las Características Clave
Parámetros de Entrada del Usuario:

El script permite personalizar el período y el color tanto de una media móvil simple (SMA) como de una media móvil exponencial (EMA), lo que permite a los usuarios ajustar las configuraciones según su estrategia.
Medias Móviles (MA y EMA):

Dos medias móviles clave se calculan:
Una media móvil simple (SMA) con un período de 18 tanto para los marcos de tiempo diarios como horarios.
Una media móvil exponencial (EMA) con un período de 8 tanto para los marcos de tiempo diarios como horarios.
Patrones Envolventes:

El script detecta patrones de envolvente alcista y bajista en múltiples velas.
Se introduce un umbral porcentual que garantiza que las velas envolventes tengan un tamaño mínimo, personalizable por el usuario.
Detección de Cruces en Múltiples Marcos Temporales:

El script verifica si la EMA está por encima o por debajo de la SMA en gráficos diarios y horarios, lo que ayuda a confirmar las condiciones de tendencia.
Filtros de Tamaño de Mecha:

El script incluye funciones para filtrar velas según el tamaño de sus mechas, lo que ayuda a identificar velas más fuertes y decisivas.
Indicadores Visuales:

El script colorea las barras en verde si se cumplen las condiciones de envolvente alcista y en rojo si se cumplen las de envolvente bajista. También traza banderas para indicar velas con mechas favorables.
Cómo usar el Script
Ajustar Parámetros.
Detección de Patrones Envolventes.
Verificación con Medias Móviles.
Filtrar Velas Según el Tamaño de Mecha.
Diferencias con Otros Scripts
Detección Multi-Velas de Envolventes.
Tamaño Personalizable de Envolventes.
Filtros de Mechas.
Integración de Cruces de EMA y SMA.
Phát hành các Ghi chú
Make serius adjusmet in the condition to consider the three candles bearish and bullish
Phát hành các Ghi chú
best definition for the engulfing group
Phát hành các Ghi chú
New Release
Phát hành các Ghi chú
Fix the 3 candles Color
Phát hành các Ghi chú
New Release Barcolor Fix
Phát hành các Ghi chú
New Release Fix more Barcolor
Phát hành các Ghi chú
Rollback FIX Barcolor
Phát hành các Ghi chú
New Fix Barcolor
Phát hành các Ghi chú
second new fix barcolor, one left
Phát hành các Ghi chú
3er FIX Barcolor Tentative
Phát hành các Ghi chú
Merge No DOJI candle
Phát hành các Ghi chú
Beta Engulfing plus NO DOJI
Phát hành các Ghi chú
New Release Fix Engulfing + NO DOJI
Phát hành các Ghi chú
Testing Bajistas Full
Phát hành các Ghi chú
beta release bearish + NO DOJIS
Phát hành các Ghi chú
New Release 3rd condition Bearish+Tamanovela+NO DOJI
Phát hành các Ghi chú
Release Bearish Bullish + Engulfing + NO DOJI
Phát hành các Ghi chú
READY
Phát hành các Ghi chú
Test Merge Final
Phát hành các Ghi chú
secutiry test
Phát hành các Ghi chú
New Version
Candlestick analysis

Mã được bảo vệ

Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm