Nicolas

Normalized Candlesticks (stochastic candles)

Category: Indicators By: Nicolas Created: October 25, 2016, 4:33 PM
October 25, 2016, 4:33 PM
Indicators
3 Comments
Normalized Candlesticks (stochastic candles)

This indicator is a normalized price representation made with candlesticks. The dynamic scale between 0 and 100% is calculated upon the last X periods (50 periods in the code, you can change it at will).  It can be used to detect price exhaustion in a trend of continuation if the candlesticks remains above the 50% level.

Another utility is the use of the different levels that could be changed to Fibonacci levels for examples (23.6% 38.2% etc.) and detect rebounds of breakout of these levels.

PRT 10.3 compatible only because of the use of the DRAWCANDLE function.

Coded by request on the French forum (french video that explain the development process of the normalized candlesticks).

//PRC_CandlesticksStochastic | indicator
//25.10.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

period = 50

//lastest highhest high and lowest low over "period"
hh = highest[period](high)
ll = lowest[period](low)
scale = hh-ll

//dynamic OHLC (percentile rank)
dynO = ((open-ll)/scale)*100
dynH = ((high-ll)/scale)*100
dynL = ((low-ll)/scale)*100
dynC = ((close-ll)/scale)*100

//candle color
if open>close then
 r = 255
 g = 0
else
 r = 0
 g = 255
endif

//draw candlesticks
DRAWCANDLE(dynO,dynH,dynL,dynC) coloured(r,g,0)// BORDERCOLOR(0,0,0)

return 20 as "20% level", 50 as "50% level", 80 as "80% level"

Download
Filename: PRC_CandlesticksStochastic.itf
Downloads: 199
Download
Filename: candlesticks-stochastic.png
Downloads: 60
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

Nwab
7 years ago
#

Hello Mr Nicolas.. Please how can I set this up as an indicator to work on mt5. Your guidance is much needed. Thanks

Madrosat
8 years ago
#

Bonjour Nicolas Je souhaiterais faire colorier le fond du graphique supérieur en vert lorsque le close est inférieur a 20 et le faire colorier en rouge lorsque le close est supérieur à 80 ,j'ai essayé mais sans succès peux tu m'aider??

Nicolas
8 years ago
#

Merci d'ouvrir un sujet dans le forum approprié.

ProRealCode ProRealCode
Loading...