"DEFPARAM" in probuilder, limit time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18515 quote
    Spekulanten
    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
    Nicolas
    Keymaster
    Master

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

"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 Spekulanten
9 years, 1 month ago.

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