Custom ROC Indicator

v10.3
Custom ROC Indicator

Hello everyone. I found this indicator on the internet and I got help with PRT code from the Great Nicolas ,thanks man.

The ROC indicator  described here has some advantages as compared to a simple MA – it has smaller lag and is more illustrative.

Starting the indicator you will see 6 indicator lines in a chart window:

  • black line – supporting MA for building a price rate line on the current timeframe;
  • orange line – price rate of change on the current timeframe;
  • green line – price rate of change on the nearest higher timeframe;
  • brown line – price rate of change on the next higher timeframe;
  • blue line – average line of the rate of price change;
  • red line – smoothed average line of the rate of price change.

Parameters can be set in the code from line 2 to 21. For the coefficient applied to the current timeframe, you’ll need to adapt them yourself (settings are in code from line 10 to 18), because PRT code can’t retrieve that is the current timeframe.

By default, I set the K2 and K3 coefficients to 2 hour timeframe.

And K2 and K3  need to be   changed dependent on which timeframe you are using

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Doctrading I forgot to write at the beginning :  a = 50 b = 50 These are intermediate levels Sorry
DerPat Thank you. This one could be an aid in my current research on stochastics.
Pelayo it is possible that in line 12 we should put seuilinf=-b, thaks for all
lglmrc Can't make it work, says: "Define p variable"
Ezio Hi Xel and thanks, do you know if there is a way in PRC of reading/counting intraday ticks?...
inadis ive just discovered this, i must say very nice thanks.
phili711 Bonjour Si la moyenne 100 est au dessus de la moyenne 20 le trend est baissier zlors pourqu...
Nicolas La comparaison se fait entre la valeur de la moyenne actuelle et telle qu'elle était il y a ...
Thomas007 we should definitely open a new thread for intraday trading - can we post the link once it's...
Vicari0us Really liking this indicator. Thanks
SB-FO Moving your last response to this post. Thanks for conforming the code below. How does PRT/...
Nicolas It is obtained by substracting the x days before Close from today’s Close. X is the paramete...

Top