//@version=1
//Defining Title and Name of Pine Script
study(“Explosive Candles”, overlay=true)
//————————————————————-
// Script for Boring Candles
// Part 1: taking user input
// Part 2: Defining Variable and performing calculation
// Part 3: giving BLUE color to candle based on calculation
BcB_Ratio = input(60, title=”Boring Candle Body <=(%)”,minval=5, maxval=95)
C2BR=(abs(open-close)*100/abs(high-low))
//————————————————————-
// Script for Explosive Candles
// Part 1: taking user input
// Part 2: Defining Variable and performing calculation
// Part 3: giving BLUE color to candle based on calculation
mp = input(1.5, title=”Multiplier for Explo.Mov.”,type=float)
ratio = input(60, title=”Range-Body Ratio for Explo.Mov.”)
cand = input(100, title=”Average Number of Candles for Explo.Mov.”)
range = atr(cand)
candr = abs(high-low)
bodyr = abs(open-close)
barcolor((bodyr/candr)>=ratio/100 and candr>=(range*mp) ? black:na, title=”Explosive Move”)