conditions in mutlitimeframe from indicator to screener

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117680 quote
    panton
    Participant
    New

    Hello,

    I´m Learning how to use the multi timeframe but have difficulties in understanding certain parts.

    My problem is when I call the indicator with more than one variable. If i want to use only one of the variables returned from the called indicator how do i do it without putting in a condition that is irrelevant(RSI is always above 0). see codes below.

    As an example ive put RSi in 2 different timeframes as an example.

    if i only want 1 condition from the indicator in the screener how do i do it?

    For example if i don´t need cond4 in screener below but have two returned variables from the indicator, how to only use one?

    This is only an example to clarify my question my real indicator/screener is more complex which means that I have to write irrelevant conditions, but maybe i have to?

    Hope I explain my problem somewhat clear

    //P

    //Indicator
    
    MyRSI14=RSI[14](close)
    MyRSI2=RSI[2](close)
    Return Myrsi14 as”myrsi14″,myrsi2 as “myrsi2”
    
     
    // sample screener code
    Timeframe(daily)
    Myrsi14, myrsi2=call “myrsi”
    cond1=myrsi2>6
    cond2=myrsi14>50
    Timeframe(1 hour)
    Myrsi14h, myrsi2h=call “myrsi”
    cond3=myrsi14h>50
    cond4=myrsi2h>0
    SCREENER[cond1 and cond2 and cond3 and cond4]

     

    #117683 quote
    robertogozzi
    Moderator
    Master

    >> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
    🙂

    Remove line 16 and “AND Cond4” from line 17, then replace MyRsi2h in line 14 with the keyword ignored.

    #117684 quote
    robertogozzi
    Moderator
    Master

    Line 14 should then read:

    Myrsi14h, ignored=call “myrsi”
    #117692 quote
    panton
    Participant
    New

    Great!! Thank You it helps me a lot.

    I wish you and your loved ones a marvellous weekend!

    Will keep the insert prt code button in mind next time.

    //P

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

conditions in mutlitimeframe from indicator to screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
panton @panton Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by panton
6 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/24/2020
Status: Active
Attachments: No files
Logo Logo
Loading...