Hello,
I am trying to build a simple relative strength indicator in ProRealTime using ProBuilder.
The goal is to compare the current instrument to another instrument (for example SPY or AMZN) and calculate:
- Relative strength = close / benchmark close
- EMA of that relative strength
- Return the difference from the EMA
Example code:
spyClose = close("SPY")
rs = close / spyClose
rsEMA = ExponentialAverage[28](rs)
rsOK = rs - rsEMA
RETURN rsOK
However, the editor shows a warning on the line referencing the external instrument and the indicator does not work.
I am using ProRealTime via IG Markets.
My questions:
- Does the IG-sponsored version of ProRealTime allow indicators to reference another instrument (for example
close("SPY"))? - If yes, what is the correct syntax for referencing another instrument in ProBuilder?
- If not, is this functionality only available in the Complete/Premium standalone version of ProRealTime?
- Is there any workaround for calculating relative strength vs the S&P 500 in the IG version?
Thank you.
JSParticipant
Veteran
Hi,
In ProBuilder there is currently no possibility to use multiple instruments. Perhaps this will be available in version V13…?
In ProScreener, however, it is possible to compare instruments using “EquityFrame”…
There is also a separate module called “Calculated Instruments”, where you can, among other things, calculate a ratio between two instruments…
So at the moment it is not possible in ProBuilder, but there are possibilities in ProScreener and in the “Calculated Instruments” module…
The best solution is to create a “calculated instrument” with the current instrument name to compare divided to the index SPY. And then apply the below indicator code on this created price chart:
rsEMA = ExponentialAverage[28](rs)
rsOK = rs - rsEMA
RETURN rsOK