OPEN-SOURCE SCRIPT

WhipLash

Actualizado
This is a study to determine if small candle bodies (little difference between open and close), regardless of overall candle length (high/low), can be used to filter choppy markets.

The indicator will calculate the selected average "MA Mode" of (close-open). To standardize this result and ensure any filters/thresholds do not need to be recalculated for each instrument the result will be used to calculate the Z Score.

The idea is that when candle bodies are small there is very little actual price movement, and therefore price is choppy. When considering the Z Score of that result, any outliers ie larger candle bodies, could show a potential trend forming. This indicator is similar to QStick but allows more customization by the user.

MA Mode determines which MA is used to smooth the results of (close-open)

Price Smoothing is the number of running periods the MA Mode is calculated for.

The three Thresholds are preset to the 90%, 95%, and 99% levels for Z Score. If these thresholds are altered you may wish to also alter the horizontal lines programmed for each level on the positive and negative sides.

The Z Length is the period for which the Z Score is calculated

Multiple MA Options Credits to Fractured
Bits and Pieces from alexgrover, montyjus, and jiehonglim

As always, trade at your own risk.
Notas de prensa
Added alerts programming. There are now six built in alert functions. Three LONG alerts, and three SHORT alerts that are based on price breaching a threshold level. These threshold levels correspond to the threshold levels built into the script.

Threshold 1 will alert if price breaches Threshold 1 but not Threshold 2
Threshold 2 will alert if price breaches Threshold 2 but not Threshold 3
Threshold 3 will alert if price is greater than Threshold 3

You may program these for LONG and SHORT price movements. Note: you MUST set the Threshold levels PRIOR to setting the alert.

Strongly recommend selecting "ONCE PER BAR CLOSE" as price may move the indicator while the candle is open above or below the threshold as the calculation is based on CLOSE price.

You will likely receive a "REPAINTER" alert. After reviewing the PineScript repainter information this is likely due to the fact EMAs are used within the calculation. I have not noticed the indicator changing previously recorded data EXCEPT for the OPEN candle (which is normal when close price is utilized).

Utilize all 6 or 1, whatever works best for your system.

As always, trade at your own risk.
Notas de prensa
No changes to code simply republishing as I forgot to update the chart view prior to most recent update.
Notas de prensa
Added alert conditions for indicator crossing zero by request. This can be used to prepare for an entry, or used as an exit for an open trade.

This script has not been optimized for all instruments. You will want to find the best settings for your needs.

Alert information is included in previous update regarding how to program.

As always, trade at your own risk.
Centered OscillatorsCHOPChoppiness Index (CHOP)nnfxQstick IndicatorStandard DeviationstandardizationtrendtrendtradingVolatilityz-scorezscore

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


También en:

Exención de responsabilidad