OPEN-SOURCE SCRIPT

Simple Fibonacci Retracement Strategy

Von Spira_Scalper
Aktualisiert
This strategy uses Fibonacci retracement to identify key levels in the market and helps traders find good entry and exit points. By understanding and using this strategy, traders can improve their trading decisions and increase their chances of success in the market.

This strategy, called the "Simple Fibonacci Retracement Strategy," is designed to help traders identify potential entry and exit points in the market based on Fibonacci retracement levels. The code is written in Pine Script and runs on the TradingView platform.
Overall Function

The strategy uses Fibonacci retracement levels to identify potential support and resistance levels in the market. This helps traders find good entry and exit points for trades, as well as set stop-loss and take-profit levels to minimize risk and maximize gains.
Main Components of the Code
1. Input Parameters

Lookback Period: The number of bars used to identify the highest high and lowest low.
Fibonacci Direction: The choice of whether Fibonacci levels are calculated from top to bottom or bottom to top.
Fibonacci Levels: Specific Fibonacci levels (23.6%, 38.2%, 50%, 61.8%) used to identify important price levels.
Take Profit and Stop Loss: The number of pips used to set take profit and stop loss levels.

2. Identification of Highest and Lowest Points

The code uses the lookback period to find the highest high (highestHigh) and the lowest low (lowestLow). These levels form the basis for calculating the Fibonacci levels.

3. Calculation of Fibonacci Levels
Based on the direction chosen by the user, the code calculates the various Fibonacci levels (0%, 23.6%, 38.2%, 50%, 61.8%, 100%).

4. Trading Logic
Long Signal: Generated when the price crosses above the 61.8% Fibonacci level from bottom to top.
Short Signal: Generated when the price crosses below the 38.2% Fibonacci level from top to bottom.
When a long or short signal is generated, the strategy opens a position and sets take profit and stop loss levels based on the input parameters.

5. Visualization
The strategy plots the Fibonacci levels on the chart to provide a visual representation of the calculated levels. This helps traders see where the levels are in relation to the current price.

6. Alerts
The code also has functionality to create alerts (commented out), which can notify traders of buy or sell signals.
How to Use the Strategy

Configure Parameters: Adjust the lookback period, Fibonacci direction, and levels for take profit and stop loss to your preferences.
View the Chart: The Fibonacci levels will be plotted on the chart, providing a visual overview of potential support and resistance levels.
Trade Signals: Follow the generated buy and sell signals. Set your parameters in settings and adjust according to the generated buy and sell signals in the strategy tester. The strategy will automatically set your take profit and stop loss levels.
Evaluation and Adjustment: Monitor the performance of the strategy and make adjustments as needed to optimize the results.

Norwegian
Denne strategien, kalt "Simple Fibonacci Retracement Strategy", er designet for å hjelpe tradere med å identifisere mulige inngangs- og utgangspunkter i markedet basert på Fibonacci-retracementnivåer. Koden er skrevet i Pine Script og kjøres på TradingView-plattformen.
Overordnet Funksjon

Strategien bruker Fibonacci-retracementnivåer for å identifisere potensielle støtte- og motstandsnivåer i markedet. Dette hjelper tradere med å finne gode inngangs- og utgangspunkter for handler, samt å sette stop-loss og take-profit nivåer for å minimere risiko og maksimere gevinster.
Hovedkomponenter i Koden
1. Input Parametere

Lookback Period: Antall barer som brukes til å identifisere høyeste høydepunkt og laveste lavpunkt.
Fibonacci Direction: Valg om Fibonacci-nivåene skal beregnes fra topp til bunn eller bunn til topp.
Fibonacci Levels: Spesifikke Fibonacci-nivåer (23.6%, 38.2%, 50%, 61.8%) som brukes til å identifisere viktige prisnivåer.
Take Profit og Stop Loss: Antall pips som brukes til å sette take profit og stop loss nivåer.

2. Identifikasjon av Høyeste og Laveste Punkt

Koden bruker lookback perioden for å finne det høyeste høydepunktet (highestHigh) og det laveste lavpunktet (lowestLow). Disse nivåene er grunnlaget for å beregne Fibonacci-nivåene.
3. Beregning av Fibonacci-nivåer

Basert på retningen valgt av brukeren, beregner koden de forskjellige Fibonacci-nivåene (0%, 23.6%, 38.2%, 50%, 61.8%, 100%).
4. Handelslogikk
Long Signal: Genereres når prisen krysser over 61.8% Fibonacci-nivået fra bunn til topp.
Short Signal: Genereres når prisen krysser under 38.2% Fibonacci-nivået fra topp til bunn.
Når et long eller short signal genereres, åpner strategien en posisjon og setter take profit og stop loss nivåer basert på inputparametrene.

5. Visualisering
Strategien plottet Fibonacci-nivåene på chartet for å gi en visuell representasjon av de beregnede nivåene. Dette hjelper tradere med å se hvor nivåene er i forhold til den nåværende prisen.

6. Varsler
Koden har også funksjonalitet for å lage varsler (kommentert ut), som kan varsle tradere om kjøps- eller salgssignaler.

Slik Bruker Du Strategien
Konfigurer Parametere: Juster lookback perioden, Fibonacci-retningen, og nivåene for take profit og stop loss til dine preferanser.

Se på Chartet: Fibonacci-nivåene vil bli plottet på chartet, noe som gir deg en visuell oversikt over potensielle støtte- og motstandsnivåer.

Handle Signaler: Sett dine parametere i innstillinger og juster etter genererte kjøps- og salgssignalene i strategy testeren. Strategien vil automatisk sette dine take profit og stop loss nivåer.

Evaluering og Justering: Overvåk ytelsen til strategien og gjør justeringer etter behov for å optimalisere resultatene.
Versionshinweise
Added an option for selecting at which Fibonacci level to set the trade.
Chart patternsCycles
Spira_Scalper
Spira Scalper

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss