Murrey's Math Trend System for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
This indicator was created & developed by Ucsgears, based on Murrey Math Line Principle.

Hello, Murrey Math lovers, Thanks for those who showed interest on this. Based on a request, I have updated the plot / candle coloring, for Version - 2. This has been in the queue for a while. There was a Glitch found with the Multiplier. Will Fix in the next version. The Current Version (and the previous version) only supports 1/8 fractions. Will not support 0.25. The code needs to be updated, to automate the fractal line glitches for other ratios, Planned for future update. Good Luck and Enjoy the Colorful Oscillator. Please keep your suggestions flowing. Lets make it better.

C0H4lDw.png

AwmtIa5.png


Script #1: Simple. No lower study. Just paint bars (green = bullish and red = bearish)

Code:
# Murrey's Math Oscillator
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/VQPnbiQd-UCS-Murrey-s-Math-Oscillator-V2/

# This is a stripped down or the original version. No lower study. Just simple paint bars.

input length = 100;
input mult = 0.125;

def hi = highest(high, length);
def lo = lowest(low, length);
def range = hi - lo;
def multiplier = (range) * mult;
def midline = lo + multiplier * 4;

def oscillator = (close - midline) / (range / 2);

def a = oscillator > 0 and oscillator<mult*2;
def b = oscillator > 0 and oscillator < mult*4;
def c = oscillator > 0 and oscillator < mult*6;
def d = oscillator > 0 and oscillator < mult*8;

def z = oscillator < 0 and oscillator > -mult*2;
def y = oscillator < 0 and oscillator > -mult*4;
def x = oscillator < 0 and oscillator > -mult*6;
def w = oscillator < 0 and oscillator > -mult*8;

assignPriceColor(if a or b or c or d then color.green else if w or z or y or x then color.red else color.white);

Script #2: Just paint bars. No lower study. But with color variations added.

Code:
# Murrey's Math Oscillator
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/VQPnbiQd-UCS-Murrey-s-Math-Oscillator-V2/

# This is also a stripped down version. But it has color variations for paint bars.

input length = 100;
input mult = 0.125;

def hi = highest(high, length);
def lo = lowest(low, length);
def range = hi - lo;
def multiplier = (range) * mult;
def midline = lo + multiplier * 4;

def oscillator = (close - midline) / (range / 2);

def a = oscillator > 0 and oscillator<mult*2;
def b = oscillator > 0 and oscillator < mult*4;
def c = oscillator > 0 and oscillator<mult*6;
def d = oscillator > 0 and oscillator < mult*8;

def z = oscillator < 0 and oscillator > -mult*2;
def y = oscillator < 0 and oscillator > -mult*4;
def x = oscillator < 0 and oscillator > -mult*6;
def w = oscillator < 0 and oscillator > -mult*8;

assignPriceColor(if a then CreateColor(173, 255, 47) else if b then CreateColor(50, 205, 50) else if c then CreateColor(60, 179, 113) else if d then CreateColor(0, 128, 0) else if z then CreateColor(205, 92, 92) else if y then CreateColor(250, 128, 114) else if x then CreateColor(255, 160, 122) else if w then CreateColor(255, 0, 0) else color.white);

Script #3: Complete version. Just like the original script from TradingView.

Code:
# Murrey's Math Oscillator
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/VQPnbiQd-UCS-Murrey-s-Math-Oscillator-V2/

declare lower;

input length = 100;
input mult = 0.125;

def hi = highest(high, length);
def lo = lowest(low, length);
def range = hi - lo;
def multiplier = (range) * mult;
def midline = lo + multiplier * 4;

def oscillator = (close - midline) / (range / 2);

def a = oscillator > 0 and oscillator<mult*2;
def b = oscillator > 0 and oscillator < mult*4;
def c = oscillator > 0 and oscillator<mult*6;
def d = oscillator > 0 and oscillator < mult*8;

def z = oscillator < 0 and oscillator > -mult*2;
def y = oscillator < 0 and oscillator > -mult*4;
def x = oscillator < 0 and oscillator > -mult*6;
def w = oscillator < 0 and oscillator > -mult*8;

plot histogram = oscillator;
histogram.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
histogram.AssignValueColor(if a then CreateColor(173, 255, 47) else if b then CreateColor(50, 205, 50) else if c then CreateColor(60, 179, 113) else if d then CreateColor(0, 128, 0) else if z then CreateColor(205, 92, 92) else if y then CreateColor(250, 128, 114) else if x then CreateColor(255, 160, 122) else if w then CreateColor(255, 0, 0) else color.white);

plot upper_l1 = mult*6;
plot upper_l2 = mult*8;
plot lower_l1 = -mult*6;
plot lower_l2 = -mult*8;

upper_l1.AssignValueColor(color.gray);
upper_l2.AssignValueColor(color.gray);
lower_l1.AssignValueColor(color.gray);
lower_l2.AssignValueColor(color.gray);

AddCloud(upper_l1, upper_l2, color.orange, color.orange);
AddCloud(lower_l1, lower_l2, color.lime, color.lime);

#assignPriceColor(if a or b or c or d then color.green else if w or z or y or x then color.red else color.white);

assignPriceColor(if a then CreateColor(173, 255, 47) else if b then CreateColor(50, 205, 50) else if c then CreateColor(60, 179, 113) else if d then CreateColor(0, 128, 0) else if z then CreateColor(205, 92, 92) else if y then CreateColor(250, 128, 114) else if x then CreateColor(255, 160, 122) else if w then CreateColor(255, 0, 0) else color.white);
 

J007RMC

Well-known member
2019 Donor
Ive read on Murry's lines where each line is proportional to 1/8. from what I can tell
Oscillator Color Definition -
Green = Above MidLine
Red = Below Midline
Blue = Below Negative 3rd Quadrant
Orange = Above Positive 3rd Quadrant
 
Last edited:

diazlaz

Well-known member
2019 Donor
VIP
based on research and some testing, I find in the lower time frame, it does a pretty good job finding tops and bottoms on OB and OS conditions.

if oscillator crosses below (mult * 6) then short else
if oscillator crosses above (-mult * 6) then long.

if anyone has any other test results or experiences please share.
 

john3

Active member
2019 Donor
Apart from circles, speed lines, and frames, Murrey math is the same as Fibonacci ratios.
 

Lambert58

New member
Do we have the original Murrey math with all of the levels for TOS, the video's for the original are extensive and detailed. The levels make the application clearer for me.

Thanks
 

john3

Active member
2019 Donor
@Lambert58 Thank you for the video. I've seen it before. I thought maybe you were talking about a video that I haven't seen.

That and all other videos/discussions of Murrey Math/Fibs miss several key points, i.e., they don't discuss progression and how the price interacts with key injection pivots.
 

TK_44

New member
@Lambert58 Are you pretty familiar with murrey math? I have been checking into this and can't seem to figure out how the lines are technically supposed to be drawn. What defines the 0/8 and 8/8 range? Where do they start from, or in other words what defines the high-low range? From what I can tell it can't be a simple high-low range of a look back period of 100 like in this indicator because it doesn't allow +1/8, +2/8, -1/8, -2/8, etc. levels.
 
I've noticed in other codes that whenever Highest(price,length) and Lowest(price,length) are used, they're usually done like Highest(price,length)[1] and Lowest(price,length)[1]. Will keeping it as is without the brackets at the end cause it to repaint? Just want to make sure it doesn't repaint.
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
Yet another version of Murray Math
Ruby:
# Murrey Math Lines
# Mobius
# V01.11.01.2017
# Chat Room Request

def h = high(period = aggregationPeriod.Day)[1];
def l = low(period = aggregationPeriod.Day)[1];
def sqH = sqr(sqrt(Round(h/10, 0) * 10));
def sqL = sqr(sqrt(Round(l/10, 0) * 10));
def Adj_sqL = if sqL >= l
              then sqr(sqrt(sqL))
              else if Adj_sqL[1] == sqH
              then fold i = 1 to 50
              while Adj_sqL[1] != sqH
              do sqr(Round(sqrt(AdJ_sqL[1]-1), 0))
              else if sqL != sqH
                   then sqL
          else Adj_sqL[1];
plot HIGH4 =  sqH; # (ultimate resistance)  = 8/8
plot HIGH3 = HIGH4 - ((sqH - sqL)/8); #(Strength test) = 7/8
plot HIGH2 = HIGH3 - ((sqH - sqL) / 8); #(Pivot / reverse) = 6/8
plot HIGH1 = HIGH2 - ((sqH - sqL) / 8); #(Inner range top) = 5/8
plot MIDPOINT = HIGH1 - ((sqH - sqL) / 8); #(Pivot point) = 4/8
plot LOW1 = MIDPOINT - ((sqH - sqL) / 8); #(Inner range bottom) = 3/8
plot LOW2 = LOW1 - ((sqH - sqL) / 8); #(Pivot  / reverse) = 2/8
plot LOW3 = LOW2 - ((sqH - sqL) / 8); #(Weakness test) = 1/8 
plot LOW4 = sqL; #(Ultimate support)  = 0/8
# End Code Murrey Math Lines
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
It is raining Murray Math, here is another:
Ruby:
#    Murrey Math Indicator with Adjustable Bubbles
#    Sept 16
#    some of the basics from the here and Yahoo user group,
#    SJ_MurrayMathFullRange / original on Yahoo -TOS
#    original notes potentially look like from StockJock,

#    Sept 18/11
#    Thanks to Eric, Kumobob, Richard Houser, and a whole bunch of guys @ thinkscripter.com
#    You guys really fly the TOS colors,
#    This is one of my first code postings to your site,
#    bring it back here as this is where some great users are,

#    I saw a Murray Math variation on a buddies system who uses AmiBroker,
#    did some quick checking on thinkscripter and yahoo, this is an update,
#    I'm not 100% sure of all the math, but it seems to match the Amibroker math,
#    and it seems to have a lot more functionality than they deliver,

#    R1V2
#    changed labels to make them smaller less intrusive,
#    added add//remove labels to take them away entirely,
#    added additional upper and lower dynamic ranges,
#    added today only Yes / No - try keep this screen clean,
#    added range to monitor (dynamic for the day as highs and lows are hit)
#    added timeframe, works in combinatin with monitor range,
#    added the Equity function for non - equity traders, (decimals),



#Hint Murray_Labels: will show all the lables,
#Hint Murray_OnlyToday: will display only today,
#Hint Murray_Autohide_Upper_Lower: will display the upper and lower potential support and resistance areas based on the current close reaching either the upper or lower pivot,
#Hint Murray_Range: specific time ranges to view,
#Hint Murray_timeFrame: this is important in combination with the range,
#Hint Murray_DataType: default is Equity so will be rounded to 2 decimal places, otherwise can use Forex, This is only used for S & R labels and easier screen presentation,
input Murray_Labels = Yes;
input Murray_OnlyToday = No;
input Murray_Range = {default "Regular Hours", "Today Opening", "Today HiLo", "Previous Range", "Screen HiLo"};
input Murray_timeFrame = {default Day, Week, Month, Year};
input Murray_DataType = {default "Equity", "Other"};

def Market_Open_Time = 0930;
def Market_Close_Time = 1615;

def day = GetDay();
def lastDay = GetLastDay();
def isToday = If(day == lastDay, 1, 0);
def shouldPlot = If(Murray_OnlyToday and isToday, 1, If(!Murray_OnlyToday, 1, 0));
def pastOpen = If((SecondsTillTime(Market_Open_Time) > 0), 0, 1);
def pastClose = If((SecondsTillTime(Market_Close_Time) > 0), 0, 1);
def marketOpen = If(pastOpen and !pastClose, 1, 0);
def firstBar = If (day[1] != day, day - 1, 0);


rec regHoursHigh = If(high > regHoursHigh[1] and marketOpen, high, If(marketOpen and !firstBar, regHoursHigh[1], high));

rec regHoursLow = If(low < regHoursLow[1] and marketOpen, low, If(marketOpen and regHoursLow[1] > 0 and !firstBar, regHoursLow[1], low));

def rangehigh;
def rangelow;
def type;

switch (Murray_Range) {
case "Previous Range":
    rangehigh = high(period = Murray_timeFrame)[1];
    rangelow  = low(period = Murray_timeFrame)[1];
    type = 1;
case "Today Opening":
    rangehigh = high(period = Murray_timeFrame);
    rangelow  = low(period = Murray_timeFrame);
    type = 2;
case "Regular Hours":
    rangehigh = regHoursHigh;
    rangelow = regHoursLow;
    type = 3;
case "Today HiLo":
    rangehigh = high(period = "day");
    rangelow = low(period = "day");
    type = 4;
case "Screen HiLo":
    rangehigh = HighestAll(high);
    rangelow = LowestAll(low);
    type = 5;
}


def RangeSize = AbsValue(rangehigh - rangelow);

def MMLevel8 = 8 / 8;
def MMLevel7 = 7 / 8;
def MMLevel6 = 6 / 8;
def MMLevel5 = 5 / 8;
def MMLevel4 = 4 / 8;
def MMLevel3 = 3 / 8;
def MMLevel2 = 2 / 8;
def MMLevel1 = 1 / 8;
def MMLevel0 = 0 / 8;

### if using Forex - remove the round function to get full decimal places,
# roundit(variable, 2) # number of decimels,

def MML8;
def MML7;
def MML6;
def MML5;
def MML4;
def MML3;
def MML2;
def MML1;
def MML0;
def UpperL2;
def UpperL1;
def LowerL1;
def LowerL2;

switch (Murray_DataType){
case "Equity":
    MML8 = rangehigh;
    MML7 = Round(rangelow + RangeSize * (MMLevel7), 1);
    MML6 = Round(rangelow + RangeSize * (MMLevel6), 1);
    MML5 = Round(rangelow + RangeSize * (MMLevel5), 1);
    MML4 = Round(rangelow + RangeSize * (MMLevel4), 1);
    MML3 = Round(rangelow + RangeSize * (MMLevel3), 1);
    MML2 = Round(rangelow + RangeSize * (MMLevel2), 1);
    MML1 = Round(rangelow + RangeSize * (MMLevel1), 1);
    MML0 = Round(rangelow, 2);
# added 2 upper and lower potential Murray S & R levels,
   UpperL2 = rangehigh + (RangeSize * 2 /8);
    UpperL1 = rangehigh + RangeSize / 8;
    LowerL1 = rangelow - RangeSize / 8;
    LowerL2 = rangelow - (RangeSize * 2 / 8);
case "Other":
    MML8 = rangehigh;
    MML7 = rangelow + RangeSize * (MMLevel7);
    MML6 = rangelow + RangeSize * (MMLevel6);
    MML5 = rangelow + RangeSize * (MMLevel5);
    MML4 = rangelow + RangeSize * (MMLevel4);
    MML3 = rangelow + RangeSize * (MMLevel3);
    MML2 = rangelow + RangeSize * (MMLevel2);
    MML1 = rangelow + RangeSize * (MMLevel1);
    MML0 = rangelow;
# added 2 upper and lower potential Murray S & R levels,
    UpperL2 = rangehigh + (RangeSize * 2 /8);
    UpperL1 = rangehigh + RangeSize / 8;
    LowerL1 = rangelow - RangeSize / 8;
    LowerL2 = rangelow - (RangeSize * 2 / 8);
}


plot Top;
plot Level7;
plot PivotUp;
plot Level5;
plot Mid;
plot Level3;
plot PivotDn;
plot Level1;
plot Base;


if Murray_OnlyToday
then {

    Top = Double.NaN;
    Level7 = Double.NaN;
    PivotUp = Double.NaN;
    Level5 = Double.NaN;
    Mid = Double.NaN;
    Level3 = Double.NaN;
    PivotDn = Double.NaN;
    Level1 = Double.NaN;
    Base = Double.NaN;

} else {

    Top = MML8;
    Level7 = MML7;
    PivotUp = MML6;
    Level5 = MML5;
    Mid = MML4;
    Level3 = MML3;
    PivotDn = MML2;
    Level1 = MML1;
    Base = MML0;
}

#plot UpperR2 = if type==1 then UpperL2 else Double.NaN;
#plot UpperR1 = if type==1 then UpperL1 else Double.NaN;
#plot LowerS1 = if type==1 then LowerL1 else Double.NaN;
#plot LowerS2 = if type==1 then LowerL2 else Double.NaN;

plot UpperR2 = UpperL2;
plot UpperR1 = UpperL1;
plot LowerS1 = LowerL1;
plot LowerS2 = LowerL2;

input n = 4;#Hint n: Move Chart Bubbles to right by "n" bars
def n1 = n - 1;
def TimeCondition = IsNaN(close[n1]) and !IsNaN(close[n]);

UpperR2.SetDefaultColor(Color.MAGENTA);
UpperR2.SetStyle(Curve.SHORT_DASH);
UpperR2.HideBubble();
AddChartBubble(Murray_Labels && TimeCondition , UpperL2[n], Concat("M-R2:", UpperL2[n]), Color.MAGENTA, yes);


UpperR1.SetDefaultColor(Color.GRAY);
UpperR1.SetStyle(Curve.SHORT_DASH);
UpperR1.HideBubble();
AddChartBubble(Murray_Labels && TimeCondition , UpperL1[n], Concat("M-R1:", UpperL1[n]), Color.GRAY, yes);

#8/8
Top.SetDefaultColor(Color.GRAY);
Top.SetStyle(Curve.LONG_DASH);
Top.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML8[n], Concat("Top:", MML8[n]), Color.CYAN, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML8[n], "8/8:" + astext(MML8[n]), Color.CYAN, yes);

#7/8
Level7.SetDefaultColor(Color.LIGHT_ORANGE);
Level7.SetStyle(Curve.SHORT_DASH);
Level7.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML7[n], Concat("R:", MML7[n]), Color.LIGHT_ORANGE, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML7[n], "7/8:" + astext(MML7[n]), Color.LIGHT_ORANGE, yes);

#6/8
PivotUp.SetDefaultColor(Color.PINK);
PivotUp.SetStyle(Curve.SHORT_DASH);
PivotUp.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML6[n], Concat("P:", PivotUp), Color.PINK, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML6[n], "6/8:" + astext(PivotUp), Color.PINK, yes);

#5/8
Level5.SetDefaultColor(Color.DARK_GREEN);
Level5.SetStyle(Curve.SHORT_DASH);
Level5.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML5[n], Concat("R:", MML5[n]), Color.DARK_GREEN, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML5[n], "5/8:" + astext(MML5[n]), Color.DARK_GREEN, yes);

#4/8
Mid.SetDefaultColor(Color.WHITE);
Mid.SetStyle(Curve.LONG_DASH);
Mid.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML4[n], Concat("Mid:", MML4[n]), Color.WHITE, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML4[n], "4/8:" + astext(MML4[n]), Color.WHITE, yes);

#3/8
Level3.SetDefaultColor(Color.DARK_GREEN);
Level3.SetStyle(Curve.SHORT_DASH);
Level3.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML3[n], Concat("R:", MML3[n]), Color.DARK_GREEN, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML3[n], "3/8:" + astext(MML3[n]), Color.DARK_GREEN, yes);

#2/8
PivotDn.SetDefaultColor(Color.PINK);
PivotDn.SetStyle(Curve.SHORT_DASH);
PivotDn.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML2[n], Concat("P:", PivotDn[n]), Color.PINK, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML2[n], "2/8:" + astext(PivotDn[n]), Color.PINK, yes);

#1/8
Level1.SetDefaultColor(Color.LIGHT_ORANGE);
Level1.SetStyle(Curve.SHORT_DASH);
Level1.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML1[n], Concat("R:", MML1[n]), Color.LIGHT_ORANGE, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML1[n], "1/8:" + astext(MML1[n]), Color.LIGHT_ORANGE, yes);

#0/8
Base.SetDefaultColor(Color.GRAY);
Base.SetStyle(Curve.SHORT_DASH);
Base.HideBubble();
#AddChartBubble(Murray_Labels && TimeCondition , MML0[n], Concat("Base:", MML0[n]), Color.CYAN, yes);
AddChartBubble(Murray_Labels && TimeCondition , MML0[n], "0/8:" + Astext(MML0[n]), Color.CYAN, yes);

