range of values

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #120243 quote
    t.bremard
    Participant
    New

    Hello,

    i want the minimum of RSI between now and 6 period before,

    is there a more clever way to do this : ? ( remark i use only 4 samples instead of 6)

     

    rsi1 = RSI[21](close)
    
    rsi2 = RSI[21](close[2])
    
    rsi3 = RSI[21](close[4])
    
    rsi4 = RSI[21](close[6])
    
    
    
    rsiA = Min(rsi1, rsi2)
    
    rsiB = Min(rsi3, rsi4)
    
    rsiMin =  Min(rsiA, rsiB)

     

    a for loop is needed ?

     

    i also seen ugly code like:

    min(a, min(b, min(c,d) ) )

    which is not acceptable if i want to change dynamically the number of samples

    #120251 quote
    robertogozzi
    Moderator
    Master

    [scode]
    MinRsi = lowest[7](Rsi[21](close))
    [/scode]

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

range of values


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
t.bremard @t-bremard Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/23/2020
Status: Active
Attachments: No files
Logo Logo
Loading...