Can anyone take my code and adjust it into a scanner please?
I only take trades when the hurst is triggered and it is ABOVE the 200sma for longs. For shorts its just the opposite.
This study can make you a lot of money when used properly. Never go long if a stock is below the 200sma. And never go short if a stock is above the 200sma. This works well on 5min to 1hr charts. Some symbols require you tweak the settings a little. I did not create this study I just edited it to my specifications. Thank you.
here is the study..................
I only take trades when the hurst is triggered and it is ABOVE the 200sma for longs. For shorts its just the opposite.
This study can make you a lot of money when used properly. Never go long if a stock is below the 200sma. And never go short if a stock is above the 200sma. This works well on 5min to 1hr charts. Some symbols require you tweak the settings a little. I did not create this study I just edited it to my specifications. Thank you.
here is the study..................
Code:
declare lower;
input price = hl2;
input length = 10;
input InnerValue = 1.6;
input OuterValue = 2.6;
input ExtremeValue = 4.2;
def displacement = (-length / 2) + 1;
def dPrice = price[displacement];
rec CMA = if !IsNaN(dPrice) then Average(dPrice, AbsValue(length)) else CMA[1] + (CMA[1] - CMA[2]);
#Rev 2: improved FlowPrice for better extremes
#def OscValue = if close > close[1] then high else if close < close[1] then low else (high + low)/2;
def OscValue =
if high >= high[1] and low <= low[1]
then
if close >= close[1] # high >= high[2]
then high
else low
else
if high > high[1]
then high
else
if low < low[1]
then low
else
if close > close[1]
then high
else
if close < close[1]
then low
else (high + low) / 2;
plot HurstOsc = (100 * OscValue / CMA) - 100;
HurstOsc.SetDefaultColor(GetColor(1));
HurstOsc.SetLineWeight(2);
plot CenterLine = 0;
plot UpperExtremeBand = ExtremeValue;
plot LowerExtremeBand = - ExtremeValue;
plot UpperOuterBand = OuterValue;
plot LowerOuterBand = - OuterValue;
plot UpperInnerBand = InnerValue;
plot LowerInnerBand = - InnerValue;
CenterLine.SetDefaultColor(GetColor(7));
CenterLine.SetLineWeight(1);
UpperExtremeBand.SetDefaultColor(GetColor(4));
UpperExtremeBand.SetLineWeight(1);
LowerExtremeBand.SetDefaultColor(GetColor(4));
LowerExtremeBand.SetLineWeight(1);
UpperExtremeBand.hide();
LowerExtremeBand.hide();
UpperOuterBand.SetDefaultColor(GetColor(5));
UpperOuterBand.SetLineWeight(1);
LowerOuterBand.SetDefaultColor(GetColor(6));
LowerOuterBand.SetLineWeight(1);
UpperInnerBand.SetDefaultColor(GetColor(5));
UpperInnerBand.SetLineWeight(1);
UpperInnerBand.SetStyle(Curve.SHORT_DASH);
LowerInnerBand.SetDefaultColor(GetColor(6));
LowerInnerBand.SetLineWeight(1);
LowerInnerBand.SetStyle(Curve.SHORT_DASH);
# Turn AddClouds off by putting a #-sign at the first position of the lines
AddCloud(UpperOuterBand, UpperInnerBand, color.red);
AddCloud(LowerInnerBand, LowerOuterBand, color.green);
Alert(HurstOsc <= -2.6, "DK LOOK!!!!!!", Alert.BAR, Sound.RING);
# --- script end ----
Last edited by a moderator: