TradingView
salojc2006
Dec 6, 2014 3:12 AM

DIFF EMA RATIO 

YPF Sociedad AnonimaNYSE

Description

This indicator shows how far the price of your EMA is
Comments
RicardoSantos
nice tool for tracking price expansion/contraction, adding a smoothed line over it could provide interesting signals
AndrewFaulkner
I took liberty of smoothing this but don't know pinescript much so have put it in a platform I use for cryptotrading:

cryptotrader.org/backtests/acH5jr2hyhqB4K4mN

(A laguerre filter was used for smoothing.)
RicardoSantos
looks like nice results there, something like this in pinescript:
signal = ema(p, input(12))

x = cross(p, signal) and signal > p ? true : false
bgcolor(x ? green : red)
RicardoSantos
//this should be better: ----
study("My Script")
// Based on script by: salojc2006
// tradingview.com/v/xHAh5gpt/

// ||--- Get price rate of expansion/contraction:
exp = close / ema(close, input(24))
// ||--- Smooth out noise:
fastsignal = ema(exp, input(4))
slowsignal = ema(exp, input(24))
// ||--- Signal Output
bgcolor(fastsignal > slowsignal ? green : maroon, transp=70)
// ||--- Line Output:
plot(exp, color=gray)
plot(fastsignal, color=green)
plot(slowsignal, color=maroon)
// ||--- Average value line
hline(1)
salojc2006
I gonna test... Tks!
salojc2006
Some good signals of Buy. But at selling is important not execute order under the buy price. Instead wait for another signal.
RicardoSantos
yea theres some noise passing the smooth process causing false signals
salojc2006
My original idea was see how much the close price is far of his EMA. So, statistically find a % where is a good price to buy and a good price to sell. So, if current price is 30% under EMA, I can think that is a good time for buy, every previous closes under 30% of EMA, bounce shortly... (Excuse, but mi english is not so good)
RicardoSantos
problem is that those %'s values need to be hard coded depending on currency and time frame, but the indicator still is pretty damn good to identify trend strength and expansion/contraction and can give very good visual insight to the price action in effect.
salojc2006
yep.. I usually dont use indicators. I invest in the Buenos Aires (Argentina) Stock Market. We trade with stocks that also are traded in USA vía ADRs.
Prices trades on Artentinian Stock Market are composed by multiple factors included the Local currency valuation. Understand all variables and use all it for take a decision is so hard!! hah. So, i dont use indicators. Just with a trendline and Fibonacci retracements y look for a bounce point, for buy before tend reverses.
More