RSI Daily calculation indicator on any time frame

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10120 quote
    YannickYannick
    Participant
    Veteran

    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
    #10128 quote
    NicolasNicolas
    Keymaster
    Legend

    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.

    #10208 quote
    YannickYannick
    Participant
    Veteran

    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
    #10209 quote
    YannickYannick
    Participant
    Veteran

    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"
    
    #10214 quote
    NicolasNicolas
    Keymaster
    Legend

    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

    #10379 quote
    YannickYannick
    Participant
    Veteran

    Hi

    thanks for your help; with corrected time test, I get something 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

RSI Daily calculation indicator on any time frame


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Yannick @yannick Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by YannickYannick
10 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/02/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...