JayRogers

Scalp Jockey - MTF MA Cross Visual Strategizer

Because it's not always easy to see your lovely MA crossovers points..

Details/usage:
  • 3 seperate MA's which are fully customisable - types, sources, lengths, offsets.
  • Types of MA available: SMA , EMA , WMA , VWMA , SMMA , DEMA , TEMA , HullMA, LSMA
  • Custom time resolution available for the Short and Long "Minor" MA's together.
  • Separate custom time resolution available for the "Major" MA
  • Smaller cross over/under shapes for the minor MA's
  • Larger Cross over/under shapes for where the AVERAGE of the minor MA's cross the major.

Mix and match your MA's, tweak your sources, lengths and offsets until you feel it's giving you the best it can give.

Happy hunting!
הערה: Just a caution/reminder for newer traders, nothing is a magic bullet, and nothing is 100%.

Every different asset or currency you trade will behave slightly differently to the next.
Every time frame will have it's own variations.
Every trading hour can start dancing to a different tune - suddenly turning what was previously a fantastic setup into a hot mess.

So please, please be sure to take your time and really tweak the settings to suite your needs - it might look daunting at first with *GASP* 19 inputs; but it breaks down into only 5 sections, controlling just 3 simple things. Worst case scenario you can just reset to defaults and try again.

Be safe, and take your time - cheers ;)
הסר מסקריפטים מועדפים הוסף לסקריפטים מועדפים
//@version=2

study(title="Scalp Jockey - MTF MA Cross Visual Strategizer", shorttitle="Scalp Jockey", overlay=true)

// Revision:    1
// Author:      JayRogers
//
// Description:
//  - Designed for MA crossover lovers.
//  - 3 seperate MA's which are fully customisable - types, sources, lengths, offsets.
//  - Types available: SMA, EMA, WMA, VWMA, SMMA, DEMA, TEMA, HullMA, LSMA
//  - Custom time resolutions; one for the short and long "minor" ma's together, and one for the "major" ma
//  - Cross over/under shapes for the minor MA's
//  - Cross over/under shapes for where the AVERAGE of the minor MA's cross the major.

// - INPUTS START
// Alternate resolution for minor MA's
useRes1 = input(defval=false, title="Use Fixed Resolution for Minor MA's?")
setRes1 = input(defval="60", title="Select Minor MA Resolution", type=resolution)
// First MA - type, source, length, offset
type1   = input(defval="HullMA", title="Minor Short MA Type: SMA, EMA, WMA, VWMA, SMMA, DEMA, TEMA, HullMA, LSMA ( case sensitive )", type=string)
src1    = input(defval=close, title="Minor Short - Source", type=source)
len1    = input(defval=13, title="Minor Short - Length", minval=1)
off1    = input(defval=0, title="Minor Short - Offset", minval=0)
lsma1   = input(defval=0, title="* Minor Short is LSMA? - Set offset", minval=0)
// Second MA - type, source, length, offset
type2   = input(defval="HullMA", title="Minor Long MA Type: SMA, EMA, WMA, VWMA, SMMA, DEMA, TEMA, HullMA, LSMA ( case sensitive )", type=string)
src2    = input(defval=close, title="Minor Long - Source", type=source)
len2    = input(defval=15, title="Minor Long - Length", minval=1)
off2    = input(defval=0, title="Minor Long - Offset", minval=0)
lsma2   = input(defval=0, title="* Minor Long is LSMA? - Set Offset", minval=0)
// Alternate resolution for major MA
useRes2 = input(defval=false, title="Use Fixed Resolution for Major MA?")
setRes2 = input(defval="60", title="Select Major MA Resolution", type=resolution)
// Third MA - type, source, length, offset
type3   = input(defval="TEMA", title="Major MA Type: SMA, EMA, WMA, VWMA, SMMA, DEMA, TEMA, HullMA, LSMA ( case sensitive )", type=string)
src3    = input(defval=close, title="Major Source", type=source)
len3    = input(defval=50, title="Major Length", minval=1)
off3    = input(defval=0, title="Major Offset", minval=0)
lsma3   = input(defval=0, title="* Major is LSMA? - Set Offset", minval=0)
// - INPUTS END

