Price Action Forecast (PAF) Indicator

Price Action Forecast (PAF) Indicator

Introduction

The “Price Action Forecast” (PAF) indicator, created by Zeiierman, is designed to predict future market movements based on historical candlestick patterns. It uses a series of candles to identify similar events in the past and projects these patterns into the future, providing a visual and quantitative tool to anticipate potential trends and price changes.

This indicator is particularly useful for traders who use technical analysis and seek to leverage repetitive patterns in historical price data.

Code Description

Let’s explain the different parts of the “Price Action Forecast” (PAF) indicator code:

Input Variables

  • Series: Defines the number of candles used to identify the pattern (default is 7).
  • Forecast: Specifies the number of future candles that will be predicted (default is 100).
  • Display: Controls whether the detected events should be displayed on the chart (default is 1).

Main Calculation

The indicator starts by defining and calculating the necessary variables:

  • dataSize: Used to store the size of the processed data.
  • $dataD[]: An array that stores the type of candle (1 for bullish candles, -1 for bearish candles).

The main code executes on the last tick of the bar (islastbarupdate):

  1. Storing Candle Data:
    • It checks if the candle’s close is higher than the open to determine if it is bullish or bearish.
    • This information is stored in the $dataD[] array.
  2. Pattern Search:
    • If the data size (dataSize) is greater than or equal to the number of candles in Series, it searches for a similar pattern in the historical data.
    • It uses two nested FOR loops to compare the current series of candles with historical series.
    • If a similar pattern is found, it calculates the percentage difference between the current close prices and those of the found pattern (Diff).
  3. Creating Prediction Candles:
    • Based on the calculated difference (Diff), it generates and draws prediction candles on the chart using drawsegment and DRAWRECTANGLE.

Event Visualization

If Display is enabled, rectangles are drawn around the areas of interest on the chart, helping to better visualize the detected patterns.

Configuration and Customization

The “Price Action Forecast” (PAF) indicator allows users to adjust various parameters to suit their specific trading needs. Below are the main configurable parameters and how they can be modified:

Configurable Parameters

  1. Series
    • Description: Defines the number of candles used to identify historical patterns.
    • Default Value: 7
    • Modification: Can be adjusted to increase or decrease the pattern sensitivity. A higher value can capture longer patterns, while a lower value will detect shorter patterns.
    • Example: Series = 10
  2. Forecast
    • Description: Specifies the number of future candles that will be predicted.
    • Default Value: 100
    • Modification: Can be changed to forecast a larger or smaller number of future candles. A larger number extends the forecast time.
    • Example: Forecast = 50
  3. Display
    • Description: Controls whether the detected events should be displayed on the chart.
    • Default Value: 1 (display events)
    • Modification: Set to 0 to hide events, or to 1 to show them.
    • Example: Display = 0

How to Modify Default Values

To customize the indicator, users can adjust the values of the input variables directly at the beginning of the code. Here is an example of how to do it:

These adjustments allow traders to tailor the indicator to different market conditions and specific trading strategies.

Practical Examples

To illustrate the use of the “Price Action Forecast” (PAF) indicator, here are some practical examples of how it can be applied to real charts.

Example 1: Detecting Repetitive Patterns

Suppose we configure the indicator with Series = 7 and Forecast = 100. The indicator will search for sequences of candles (bullish and bearish) that match the last 7 candles on the current chart.

Interpretation:

  • The indicator will compare the current sequence of 7 candles with similar sequences in the price history.
  • If it finds a match, it will draw prediction candles based on the behavior following the historical sequence found.
  • This allows the trader to see if the historically identified pattern resulted in a bullish or bearish trend and use this information to make trading decisions.

Example 2: Identifying Patterns at Support Levels

By configuring the indicator with Series = 10 and Forecast = 50, we can focus on detecting patterns that occurred at support levels. Suppose the current price is at a previously identified support zone.

Interpretation:

  • The indicator will detect if the current 10-candle sequence matches any historical sequence that occurred at support levels.
  • If a match is found, the prediction candles will show how the price behaved historically after that pattern at support.
  • This may indicate a possible bullish reversal if similar patterns in the past resulted in price increases at support levels.

Example 3: Application in Different Timeframes

The PAF indicator can be applied in different timeframes to suit various trading strategies. For example, on an hourly chart, we can configure Series = 5 and Forecast = 30 for short-term predictions.

Interpretation:

  • On an hourly chart, the indicator will search for 5-candle patterns and project 30 candles into the future.
  • This allows intraday traders to identify short-term repetitive patterns and plan their trades based on high-frequency predictions.

Conclusion

The “Price Action Forecast” (PAF) indicator created by Zeiierman is a powerful tool for predicting future market movements based on historical candlestick patterns. By identifying similar events in the past and projecting them into the future, this indicator provides a quantitative and visual insight that can significantly enhance trading strategies.

Advantages of the PAF Indicator:

  • Predictions based on historical patterns: Leverages repetitive patterns to anticipate market movements.
  • Customization: Configurable parameters allow it to be adapted to different market conditions and trading strategies.
  • Clear visualization: Draws prediction candles on the chart, making it easier to identify potential trends and changes.

We recommend traders to experiment with the indicator’s parameters to find the configuration that best suits their trading style and use this tool as a complement to their technical analysis.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Alai-n • 180 days ago #

    Bravo for writing the code, but at first glance it seems very special to me, all the same. This reminds me a little of Madame Irma!!!

    • Iván • 180 days ago #

      thanks. Yes, this is exactly the same… The code could be a first point of a more complex indicator 😉

  2. elcortijoverde • 175 days ago #

    Buenas tardes Iván. Fillcolor, me lo rechaza al instalar el código. Gracias.

    • Iván • 175 days ago #

      Hola. Si estás con la versión V11 entonces te dará error. Borra dentro de la línea fillcolor(“yellow”,90) y te funcionará

  3. elcortijoverde • 175 days ago #

    Gracias Iván,…sigo tus videos en Youtube. Ya estoy con la V12 y se descarga, pero algo estaré haciendo mal porque no aparecen las velas de ese probable futuro. Estoy en velas diarias. Gracias.

  4. elcortijoverde • 175 days ago #

    Bueno, ya aparecen las velas, pero ahora, cada fin de vela aparece un nuevo pronóstico y no se borra el anterior con lo que se van superponiendo uno encima del otro a cada fin de vela. A ver si puedes ayudarme a evitar esto y que solo aparezca una predicción. Gracias Iván.

  5. Roger • 174 days ago #

    Gracias por compartir, pero no tengo ninguna predicción. @Ivan @elcortijoverde ¿qué modificaste para mostrar las predicciones? Gracias

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Iván
2 months ago
Iván Hola javier gracias! es importante realizar buenos backtest antes de lanzarse al mercado y ...
achel I have an error with "fillcolor" - How to solve this? / J'ai une erreur avec "fillcolor" - C...
Iván Hi! This is because you are not with V12. Just delete fillcolor
ARNAUD20 J'ai, télécharger le logiciel : falling-and-rising-3-methods.itf : rien se passe sur le grap...
DeathMetal C'est un modèle assez rare, essayez-le sur un petit laps de temps, par exemple 5 minutes et ...
philippe59139 Bravo super travail
xpe74 top job ......
xpe74 Hello, cet indicateur a il fait l'objet d'une conversion en stratégie de trading ?? does thi...
Stefano1234 there is an error: Define the variable: prd, showBreak, showPattern, showPvts
romanelli4 molto interessante e grazie ma come faccio a trasformarlo in trading system? grazie per l...
oyinloyea Thanks for the indicator
Finning Hi JuanJ, just a question about the tollerance*pointsize. I know what it is/what it does (in...
JOKAMAURICE Hi I am looking to number bars in a chart to ease analysis. Any idea if a program has been d...
goldenfish67 Hi guys just copied the code but I keep getting an error message: "Line 15 one of the fo...
juanj
4 years ago
herke036 For the question how to fill the variables a,b,c,d,e,f,g, x and y? a,b,c,d,e,f,g is selecti...
herke036 In your code I see If onmarket = 0 and Type22 = 1 and hora1 and hora2 Then If InsideBar[1]...
UkDownUnder How do we apply this to a strategy we have made, Thanks
idunnomuch IS this working in the latest version of prorealtime? I get the indicator, but not over my c...
bernardmorel egalement apparait en dessous du graphique mais vide
bernardmorel Bonjour est t il possible de remettre en ligne the strat car il y a une indication qui d...
ferros bonjour , super votre indicateur!!!! est-il possible de l'avoir en histograme +1 /-1 por en...
joguemon Buenas, he instalado el screener pero no me aparecen los números que indicas...tengo que mon...
enriquem Hola, No, los numeros no aparecen, Proscreener no permite rotular, Lo que devuelve el sc...
PeytoLake Hi Enriquem, How do I change the timeframe from 'Daily' to "5 min"? Thank you.
robertogozzi I suggest that you open a new topic in the ProScreener support forum. Thank you.
massimo.g. questo screener si può usare anche sul mercato Azinario ?
robertogozzi Like my screener https://www.prorealcode.com/prorealtime-market-screeners/abcd-pattern-scree...
aldtrading Thanks for your work. I'm using V11 and nothing is drawn on the chart, I believe this is ...
robertogozzi It works on v10.3, v11 and v12. You are likely to have added it BELOW your chart (like RSI),...
Globalmarkets79 Thank you Vonasi for the answer. I have an other question. When i tried to run the indicator...
Vonasi Lines is either 0 or 1 to turn on or off the drawing of them. Once again if you download and...
Globalmarkets79 Thank you Vonasi, this indicator is very helpful!!!
Nicolas
5 years ago
Tradingrob Hi Nicolas, i am not that of a coder.. Did you make already a new PRC so we can download the...
Tradingrob Was easier than i thought! thanks! it works now great!
falco44 Bonjour Nicolas, L'indicateur n'affiche rien, peux tu m'aider stp ?
Wolf I don't know why the indicator does not work for me. It gives me an error about RETURN... ...
sergibilbo Great job thanks!!!
druby I was glancing through the code and noticed that the variable name, Middle' has been used. I...
Dari when I put the indicator does not put it on the price, sn in a new box like many indicators....
Nicolas by adding it on price instead. Use the wrench on the left upper side of your price chart.

Top