taylor_o

vol_signal

taylor_o Aktualisiert   
Note: This description is copied from the script comments. Please refer to the comments and release notes for updated information, as I am unable to edit and update this description.

----------

USAGE

This script gives signals based on a volatility forecast, e.g. for a stop
loss. It is a simplified version of my other script "trend_vol_forecast", which incorporates a trend following system and measures performance. The "X" labels indicate when the price touches (exceeds) a forecast. The signal occurs when price crosses "fcst_up" or "fcst_down".

There are only three parameters:

- volatility window: this is the number of periods (bars) used in the
historical volatility calculation. smaller number = reacts more
quickly to changes, but is a "noisier" signal.
- forecast periods: the number of periods for projecting a volatility
forecast. for example, "21" on a daily chart means the plots will
show the forecast from 21 days ago.
- forecast stdev: the number of standard deviations in the forecast.
for example, "2" means that price is expected to remain within
the forecast plot ~95% of the time. A higher number produces a
wider forecast.

The output table shows:

- realized vol: the volatility over the previous N periods, where N =
"volatility window".
- forecast vol: the realized volatility from N periods ago, where N =
"forecast periods"
- up/down fcst (level): the price level of the forecast for the next
N bars, where N = "forecast periods".
- up/down fcst (%): the difference between the current and forecast
price, expressed as a whole number percentage.

The plots show:

- blue/red plot: the upper/lower forecast from "forecast periods" ago.
- blue/red line: the upper/lower forecast for the next
"forecast periods".
- red/blue labels: an "X" where the price touched the forecast from
"forecast periods" ago.
+ NOTE: pinescript only draws a limited number of labels.
They will not appear very far into the past.
Versionshinweise:
- Changed some variable names around (see comments).
- Added fcst_up_pct/fcst_down_pct as plots for emitting as alerts.
- Fixed table label cells/coloring.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?