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.
1 2 3 4 5 6 7 8 9 10 11 |
//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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
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!
The “threshold” parameter should be adapted to the instrument, for Forex, use 0.01 as mentioned in the code.
Thanks mate, how about 0.001? Or is that too sensitive?
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.
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.
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\"
Thanks Maz, I’ll have a look tomorrow.