Tr0sT

SAR formula

This is how built-in S.A.R. indicator calculates S.A.R...
Remove from Favorite Scripts Add to Favorite Scripts
Thanks! I highly apprecitate the code.
Reply
Thank you very much!!!
Reply
Thank you so much !!!
Reply
any idea how to inject moving average into this sar formula, have no clue to do that :/
and make it MTF
Reply
Tr0sT tahukentucky
@tahukentucky, how exactly do you want to inject moving average? you can plot(sma(close, 18))... To make it MTF just don't use high, close, open and low. Instead use security(low, TimeFrame)... I don't remember correct syntax, but you can find it in pine script reference
Reply
Hi Tr0sT,


thank you for your script. Is it possible to customize your script so I can get alert? I would need alert when SAR crosses price AND crosses SMA line. I'm not good at programing, but it should be easy task.

kind regards, Linas
Reply
Tr0sT ebayforestwaves
@ebayforestwaves, maybe if you add something like code below you will get what you want. I'm not sure, but atleast it's a direction...

SMA = sma(close, 14)
plot(SMA)
alertcondition(SAR == close and close == SMA, "SAR=price=SMA")
+3 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Get Help Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing TradingView Coins My Support Tickets Get Help Ideas Published Followers Following Private Messages Chat Sign Out