HPotter

Percent difference between price and MA

Percent difference between price and MA
Remove from Favorite Scripts Add to Favorite Scripts
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 04/04/2015
// Percent difference between price and MA
////////////////////////////////////////////////////////////
study(title="Percent difference between price and MA")
Length = input(14, minval=1)
xSMA = sma(close, Length)
nRes = abs(close - xSMA) * 100 / close
plot(nRes, color=blue, title="PD MA")
DONATE/TIP

BTC: 1Lo1GoTNsPbrjGAgPgF4MYZPhBFdoVHaTm
Can you code Percent difference between price and VWAP? The big boys love to be counter party when price is deviated + or - >4% from the VWAP..
+3 Reply
HPotter TASAVANT
I will try
Reply
JumaaneRay HPotter
@HPotter, hey buddy any luck with the VWAP version? Also, are you familiar with thinkscript at all?
Reply
NIce one thanks!
Reply
HPotter TASAVANT
You are welcome
Reply
Here's an example of the eurusd. Looking left of the chart, when it's trading 5% under or more from it's 20 period MA. The eurusd has a trend change and rallies.
Reply
Absolutely perfect! This shows the extremes better than I thought! TY for another great indicator!
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
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