range of values

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #120243 quote
    t.bremardt.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
    robertogozzirobertogozzi
    Moderator
    Legend

    [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.
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

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 robertogozzirobertogozzi
6 years, 7 months ago.

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