RATE OF MA
Forums › ProRealTime English forum › ProBuilder support › RATE OF MA
- This topic has 6 replies, 3 voices, and was last updated 7 years ago by Nicolas.
-
-
10/27/2017 at 12:43 PM #50711
hi
How i can i code to get the rate of Moving Average?
10/27/2017 at 3:49 PM #50731You can use the Rate Of Change indicator (ROC):
in this example, the rate of change over the last 10 periods of a 20 periods simple moving average:
123a = roc[10](average[20])return a1 user thanked author for this post.
10/27/2017 at 6:13 PM #50748can i have the code of ROC?
10/27/2017 at 7:33 PM #50749What is the ‘Price Rate Of Change – ROC’
The price rate of change (ROC) is a technical indicator of momentum that measures the percentage change in price between the current price and the price n periods in the past. It is calculated by using the following formula:
ROC = (Most recent closing price – Closing price n periods ago) / Closing price n periods ago x 100
10/30/2017 at 10:02 AM #50900actually i am looking for slope of moving average. that code is not as what i want as ROC is already delayed than the slope can be seen in the chart. so what should i do?
10/30/2017 at 10:24 AM #50903
please take a look.
https://www.prorealcode.com/prorealtime-indicators/moving-average-slope/
2 users thanked author for this post.
10/30/2017 at 11:18 AM #50915that code is not as what i want as ROC is already delayed
No delay with just 1 period for ROC:
123a = roc[1](average[20])return a -
AuthorPosts