Scheduled Event Volatility Indicator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34273 quote
    Maz
    Participant
    Veteran

    Hi all,

    Was hoping to put together a useful indicator that highlights routine events / scheduled and expected volatility. I’ve made a start (very rough code below and ITF attached). So far I’ve included:

    • NFP (first friday of evey month)
    • Triple Witching (Third friday of every quarter’s last month)

    Events can be checked or unchecked on and off. Could also include a showTime option which shows it just at the expected time but then wee need to take time zones into account. For 10.3 users could also make it write on the price graph?

    Please feel free to contribute to this by adding your scheduled events and please post your updated versions here.

    All the best,

    M

     

    Code:

    // showTripleWitching = 1
    // showNFP = 1
    
    once countFridays = 0
    
    firstDayOfMonth = (day = 1)
    isFriday  = (dayOfWeek = 5)
    firstWeek = (day < 8)
    
    if firstDayOfMonth then
    countFridays = 0
    endif
    if isFriday and (not isFriday[1]) then
    countFridays = countFridays + 1
    endif
    
    
    // Non Farm Payrolls
    nfpDay    = isFriday and firstWeek
    
    // Triple Witching
    isMarch = (Month = 3)
    isJune = (Month = 6)
    isSept = (Month = 9)
    isDec  = (Month = 12)
    tripleWitchingMonth = isMarch or isJune or isSept or isDec
    thirdFriday = isFriday and countFridays = 3
    tripleWitching = thirdFriday and tripleWitchingMonth
    
    if not showNFP then
    nfpDay = undefined
    endif
    if not showTripleWitching then
    tripleWitching = undefined
    endif
    
    return nfpDay style(histogram) as "Non Farm Payrolls Day", tripleWitching style(histogram) as "Triple Witching Day"
    
    
    
    scheduled-event-indicator.png scheduled-event-indicator.png Scheduled-Event-volatility.itf
    #34332 quote
    AutoStrategist
    Participant
    Veteran

    Thanks Maz, I keep getting caught out by these events so no excuses now!  Tried 5 of my automated systems with this on and off and it reduced the returns for all of them, with only breakout and trend following showing slight improvements in win rate and gain/loss ratio.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Scheduled Event Volatility Indicator


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Maz @eqmaz Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by AutoStrategist
8 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/02/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...