Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Toggle Dark Mode Find Search

Sierra Chart
Financial Markets Charting and Trading Platform

Main ▾ Documentation ▾ Getting Started ▾ Account Management ▾ Support ▾

Home >> (Table of


Contents) Studies and
Indicators >> SC Account Name Login Login Page - Create Account
Technical Studies
Reference >> Murrey Math

Technical Studies Reference


Technical Studies Reference

Common Study Inputs (Opens a new page)

Using Studies (Opens a new page)

Murrey Math
This study calculates and displays Murrey Math Lines, which were developed by Thomas Henning
Murrey.

The calculation is performed over a Square of fixed width. We denote the base value of the Square
Width as n, and this base value is modified by the Multiplier Input, which we denote as v. The
width of the Square is [nv] , where [⋅] denotes the Rounding Function. The value of n is determined
as follows.

If the Custom Square Width Input is set to zero, then n is determined by the setting of
the Square Width Input. The values of this Input are restricted to powers of 2, from 4
through 512 .

If the Custom Square Width Input is set to a nonzero value, then n is determined by
this value. These values are not restricted to powers of 2.

The Square over which the calculations are performed begins at Index tstart and ends at Index tend

. These are related via the equation tstart = tend − [nv] + 1 , and tend is determined by the Inputs
as follows.

If the Use Last Bar as End Date-Time is set to Yes, then tend is the Index of the last
bar in the chart.
If the Use Last Bar as End Date-Time is set to No, then tend is the Index of the bar
determined by the setting of the End Date-Time Input.

Let H and L be random variables denoting the High and Low Prices, respectively. We begin by
computing the Highest High, Lowest Low, and Range over the Square. These are denoted as
maxt (H , [nv]), mint (L, [nv]), and Range (H , L, [nv]). Note that these are not moving
end t
end end

calculations; the calculations are performed only at Index tend .

Next we define a function SRt (n, v) , which we calculate at Index tend as follows.

If maxt
end
(H , [nv]) > 25 and
ln(0.4) maxt (H , [nv])) ln(0.4) maxt (H , [nv]))
, then
end end

− ⌊ ⌋ > 0
ln(10) ln(10)

ln(0.4 maxt (H , [nv]))


.
end

SRt (n, v) = exp(ln(10) ⌊ ⌋ + 1)


end

ln(10)

If maxt
end
(H , [nv]) > 25 and
ln(0.4) maxt (H , [nv])) ln(0.4) maxt (H , [nv]))
, then
end end

− ⌊ ⌋ ≤ 0
ln(10) ln(10)

ln(0.4 maxt (H , [nv]))


.
end

SRt (n, v) = exp(ln(10) ⌊ ⌋)


end

ln(10)

If maxt
end
(H , [nv]) ≤ 25 , then
ln(0.005) maxt (H , [nv]))
.
end

SRt (n, v) = 100 exp(ln(8) ⌊ ⌋)


end

ln(8)

For an explanation of the logarithmic function ln , refer to our description here.

(M M I )
The Murrey Math Interval Range function is denoted as Range
tend
(n, v) , and we calculate it at
Index tend as follows.

SRt (n, v)
(M M I ) end

Range (n, v) = ln( )/ln(8)


tend
Range (H , L, [nv])
tend

Next we define a function called the Octave Count, dentoted as OCt (n, v) . We calculate this at
Index tend as follows.

(M M I )
If Range
tend
(n, v) ≤ 0 , then OCt
end
(n, v) = 0 .
(M M I )
If Range
tend
(n, v) > 0 and
SRt (n, v)
(M M I ) (M M I )
, then
end
Range (n, v) − ln( ) + ln(8) ⌊Range (n, v)⌋ = 0
tend tend
Range (H , L, [nv])
tend

(M M I )
OCt
end
(n, v) = ⌊Range
tend
(n, v)⌋ .

(M M I )
If Range
tend
(n, v) > 0 and
SRt (n, v)
(M M I ) (M M I )
, then
end

Range (n, v) − ln( ) + ln(8) ⌊Range (n, v)⌋ ≠ 0


tend tend
Range (H , L, [nv])
tend

