Nicolas

Volatility scalper indicator

Category: Indicators By: Nicolas Created: October 13, 2015, 5:35 PM
October 13, 2015, 5:35 PM
Indicators
7 Comments
Volatility scalper indicator

This indicator is sensing the high volatility of market price. It reflects when the market makes big moves on the same bar. I think it can be applied to any timeframe, but i have a better feeling on applying it on higher timeframe on forex pairs. Nevertheless, it would also make the job on any market, but the treshold parameter would be adapt to point/decimal of the item you would trade.

//Parameters : 4 hours timeframe on Forex : treshold = 0.01

if(close-close[1])>0 THEN
    upsidevol = averagetruerange[1]+(averagetruerange[1]-averagetruerange[2])*0.5
    downsidevol = 0
ELSE
    upsidevol = 0
    downsidevol = averagetruerange[1]+(averagetruerange[1]-averagetruerange[2])*0.5
ENDIF

RETURN upsidevol as "up", downsidevol as "down", treshold as "treshold"

 

 

 

Download
Filename: Volatility-scalper.itf
Downloads: 192
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Maz
Maz
9 years ago
#

I actually like this very simple idea. It can also be useful for market micro-structure systems (seconds and milliseconds) when used in conjunction with other filters. 

I have introduced an automatic threshold parameter with smoothing and vertical shift controls. 

// Volatility Scalper
// Version 1.2
// --

// Variables
//  threshATRPeriod = 40
//  smoothing = 2
//  verticalShiftPercent = 0
// --

threshATRPeriod = max(1, threshATRPeriod)
smoothing       = max(1, smoothing)

diff = averagetruerange[1] - averagetruerange[2]
if(close-close[1])>0 THEN
upsidevol = averagetruerange[1] + diff * 0.5
upsideVol = max(upsideVol, 0)
downsidevol = 0
ELSE 
upsidevol = 0
downsidevol = averagetruerange[1] + diff * 0.5
downsideVol = max(downsideVol, 0)
ENDIF

t = DEMA[smoothing](AverageTrueRange[threshATRPeriod])
t = t + (t*(verticalShiftPercent/100))

RETURN upsidevol coloured(150, 200, 100) style(histogram, 1) as "up" , downsidevol coloured(200, 150, 100) style(histogram, 1) as "down", t as "treshold"

 

Nicolas
9 years ago
#

Thanks Maz, I'll have a look tomorrow.

Sofitech
10 years ago
#

Bonjour. J'aimerais savoir s'il est possible de "truquer" un peu l'indicateur pour qu'il donne le résultat sur timeframe plus important que celui affiché... bref de contourner la limitation MTF de PRT pour cet indicateur.

Dimi.A
10 years ago
#

Thanks mate, how about 0.001? Or is that too sensitive?

Nicolas
10 years ago
#

Depends of which pair you are trading and the actual volatility. Since it is not calculated dynamically, you have to set it with a value that suits to the market.

Dimi.A
10 years ago
#

Hey Nic, is there any issue with the indicator on your end with different pairs. I'm not sure what settings I should be using. Could you please provide your settings?

Thanks mate!

Nicolas
10 years ago
#

The "threshold" parameter should be adapted to the instrument, for Forex, use 0.01 as mentioned in the code.

ProRealCode ProRealCode
Loading...