Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccurtin/466df7cf97dcf3c7450f52ae9d6b631f to your computer and use it in GitHub Desktop.
Save ccurtin/466df7cf97dcf3c7450f52ae9d6b631f to your computer and use it in GitHub Desktop.
input Deviation_Length = 60;
input Deviate = 2;
input high_price = high;
def volumestdev = RelativeVolumeStDev(length = Deviation_Length);
def abovedev = volumestdev >= Deviate;
def belowdev = volumestdev <= Deviate;

def volumereplace = volume;
def increase = volume > volume[1];
def devincrease = increase and abovedev;
def decrease = volume < volume[1];
def devdecrease = decrease and abovedev;

def isOverFivePercent = close > open * 1.05;

def last = close;

def up = Highest(high_price, 1);

def smallWick = (up * .90);

def hasSmallWick = last > smallWick;

plot Data = isOverFivePercent 
&& devincrease
&& hasSmallWick
&& close > open
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment