Correction And Surge Indicator

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #58818 quote
    Ivan Donatiello
    Participant
    Average

    Hello everyone Ivan Here,

    I am studying Kirk Northington’s book “Volatility-Based Technical Analysis: Strategies for Trading the Invisible” 2009 USA.

    I am intrigued about an indicator called Correction And Surge.

    The indicator is used for the stock exchange and indices. The formula is simple.

    For the Correction:

    Correction = downhill Stock Exchange / Moving Average (Total stock in index)

    due Total stock in index is = (uphill stock exchange + downhill stock exchange + stock exchange unchanged)

     


    For the Surge:

    Surge  = uphill Stock Exchange / Moving Average (Total stock in index)

    due Total stock in index is = (uphill stock exchange + downhill stock exchange + stock exchange unchanged)

     

    The calculation should not be difficult, in theory it should come out a ratio that goes from 0 to 1. However I have no idea how to recall the data in the Probuilder programming.

    It would be a good idea to have the drawings showing the Correction or Surge signal come out on the chart. The indicator must be able to work both on the stock exchange and indices.

    If necessary, I have the code for TradeStation.

    Thanks a lot if we can program this is good for everyone 🙂

    #59053 quote
    Nicolas
    Keymaster
    Master

    Not possible to code this indicator, because ProBuilder don’t have any multi instruments capability, sorry.

    #59317 quote
    Ivan Donatiello
    Participant
    Average

    Then we can engage ourselves to identify this signal in a similar way.

    For example, we could quantify in% the range between the opening and closing price, evaluate it in some way to find the bull or bear correction thrust.

    I take a pen and paper and try to pull down an equation 🙂

    #59319 quote
    Ivan Donatiello
    Participant
    Average

    In this formula I thought of a simple principle, that is the summation of the last n periods, to frame the anomalous cases of volatility that may indicate volumes in correction. Then I looked for a multiplier of the sum of the ranges to differentiate between short and long cases, everyone will do the backtests to get the data.

    FORMULA = (Sum N Range / N) * Multiplier

    The short and long cases have been differentiated.

    Here is the code, but it would be nice to tell the program not to show further signs in N days later. Example: After the signal do not give other signals for 5 days.

    It can be done ? 🙂

    //https://www.prorealcode.com/topic/volatility-support-resistance-indicator/
    //Ivan @ prorealcode.com
    
    //periods definition
    period = 20
    
    //Rules Definition
    x1 = range > (summation[period](range)/period)*1.2 AND Open < Close
    x2 = range > (summation[period](range)/period)*1.5 AND Open > Close
    
     
    //bull signal text
    if x1 then 
    DRAWTEXT("Bull", barindex, low-40, Dialog, Bold, 12) COLOURED(10,255,10,255)
    endif
    
    //bear signal text
    
    if x2 then
    DRAWTEXT("Bear", barindex, high+40, Dialog, Bold, 12) COLOURED(255,10,10,255)
    endif
    
    //bull signal arrow
    if x1 then
    DRAWARROWUP(barindex,LOW-10)coloured(10,255,10)
    endif
    
    //bear signal arrow
    if x2 then
    DRAWARROWDOWN(barindex,high+10)coloured(255,10,10)
    endif
     
    return
    Nicolas thanked this post
    #59320 quote
    Nicolas
    Keymaster
    Master

    Good idea, please post some pictures examples if you can. Would engage more people. Have a nice weekend.

    #59346 quote
    Ivan Donatiello
    Participant
    Average
    The indicator at present is as shown in the attached picture.

    You need to add at least one filter, which says:

    – Once the signal occurs, do not give other signals for the next n (for exalple 5 foolowing days) following days.

    Let’s start with this, to finish the first version then I have some ideas to improve it again.

    Thanks and have a nice weekend everyone 🙂

    Nicolas thanked this post
    #59354 quote
    Nicolas
    Keymaster
    Master

    Once the signal occurs, do not give other signals for the next n (for exalple 5 foolowing days) following days.

    Ok, let’s do it:

    //https://www.prorealcode.com/topic/volatility-support-resistance-indicator/
    //Ivan @ prorealcode.com
    
    //periods definition
    period = 20
    
    //Rules Definition
    x1 = range > (summation[period](range)/period)*1.2 AND Open < Close
    x2 = range > (summation[period](range)/period)*1.5 AND Open > Close
    
     
    //bull signal text
    if x1 and barindex-lastx1bar>=5 then
    DRAWTEXT("Bull", barindex, low-40, Dialog, Bold, 12) COLOURED(10,255,10,255)
    DRAWARROWUP(barindex,LOW-10)coloured(10,255,10)
    lastx1bar = barindex
    endif
    
    //bear signal 
    if x2 and barindex-lastx2bar>=5 then
    DRAWTEXT("Bear", barindex, high+40, Dialog, Bold, 12) COLOURED(255,10,10,255)
    DRAWARROWDOWN(barindex,high+10)coloured(255,10,10)
    lastx2bar = barindex
    endif
    
    return
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Correction And Surge Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Nicolas
8 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/10/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...