tmc

SFX Trend or Range

1941 5 181
A remarkably simple but very useful indicator. Earlier and clearer signals than ADX or VHF. More positive ranging signal than any other indicators.

Aqua = ATR
Orange = StdDev
Red = Smoothed Moving Average of the StdDev


Usage:

Any pair, any time frame. Best used on majors and M15 period or higher

  • Orange breaks above Red when below Aqua = Trend building
  • Orange breaks below Red when above Aqua = Trend exhausting
  • Orange below Red when below Aqua = Ranging/Sideways market
Remove from Favorite Scripts Add to Favorite Scripts
study(title="SFX Trend or Range", shorttitle="SFX TOR")

ATR_len = input(12, title="ATR Length")
StdDev_len = input(12, title="StdDev Length")
SMA_len = input(3, title="SMA Length")


ATR = atr(ATR_len)
StdDev = stdev(close, StdDev_len)
SMA = sma(StdDev, SMA_len)


plot(ATR, linewidth=2, color=aqua, title="ATR")
plot(StdDev, color=orange, title="StdDev")
plot(SMA, color=red, title="SMA")
good work!
Reply
very nice indicator, thanks. i tried to add something:


study(title="SFX Trend or Range", shorttitle="SFX TOR")

ATR_len = input(12, title="ATR Length")
StdDev_len = input(12, title="StdDev Length")
SMA_len = input(3, title="SMA Length")


ATR = atr(ATR_len)
StdDev = stdev(close, StdDev_len)
SMA = sma(StdDev, SMA_len)


plot(ATR, linewidth=2, color=aqua, title="ATR")
plot(StdDev, color=orange, title="StdDev")
plot(SMA, color=red, title="SMA")


IDU = (cross(StdDev,SMA) ? StdDev>SMA : na) and StdDev<ATR
IDU2 = (cross(StdDev,SMA) ? StdDev>SMA : na) and StdDev>ATR
IDD = (cross(SMA,StdDev) ? StdDev<SMA : na) and StdDev>ATR
IDD2 = (cross(SMA,StdDev) ? StdDev<SMA : na) and StdDev<ATR

plotshape(IDU, style=shape.triangleup, location=location.bottom, color=lime, transp=0, offset=0, text='Trend') //iceblue up
plotshape(IDD, style=shape.triangledown, location=location.bottom, color=fuchsia,transp=0, offset=0, text='Exhaust') //pink down
plotshape(IDD2, style=shape.triangledown, location=location.top, color=yellow,transp=0, offset=0, text='Sideways')
+1 Reply
jackvmk jackvmk
correct it

"IDD = (cross(SMA,StdDev) ? StdDev<SMA : na) and StdDev>ATR"
Reply
jackvmk jackvmk
IDD = (cross(SMA,StdDev) ? StdDev<SMA : na) and StdDev>ATR
Reply
jackvmk jackvmk
i dont understand, i am trying to right code but i cant.
my last try:

IDD = (cross(SMA,StdDev) ? StdDev<SMA : na) and StdDev > ATR
+1 Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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 Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out