OPEN-SOURCE SCRIPT

Double Bottom with Support/Resistance Strategy - Aynet

Inputs
Lookback Period: Defines the range to identify swing lows and calculate Fibonacci levels.
Swing Low Threshold: Used to determine whether a bottom is sharp (Adam) or rounded (Eve).
Fibonacci Levels: Customizable levels (e.g., 0.618 and 1.618) for defining target zones.
Support/Resistance Period: Period for identifying support/resistance levels.
Support/Resistance Touch Points: Minimum number of points required to validate a support/resistance level.
Key Features
1. Support/Resistance Detection
get_sr_level Function: Calculates support or resistance levels by checking if the high/low of candles within the specified period touch certain thresholds.
Only valid levels with enough touch points (srThreshold) are used.
2. Double Bottom Pattern Detection
Detects "Adam and Eve" double bottoms based on:
Adam Bottom: A sharp price movement (high spike sharpness).
Eve Bottom: A rounded bottom (low spike sharpness).
Bottoms are validated if they occur within 2% of the first detected bottom.
3. Fibonacci Levels
Calculates Fibonacci levels based on the high point and the detected bottoms:
Level 1 (e.g., 0.618): The first target/resistance level.
Level 3 (e.g., 1.618): The extended target/support level.
4. Entry Conditions
Long Entry: If the calculated support/resistance level is above the Fibonacci Level 3.
Short Entry: If the support/resistance level is below Fibonacci Level 1.
Reset Conditions
Resets pattern detection variables when a new high is detected above the recent lookback range.
Visualization
Plots:
Fibonacci Levels (e.g., 0.236 and 0.618).
Support/Resistance Level.
Shapes:
Adam Bottom: Green circles below bars.
Eve Bottom: Yellow circles below bars.
This strategy combines pattern detection (Adam and Eve double bottoms), Fibonacci retracements, and support/resistance zones to define trading opportunities. It automatically places long or short trades based on these conditions.
Bands and ChannelseducationalFundamental Analysis

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal