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 🙂
Not possible to code this indicator, because ProBuilder don’t have any multi instruments capability, sorry.
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 🙂
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
Good idea, please post some pictures examples if you can. Would engage more people. Have a nice weekend.
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