(M M I )
OCt
end
(n, v) = ⌊Range
tend
(n, v)⌋ + 1 .

(+) (−)
Next we define functions Sit (n, v) , Mt (n, v) , It (n, v) , B
t
(n, v) , and B
t
(n, v) , which we
calculate at Index tend as follows.

Sit (n, v) = SRt (n, v) exp(− ln(8)OCt (n, v))


end end end
For an explanation of the exponential function exp , refer to our description here.

(M M I )

⎪ ∣ Range
t
(n,v) ∣


end (M M I )
⌊ ln∣ ∣/ln(2) + 0.00001⌋ Range (n, v) ≠ 0
tend
Sit (n,v)
Mt (n, v) = ⎨ ∣ end ∣
end




⎪ (M M I )
0 Range (n, v) = 0
tend

1
= (maxt (H , [nv]) + mint (L, [nv]))
2 end end

It (n, v) =
end
Sit (n, v) exp((Mt (n, v) − 1) ln(2))
end end

(+)
B (n, v) = (It (n, v) + 1)Sit (n, v) exp((Mt (n, v) − 1) ln(2))
tend end end end

(−)
B (n, v) = (It (n, v) − 1)Sit (n, v) exp((Mt (n, v) − 1) ln(2))
tend end end end

Finally, we are ready to calculate the Murrey Math Lines. These are enumerated using a Line
Index ℓ, which takes on integer values from 0 to 24. The function used for calculating the lines is
denoted as M M Lt (n, v, ℓ). To obtain the values of the Murrey Math Lines, we evaluate this
function at tend as follows.

(−) ℓ − 8 (+) (−)


M M Lt (n, v, ℓ) = B (n, v) + (( ) (B (n, v) − B (n, v)))
tend tend tend
8

The Murrey Math Lines are displayed as horizontal line segments between tstart and the current
Index t. The values of these Lines are rounded to the nearest Tick Size if the Round to Tick Size
Input is set to Yes. See the Inputs section below.

The values of ℓ correspond to the Octaves as follows.

ℓ Octave
0 −8/8

1 −7/8

2 −6/8

3 −5/8

4 −4/8

5 −3/8

6 −2/8

7 −1/8

8 0/8

9 1/8

10 2/8

11 3/8

12 4/8

13 5/8

14 6/8

15 7/8

16 8/8

17 +1/8

18 +2/8

19 +3/8

20 +4/8

21 +5/8

22 +6/8

23 +7/8
24 +8/8

Inputs

Square Width: The width of the Square. In other words, the number of bars to
use in the calculation. There is a list of preset choices. If you want to use a
different width, then set this through the Custom Square Width Input setting
instead. When Custom Square Width is set to a nonzero number, it overrides
this Square Width Input setting.

Square Width Multiplier: The default for this Input is 1.5. This value is
multiplied with Square Width to increase the Square Width value.

Custom Square Width: When this Input is set to a nonzero value, this overrides
the Square Width Input and specifies the number of bars to use for the width of
the Square. Normally this should be set to 0 unless you want to override Square
Width.

Use Last Bar as End Date-Time:If this is set to Yes, the Murray Math study will
be calculated using the bars at the end of the chart. The Murray Math lines will be
redrawn for every new bar added to the chart. If this Input is set to No, the
Murray Math will be calculated using the bars beginning with the bar at the End
Date-Time Input, and going back the number of bars specified with the Square
Width Input. This Input is set to Yes by default.

End Date-Time: The Date-Time which will be the last bar used in the calculation.
The calculation will go back from this Date-Time the number of bars specified with
the Square Width Input. By default, the End Date-Time Input is not set and will
not be used unless the Use Last Bar as End Date-Time Input is set to No.

Round to Tick Size: When this Input is set to Yes, then the Murray Math lines
are rounded to the nearest Tick Size value which is set through
Chart >> Chart Settings .

Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this
Spreadsheet to the Data Files Folder.

Open it through File >> Open Spreadsheet .

Murrey_Math.238.scss

*Last modified Wednesday, 28th September, 2022.

Service Terms and Refund Policy

You might also like