// - FUNCTIONS
// Returns MA input selection variant, default to SMA if blank or typo.
variant(type, src, len, lsma) =>
    v1 = sma(src, len)                                                  // Simple
    v2 = ema(src, len)                                                  // Exponential
    v3 = wma(src, len)                                                  // Weighted
    v4 = vwma(src, len)                                                 // Volume Weighted
    v5 = na(v5[1]) ? sma(src, len) : (v5[1] * (len - 1) + src) / len    // Smoothed
    v6 = 2 * v2 - ema(v2, len)                                          // Double Exponential
    v7 = 3 * (v2 - ema(v2, len)) + ema(ema(v2, len), len)               // Triple Exponential
    v8 = wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))   // Hull
    v9 = linreg(src, len, lsma)                                         // Least Squares
    // return variant, defaults to SMA if input invalid.
    type=="EMA"?v2 : type=="WMA"?v3 : type=="VWMA"?v4 : type=="SMMA"?v5 : type=="DEMA"?v6 : type=="TEMA"?v7 : type=="HullMA"?v8 : type=="LSMA"?v9 : v1

// Return selected resolution series, or use current
reso(exp, use, res) => use ? security(tickerid, res, exp) : exp
// - FUNCTIONS END

// - SERIES VARIABLES
// MA's
ma_short    = reso(variant(type1, src1[off1], len1, lsma1), useRes1, setRes1)
ma_long     = reso(variant(type2, src2[off2], len2, lsma2), useRes1, setRes1)
ma_major    = reso(variant(type3, src3[off3], len3, lsma3), useRes2, setRes2)
// Minor Crosses
xUpMinor    = crossover(ma_short, ma_long)
xDownMinor  = crossunder(ma_short, ma_long)
// Major Crosses
xUpMajor    = crossover(avg(ma_short, ma_long), ma_major)
xDownMajor  = crossunder(avg(ma_short, ma_long), ma_major)
// - SERIES VARIABLES END

// - PLOTTING
// Ma's
plot(ma_short, title="MA Minor Short", color=#00FF00, linewidth=1, transp=40)
plot(ma_long, title="MA Minor Long", color=#FF0000, linewidth=1, transp=40)
plot(ma_major, title="MA Major", color=#0000FF, linewidth=1, transp=40)
// Short cross long minor shapes
plotshape(xUpMinor, title="Minor Cross Over Shape", style=shape.triangleup, location=location.belowbar, color=#00FF00, transp=0, size=size.tiny)
plotshape(xDownMinor, title="Minor Cross Under Shape", style=shape.triangledown, location=location.abovebar, color=#FF0000, transp=0, size=size.tiny)
// Short-long average cross major shapes
plotshape(xUpMajor, title="Major Cross Over Shape", style=shape.triangleup, location=location.belowbar, color=#00FF00, transp=0, size=size.small)
plotshape(xDownMajor, title="Major Cross Under Shape", style=shape.triangledown, location=location.abovebar, color=#FF0000, transp=0, size=size.small)
// - PLOTTING END
What TF is exactly use?
השב
@JayRogers Thank you for the tool. Why is there no 4H option for MTF? I've noticed it is like that for most MTF indicators. Could be a TV bug? @jayrogers84
+1 השב
Can you include something like a trend line, so when it's going down to not show any buy or sell signals?
+1 השב
Very nice script! What do you prefer to be the best settings?
+3 השב
Great Work! Thank you very much!
+1 השב
Very clever indicator! I'm implementing this baby in there. Thank you very much for the hard work Jay.
+1 השב
JayRogers Steven_Maas
Thanks for the feedback :)
השב
בית סורק מניות סורק מט"ח סורק מטבעות-קריפטו יומן כלכלי סדרות איך זה עובד‏ תכונות גרף מחירון חוקי הבית מנהלים כלים לאתרים וברוקרים יישומונים פתרונות גרפיים ספריית גרפים קלי משקל מרכז תמיכה הפנה חבר בקשת פונקציה בלוג וחדשות שאלות נפוצות ויקי טוויטר‏
פרופיל הגדרות פרופיל חשבון וחיוב הפנה חבר לשוניות התמיכה שלי מרכז תמיכה רעיונות שפורסמו עוקבים עוקב אחרי... הודעות פרטיות צ'אט התנתק