Historical Volatility x Watchlist - Indicator - Claudio61

Collapse
X
 
  • Ora
  • Show
Clear All
new posts
  • Andrea Cagalli
    Senior Member
    • Oct 2010
    • 3995

    #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.

    Codice:
    # 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)
    Manuale beeTrader
Working...