Tiredoflosing
Member
Hi everyone,
Im sharing Doctor Stephen Harlins work he shared on his Twitter. He can be found here on Twitter. His posts are of tremendous value.
The tweet containing this work is here & here
According to him
" I'm sharing this code purely for educational purposes. Please don't trade this without fully understanding it. And I can't teach individuals how to import studies into ThinkorSwim or troubleshoot your platform, etc.
(2/3) The concept works best on a tick chart for reasons beyond the scope of this tweet. The study just says, "Show me (highlight) price bars that are above average in volume and price range, that also push the close well off of the high(selling press) or low (buying press)."
(3/3) That would highlight/infer the presence of "aggressive" orders. The white-tagged price bars display when the above conditions are met - plus an extreme in a high or low falls outside of a stDev calc (modif'd Bollinger Band). A forthcoming tweet will compliment this.
It looks like this.
FYI im simply sharing his work so the community can possibly benefit, I haven't gotten a chance to take it for a spin live.
Im sharing Doctor Stephen Harlins work he shared on his Twitter. He can be found here on Twitter. His posts are of tremendous value.
The tweet containing this work is here & here
According to him
" I'm sharing this code purely for educational purposes. Please don't trade this without fully understanding it. And I can't teach individuals how to import studies into ThinkorSwim or troubleshoot your platform, etc.
(2/3) The concept works best on a tick chart for reasons beyond the scope of this tweet. The study just says, "Show me (highlight) price bars that are above average in volume and price range, that also push the close well off of the high(selling press) or low (buying press)."
(3/3) That would highlight/infer the presence of "aggressive" orders. The white-tagged price bars display when the above conditions are met - plus an extreme in a high or low falls outside of a stDev calc (modif'd Bollinger Band). A forthcoming tweet will compliment this.
It looks like this.
FYI im simply sharing his work so the community can possibly benefit, I haven't gotten a chance to take it for a spin live.
Code:
plot zero = 0;
zero.setdefaultcolor(color.black);
addlabel(yes," Aggressive Buy ",createcolor(82,202,22));
addlabel(yes," Aggressive Sell ",color.red);
addlabel(yes," Stat Outlier ", color.white);
addlabel(yes," Overnight ", createcolor(60,80,120));
def seconds = SecondsFromTime(0);
def time = SecondsTillTime (1600);
def minutes = seconds / 3600;
def RTH = minutes > 8 and minutes < 16.5;
def sDev = StDev(data = close, 20);
def mid = MovingAverage(AverageType.SIMPLE, close, 20);
def lowerBand = mid -1 * sDev;
def upperBand = mid - (-1.918) * sDev;
def range = AbsValue(open - close);
def WAvg = WildersAverage(range, 20);
def avgVolume = ExpAverage(volume,50);
def bp= (close - low)/(high - low) > 0.75;
def sp = (high - close)/(high - low) > 0.75;
def up = close > open and range > Wavg and volume > avgVolume and bp;
def dn = close < open and range > wavg and volume > avgVolume and sp;
plot hiupvol = if up and !up[1] then round(volume/1000,0) else double.nan;
hiupvol.setpaintingstrategy(paintingstrategy.values_below);
hiupvol.setdefaultcolor(color.green);
hiupvol.assignvaluecolor(if low < lowerBand and range > wavg and volume > avgVolume and bp then color.white else color.current);
hiupvol.hidetitle();
plot hidnvol = if dn and !dn[1] then round(volume/1000,0) else double.nan;
hidnvol.setpaintingstrategy(paintingstrategy.values_above);
hidnvol.setdefaultcolor(color.red);
hidnvol.assignvaluecolor(if high > upperBand and range > wavg and volume > avgVolume and sp then color.white else color.current);
hidnvol.hidetitle();
DefineGlobalColor("color1", createcolor(0,132,193)) ;
DefineGlobalColor("color2", color.green) ;
DefineGlobalColor("color3", color.red) ;
DefineGlobalColor("color4", createcolor(60,80,120)) ;
assignpricecolor(if RTH and !up and !dn then GlobalColor("color1") else if up then GlobalColor("color2") else if dn then GlobalColor("color3") else GlobalColor("color4"));
Last edited by a moderator: