[RESEARCH] Rate of ChangeHello traders and developers!
I was wondering how built-in "roc" function in Pine is defined and calculated so I made a little research.
I examined 4 samples:
1) "roc" function itself
2) "roc" according to its description
3) price change ratio
4) price percent change ratio
The results of the first and fourth samples are identical.
So, TV built-in roc(source, length) = 100 * change(source, length) / source .
And it's description is incorrect.
If you didnt know it - now you know it.
Good luck!
Rate of Change (ROC)
TRIXThis indicator was originally developed by Jack K. Hutson (Stocks & Commodities (July 1983): "Good TRIX").
Percent Change Smoothed (PCT + EMA)ROC works great on data with only positive numbers (like prices).
But it fails to correctly represent the rate of change when source series have negative values.
ROC is positive when:
Source is positive AND Source is rising
OR Source is negative AND Source is falling
Percent change (PCT) is just a ROC that deals with this sign confusion.
Anyone with Data Science backgroud would likely know about it.
PCT is positive only when:
Source is rising
When applying to only positive data PCT = ROC they are exactly equal.
I've also added EMA smoothing option.
Enjoy!
modificated rate of changeBased on ROC this indicator has been smoothed with filter and the zero line changed by a longer period of inverted ROC filtred as well . Buy/sell at the cross.
Closing Leverage and Rate of ChangeShows BTCUSDLONGS vs BTCUSDSHORTS along with their rate of change on a scale that's friendly for a combined indicator. ROC is increased proportionally so you can see it in relationship to Open Shorts and Open Longs on the same graph without zooming. I had been using an offset as well, but using an offset to adjust position causes the highs to look lower and it makes the lows look less low. It was significant enough to seem like a bad idea to include.
Cross Exchange ChangeThe indicator itself looks at different Exchanges and compares the change in price of them. If one spikes up, we go long with it as we assume our Exchange will follow. Vice versa for short.
Inverse Fisher WMA Smoothed Price ROC and RSI by drnkkInverse Fisher WMA Smoothed Price ROC and RSI by drnkk
Smoothed Rate of ChangeSmoothed Rate of Change indicator script.
This indicator was originally developed by Fred G. Schutzman.
Tick Line Momentum OscillatorTick Line Momentum Oscillator indicator script. This indicator was originally developed by Daniel E. Downing (Stocks & Commodities, V.12:1 (42-44): Using The Tick In A Short-Term Indicator).
Sb_Rate_Of_Change_BB_Band_strategy Version 1.0The strategy couples the concept of rate of change along with the Bollinger bands.
Along with it LazyBear's RSI/MFI with Volatility Indicator is also taken to reduce the number of trades and improve efficiency.
Strategy (in Layman terms):
If in the past 10 candles RSI/MFI with Volatility Indicator has printed a red/green colour and the roc has gone above/below the Bollinger bands then the short/long order is placed respectively.
Message if you think of any modifications/ enhancements/ any opportunities. :)
Donations/Tips... :) -
BTC: 1BjswGcRR6c23pka7qh5t5k56j46cuyyy2
ETH: 0x64fed71c9d6c931639c7ba4671aeb6b05e6b3781
LTC: LKT2ykQ8QSzzfTDB6Tnsf12xwYPjgq95h4
Forex strength meterCalculates the strength of a particular currency taking into account it's rate of change (% price change in a period) in all correlated and anti-correlated pairs. For instance, when looking for USD strength we will add ROC for USDCAD, USDCHF and USDJPY while subtract AUDUSD, EURUSD, GBPUSD and NZDUSD.
After ROC step, one can smooth the result using EMA, or MACD.
As the script needs to fetch values from multiple currencies it isn't the fastest one, but it gets its job done.
Important: Only major currencies (AUD, CAD, CHF, EUR, GBP, JPY, NZD and USD) are considered.
ROC TideAdds some depth to the traditional rate of change (ROC) indicator. Instead of just having one ROC line with a single lookback period, this takes a minimum lookback period, n , and plots 20 ROC lines with lookback periods of n, 2n, 3n, ..., 20n . These lines will appear green when greater than zero, red when less than zero, and yellow when equal to zero by default.
Then it plots the average of those 20 ROC's as a yellow filled area so as to make it easier to see where the balance (or "tide") of the ROC waves are located.
GBPNZD ROC RF count strategyCode takes six pairs that are highly correlated to GBPNZD and determines if their ROC's are increasing or decreasing. If a pair has an increasing ROC it is given a 1, if decreasing a -1. The numbers are all added up (this is similar to a count for counting cards in blackjack). If the count goes positive the strategy enters a long position, if negative a short position.
Code is tuned for GBPNZD for 1HR chart. Returns $97 on an initial balance of $100 (if I am reading Tradingview Tester correctly)
*** Should work for GBPJPY, its has the same correlated pairs
Comments welcomed
JPY GBP ROCsRate of change of most volatile JPY and GBP pairs. All pairs ending in JPY are red except GBPJPY (colored yellow --currently most volatile 7/2016). GBPNZD is blue, the other GBP pairs are green, lime and teal. GBPJPY and GBPNZD are my favorite day trading / swing trading pairs. This script allows me to see the action of the most volatile and liquid pairs on one screen. JPY pairs (ex-GBPJPY) are all red so that I see the flow of JPY not so much each pair and its name. Global movement of JPY is what I am after. Same for the coloring of GBP pairs as green expect GBPNZD as blue. ***** EURGBP is plotted as an opposite (with a negative in front of its sma. EURGBP is extremely correlated to GBPNZD, I decided to plot it also.
Rate Of Change - Absolute ValueMeasures the period's change in terms of the instrument's value (e.g. pip, dollar, etc) instead of as a percentage. I generally use it on a daily time frame with a period=1 to see how the current day's move compares with prior days' moves in order to gain a perspective into how this move ranks historically.
BUY & SELL PRESSURE by RegressionBUY & SELL PRESSURE by Regression Analysis at candle price/volume (Rate-Of-Change)
Ver. 3 By Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
WHAT'S THIS?
This is my 3rd. revision of the original implementation for AmiBroker by Karthik Marar's of it's BUY AND SELL PRESSURE INDICATORS but this time, constructed under a complete REGRESSIVE ANALYSIS premise based in Rate Of Change (A kind of Slope but measured in % Performance).
Some minimal adaptation's (and cleaning) have been made:
Instead of simple Range calculation at price, Rate Of Change (Regressive) is used.
Oscillator of Pressure can be deactivated in favor of a simple RoC Cumulative Pressures at candle.
Oscillator can read Volume data from external tickers for accurate Index calculation. ( NYA can use TVOL as example.)
Code is small, cleaner and faster =) !
Cheers!
Any feedback will be welcome...
@XeL_Arjona