-
16-10-13, 11:17 #1
Historical Volatility x Watchlist - Indicator - Claudio61
Ho creato questo piccolo script per individuare i livelli di volatilità velocemente sulla Watchlist.
30 periodi su 90 e 30 su 60 .... quando il valore è positivo la 30 periodi è più alta e quindi il titolo può essere preso in considerazione per valutare una strategia.
1234567891011121314# Assign the indicator values to the PLOTx variables like in the following example:
# SET PLOT1 = SimpleMovingAverage(CLOSE, 14)
INPUTS
:
@price(CLOSE), @periods(15), @bars(365), @deviations(2)
SET
A =
HistoricalVolatility
(
@price, 30, @bars, @deviations)
SET
B =
HistoricalVolatility
(
@price, 60, @bars, @deviations)
SET
C =
HistoricalVolatility
(
@price, 90, @bars, @deviations)
SET
PLOT1
= A - C
SET
PLOT2
= A - B
SET
PLOTCOLOR1
=
IF
(
PLOT1
>
0
,
COLOR_DARK_GREEN
,
COLOR_RED
)
SET
PLOTCOLOR2
=
IF
(
PLOT2
>
0
,
COLOR_DARK_GREEN
,
COLOR_RED
)