- ago
If one wants to create a strategy that involves ROC comparisons between symbols, it won't work well to just use the 'Indicator % Above/Below Indicator' building block because when comparing a positive to a negative ROC value we'll get an inaccurate result.

In the Python library Talib there is an indicator called ROCR100 which is Rate of change ratio 100 scale: (price/prevPrice)*100. See: https://mrjbq7.github.io/ta-lib/func_groups/momentum_indicators.html

This indicator will always give a positive value, making accurate ROC comparisons possible. I have looked through the indicators in Wealth Lab and haven't found an equivalent. Is an indicator like ROCR100 already available in Wealth Lab by another name?
0
911
15 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.07% )
- ago
#1
I don't really see the difference other than ROC oscillates around 0 instead of 1, but if you want to, you can use MathIndOpValue to create the ROCR100 just by adding 100 to ROC.
0
Glitch8
 ( 11.64% )
- ago
#2
Rocr100 is (prece / previousPrice) * 100 and I cannot find a good matching indicator in WL. We'll quickly add ROCR100 for Build 15.

https://www.quantshare.com/index.php?option=manual&dir=/QuantShare%20Language/Indicators/Rocr100%200.html
1
Cone8
 ( 6.07% )
- ago
#3
Exactly.
Rocr100 = ROC + 100
0
- ago
#4
Thanks! I'll look for it in Build 15.
0
- ago
#5
By the way, Cone, to follow your suggestion using the MathIndOpValue I would need to use the code-based approach correct? So far I've been using just the building blocks.
0
Cone8
 ( 6.07% )
- ago
#6
Not correct. You can select the MathIndOpValue indicator like any other indicator in the blocks. Just configure it for ROC + 100.
1
- ago
#7
Okay, great, thanks. I didn't know that was possible.
0
- ago
#8
What do you enter for the second indicator in order to be able to enter 100?
0
- ago
#9
Nevermind - I see the MathIndOpValue option
0
Glitch8
 ( 11.64% )
- ago
#10
Good, since it's functionally equivalent, maybe we don't need to add the new indicator, here is MathIndOpValue ...

1
- ago
#11
When I attempt to run a backtest with the indicator setup like this an error appears at the bottom of the screen in red: "Backtest Error: No Executor"

0
Glitch8
 ( 11.64% )
- ago
#12
The limitation is that you cannot currently use one transformer indicator (like SymbolInd) within another (like MathIndOpInd.) We can go ahead and create the native indicator for ROCR100 for Build 15 to get you past this.
0
- ago
#13
What if instead of the ROCR100 we add a checkbox like "Compare absolute indicator values" to "Indicator above/below Indicator"? That would make its application more universal, not limited to ROC alone.
0
Cone8
 ( 6.07% )
- ago
#14
Applying Math.Abs() to indicators isn't the same thing. Is that what you mean?
0
- ago
#15
Good point. What about adding an option "100 scale" to the ROC itself?
0

Reply

Bookmark

Sort