"DEFPARAM" in probuilder, limit time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18515 quote
    SpekulantenSpekulanten
    Participant
    Average

    Hi,

    I want to make my indicator empty if between different time periods, how do i do this?

    Otherwise i could use

    DEFPARAM FlatBefore = xxxxxx
    DEFPARAM FlatAfter = yyyyyy

    But not in ProBuilder..

     

    Thanks!

    #18522 quote
    NicolasNicolas
    Keymaster
    Legend

    Make a time a condition and set your returned values to 0 if this condition is met.

    Let’s say your return statement is as follow:

    RETURN value1

    Make a time condition:

    condition = time>090000 and time <180000
    
    if condition then 
     value1 = 0
    endif

    Should work in most cases, depends on your whole code, but you didn’t post it 🙂 Let us know if it’s ok.

    Spekulanten thanked this post
    #18622 quote
    SpekulantenSpekulanten
    Participant
    Average

    Got it to work, if someone wants to add multiple time restrictions i used:

    ((time >090000 and time <130000) or (time >140000 and time<170000))

    in the “if” function.

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 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

"DEFPARAM" in probuilder, limit time


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by SpekulantenSpekulanten
9 years, 9 months ago.

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