LowerS1.SetDefaultColor(Color.GRAY);
LowerS1.SetStyle(Curve.SHORT_DASH);
LowerS1.HideBubble();
AddChartBubble(Murray_Labels && TimeCondition , LowerL1[n], Concat("M-S1:", LowerL1[n]), Color.GRAY, yes);


LowerS2.SetDefaultColor(Color.MAGENTA);
LowerS2.SetStyle(Curve.LONG_DASH);
LowerS2.HideBubble();
AddChartBubble(Murray_Labels && TimeCondition , LowerL2[n], Concat("M-S2:", LowerL2[n]), Color.MAGENTA, yes);


AddLabel(yes, Concat("*Murray- ", Concat(Murray_Range, Concat(" - ", Murray_timeFrame))),
if close > Level5 then Color.GREEN else
if close < Level3 then Color.RED else Color.GRAY );

#==============================================
 

ajman789

New member
After scouring the web, I have been unable to find a working Murray Math Lines for ThinkOrSwim for all time frames. Anyone know how to script this possibly?
Shorter-time-frime.jpg
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime

Snipe81

New member
Hello Wayne

Here is the Edgerater Script for the Murrey Math Osc:

Code:
hi:=HHV(High,length);
lo:=LLV(Low,length);
range:= hi - lo;
multiplier:= (range) * mult;
midline:= lo + multiplier * 4;
MMO : close - midline) / (range / 2),width2,ColorBlue;
MMOA: MA(MMO,Length2),Width2,ColorRed;
MX:=Max(MMO,MMOA);
MN:=Min(MMO,MMOA);
uZ1 : mult*6,Width2,ColorBlack;
uZ2 : mult*8,Width2,ColorBlack;
lZ1 : -mult*6,Width2,ColorBlack;
lZ2 : -mult*8,Width2,ColorBlack;
FillRgn(1,UZ1,UZ2),Brush#50FFA500;
FillRgn(1,LZ1,LZ2),Brush#50FFA500;
FillRgn(MMO>MMOA,MMO,MMOA),Brush#800000FF;
FillRgn(MMO<MMOA,MMO,MMOA),Brush#80FF0000;
FillRgn(MN>0,MN,0),Brush#200000FF;
FillRgn(MX<0,MX,0),Brush#20FF0000;

And here is the Edgerater code for HK Slow Stochastics:

Code:
K:=(Close-LLV(Low,LB))/(HHV(H,LB)-LLV(Low,LB))*100,Width2,ColorBlue;
D:Ma(K,N1),Width2,ColorGreen;
DS:MA(D,N2),Width2,ColorBlack;

WK:=(Close-LLV(Low,WLB))/(HHV(H,WLB)-LLV(Low,WLB))*100,Width2,ColorBlue;
WD:Ma(WK,N1),Width2,ColorBlue;
WDS:MA(WD,N2),Width2,ColorRed;

EightyLine:80,Width2,ColorRed;
FiftyLine:50,ColorBlack;
twentyLine:20,Width2,ColorGreen;

@SETHLINE(20,50,80);
FillRgn(D>DS,D,DS),Brush#300000FF;
FillRgn(D<DS,D,DS),Brush#30FF0000;

FillRgn(Min(D,DS)>80,Min(D,DS),80),Brush#50FFA500;
FillRgn(Max(D,DS)<20,Max(D,DS),20),Brush#7000FF00;

FillRgn(WD>WDS,WD,WDS),Brush#800000FF;
FillRgn(WD<WDS,WD,WDS),Brush#80FF0000;

FillRgn(Min(WD,WDS)>80,Min(WD,WDS),80),Brush#50FFA500;
FillRgn(Max(WD,WDS)<20,MAX(WD,WDS),20),Brush#7000FF00;

I cannot vouch for how TOS plots these indicators? But using Edgerater, the indicators line up very close to each other! just saying.
could not get code to work any suggestions
 

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Top