RicardoSantos

[RS]JR Moving Average System V1

Request for JR, added fast MA's and conditions, modified the sl lines to display as lines and added option to show/hide them, modified shape to display arrows up/down
Remove from Favorite Scripts Add to Favorite Scripts
study(title="[RS]JR Moving Average System V1", shorttitle="[RS]JR.MAS.V1", overlay=true)
hide_sl_lines = input(true)
ma0 = sma(hl2, input(1))


tp = input(8)
ma1 = wma(open, tp)
ma2 = ema(open, tp)

//---   2nd pass
tf = input(2)
ma3 = wma(open, tf)
ma4 = ema(open, tf)
//---   2nd pass plot output not required.

plot(ma0, color=black)
plot(ma1, color=gray)
plot(ma2, color=silver)

condition = ma0 >= ma1 and ma1 >= ma2 ? (close >= open ? lime : green) :
        ma0 <= ma1 and ma1 <= ma2 ? (close >= open ? red : maroon) :
        ma0 >= ma3 and ma3 >= ma4 ? (close >= open ? lime : green) :
        ma0 <= ma3 and ma3 <= ma4 ? (close >= open ? red : maroon) : (close >= open ? silver : gray)

barcolor(condition)

//  ||---   Crossovers
buyx1 = cross(ma0,ma1) and ma0 >= ma0[1] ? true : false
sellx1 = cross(ma0,ma1) and ma0 <= ma0[1] ? true : false
plotshape(buyx1, style=shape.arrowup, color=green, location=location.belowbar)
plotshape(sellx1, style=shape.arrowdown, color=maroon, location=location.abovebar)

//  ||---   SL lines
sltop = highest(max(max(high,ma0),max(ma1,ma2)), tp)
slbot = lowest(min(min(low,ma0),min(ma1,ma2)), tp)

tcol = sltop != sltop[1] ? na : silver
bcol = slbot != slbot[1] ? na : silver
plot(hide_sl_lines ? na : sltop, color=tcol, style=line)
plot(hide_sl_lines ? na : slbot, color=bcol, style=line)


snapshot


When rules are applied 2,8,2,8 Ichimoku gave no false signals for the chart above.
+2 Reply
QuantitativeExhaustion QuantitativeExhaustion
for ex., input(2.0, title="Mult") will allow user to enter decimal values for conversion line, lagging line and span/displacement.
+2 Reply
RicardoSantos PRO QuantitativeExhaustion
opening above / under the cloud isnt enought as a filter?
it would filter these
snapshot
+3 Reply
Are you sure?

looking around March 6th I see a negative lead. I don't see how we could have gotten green candles.
+2 Reply
Is that for the two Ichimoku signals alone? I'd wait on adding any other indications with Ichimoku.
+2 Reply
snapshot


new idea with Ichimoku Cloud
+2 Reply
x=input("240", title="Enter mins")

Above was mentioned by LazyBear as a way to include MTF inputs by the user for anytime frame.
+2 Reply
RicardoSantos PRO QuantitativeExhaustion
yes only if chart time frame is lower then the signal timeframe not the other way around
+3 Reply
ok. this should remove a bunch of false signals during sideways trades. I'll get back to this lower time frame hard signal / MTF idea.
+2 Reply
RicardoSantos PRO QuantitativeExhaustion
just opened the script and this cant be done without delaying the good signals by 1 candle because the script is already based on open
+3 Reply
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out