OPEN-SOURCE SCRIPT

STRATEGY Fibonacci Levels with High/Low Criteria - AYNET


Here is an explanation of the Fibonacci Levels Strategy with High/Low Criteria script:

Overview
This strategy combines Fibonacci retracement levels with high/low criteria to generate buy and sell signals based on price crossing specific thresholds. It utilizes higher timeframe (HTF) candlesticks and user-defined lookback periods for high/low levels.

Key Features
Higher Timeframe Integration:

The script calculates the open, high, low, and close values of the higher timeframe (HTF) candlestick.
Users can choose to calculate levels based on the current or the last HTF candle.
Fibonacci Levels:

Fibonacci retracement levels are dynamically calculated based on the HTF candlestick's range (high - low).
Users can customize the levels (0.000, 0.236, 0.382, 0.500, 0.618, 0.786, 1.000).
High/Low Lookback Criteria:

The script evaluates the highest high and lowest low over user-defined lookback periods.
These levels are plotted on the chart for visual reference.
Trade Signals:

Long Signal: Triggered when the close price crosses above both:
The lowest price criteria (lookback period).
The Fibonacci level 3 (default: 0.5).
Short Signal: Triggered when the close price crosses below both:
The highest price criteria (lookback period).
The Fibonacci level 3 (default: 0.5).
Visualization:

Plots Fibonacci levels and high/low criteria on the chart for easy interpretation.
Inputs
Higher Timeframe:

Users can select the timeframe (default: Daily) for the HTF candlestick.
Option to calculate based on the current or last HTF candle.
Lookback Periods:

lowestLookback: Number of bars for the lowest low calculation (default: 20).
highestLookback: Number of bars for the highest high calculation (default: 10).
Fibonacci Levels:

Fully customizable Fibonacci levels ranging from 0.000 to 1.000.
Visualization
Fibonacci Levels:

Plots six customizable Fibonacci levels with distinct colors and transparency.
High/Low Criteria:

Plots the highest and lowest levels based on the lookback periods as reference lines.
Trading Logic
Long Condition:

Price must close above:
The lowest price criteria (lowcriteria).
The Fibonacci level 3 (50% retracement).
Short Condition:

Price must close below:
The highest price criteria (highcriteria).
The Fibonacci level 3 (50% retracement).
Use Case
Trend Reversal Strategy:
Combines Fibonacci retracement with recent high/low criteria to identify potential reversal or breakout points.
Custom Timeframe Analysis:
Incorporates higher timeframe data for multi-timeframe trading strategies.
educationalmultitimeframeWave Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


更多:

免责声明