Hello
As PRT in not able to run multitimeframe, I would like to run strategy on H4 but with D1 Daily RSI value
I found the formula of RSI and how to build the indicator.
Manual here at the bottom of the page https://www.prorealtime.com/en/help-manual/probuilder-custom-indicators
However the probuilder doesn’t like the instruction Dclose instead of close.
If I screen the time to record price value at 23h59, it should be able to recalculate the RSI value.
However I don’t get any value back from the indicator, if you have any idea?
Regards
/////////// RSIDaily
p=14
if time>235958 then
cloture=open
endif
higher = MAX(0,cloture-cloture[1])
lower=MAX(0,cloture[1]-cloture)
mmhigher=wilderaverage[p](higher)
mmlower=wilderaverage[p](lower)
RS=mmhigher/mmlower
RSIdaily=100-100/(1+RS)
return RSIdaily as "RSIDaily"
///end
Try to embed the whole calculation into a condition that test that there’s already p barindex elapsed. Otherwise the average could not be calculated.
Hi it is better like this.
But i get a zero.
I followed the instruction and
/////////// RSIDaily
p=14
if time>235958 then
cloture=open
higher = MAX(0,cloture-cloture[1])
lower=MAX(0,cloture[1]-cloture)
mmhigher=wilderaverage[p](higher)
mmlower=wilderaverage[p](lower)
RS=mmhigher/mmlower
RSIdaily=100-100/(1+RS)
endif
return RSIdaily as "RSIDaily"
///end
If I try to debug it
I get zero from the first intruction
/////////// RSIDaily
//p=14
if time>235957 then
cloture=open
endif
return cloture as "cloture"
If you are using it on a timeframe that never test time>235957 (any timeframe above 1 minute..), your variable will never be set.
In H4 timeframe, time would return round values like : 040000 .. 220000
Hi
thanks for your help; with corrected time test, I get something 🙂