Screener for weekly and daily timeframes

Forums ProRealTime English forum ProScreener support Screener for weekly and daily timeframes

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • #99790

    Hello everyone,

    I am very new to coding, so I’m just trying to learn and make myself a somewhat useful screener. As I don’t understand why the results I get don’t meet all my conditions, I would very much appreciate if someone could point out what I’m doing wrong.

    The idea was to have 2 conditions for each timeframe, and the results need to meet all 4 conditions.

    Condition 1 (weekly): The fast EMA needs to have crossed over the slow EMA (ideally it would have occured recently but I haven’t figured out how to do that)

    Condition 2 (weekly): Bars must have been tracing higher lows for the past X weeks

    Condition 3 (daily): The close is currently below a X day EMA

    Condition 4 (daily): Volume has been rising for the past X days

     

    Any advice would be greatly appreciated, thanks a lot!

    #99792

    First thing I notice is that your SUMMATIONs need to be compared to something.

     

    #99793

    You can also use SUMMATION to check if a cross has occurred recently.

     

    #99794

    Lines 1-5 are evaluated according to your default TF, so lines 9 and 14 will be set weekly and daily but are not evaluating a daily nor weekly EMA.

    #99795

    Lines 1-5 are evaluated according to your default TF, so lines 9 and 14 will be set weekly and daily but are not evaluating a daily nor weekly EMA.

    I did spot that one but I was waiting for CluelessNobel to reply that it still didn’t work before passing on the final clue! Saturday is a slow day on the forums and I was trying to get as many posts as possible! I didn’t want to hand the fish straight over before the OP had done a little fishing!

    #99823

    Thank you so much for taking the time to reply. I wish I could have gotten back to this sooner but internet is currently down at my place, which means I’m operating on lousy 3G…

     

    After reading that my summation condition isn’t compared to anything, I think I don’t fully understand how it’s meant to be used. When writing:

    I thought I was already saying: the current low needs to have been above the previous one for the past X number of weeks. Obviously that’s wrong, but when I look at your correction, I don’t understand why I must use my “WeeklyLookback” variable twice. Could you “translate” it for me?

     

    #99824

    Do I understand this correctly? => Over the past X number of weeks, the fast EMA has crossed the slow EMA more than 0 times, AND the fast EMA is above the slow EMA?

    #99826

    Sorry, I posted something wrong.

    #99827

    Hi Roberto, thank you very much for replying,

    I think I see what you’re trying to tell me but I need to ask you follow up questions.

    Do you mean that when I’m setting variables, I must set them according to a specific timeframe? If that’s the case it’s confusing to me because I thought I was already giving the appropriate instructions by just specifying the timeframe, and then writing the conditions. Ie: in this timeframe, look for these conditions.

    #99828

    That is your correct use of your conditions.

    If you define an MA in a TF you can access it wherever you want to, but it will refer to the TF where the MA has been defined.

    If you need to check the same MA in different TF’s, then you have to define the MA in each TF using different variable names.

    1 user thanked author for this post.
    #99829

    SUMMATION will count how many times a condition is met in x candles. So if you check four candles and condition EMA1 < EMA2  = 4 then it is true that EMA1 has been less than EMA2 for at least four candles. If the SUMMATION result is less than the total look back period of x then the condition is false and EMA1 has not been less than EMA2 for the last x candles.

    Do I understand this correctly? => Over the past X number of weeks, the fast EMA has crossed the slow EMA more than 0 times, AND the fast EMA is above the slow EMA?

    Yes that is exactly correct. There has been at least one cross over in the last x weeks and the fast EMA is currently still above the slow EMA so it cannot have crossed back under.

    1 user thanked author for this post.
    #99851

    With the SUMMATION instruction, you simply make a sum of all boolean conditions that were true (so equal to 1) in the last X periods. So if the summation is superior to 0, one of the X previous condition was true.

    1 user thanked author for this post.
    #99860

    OK got it this time.

    Thank you all very much, that was really helpful.

Viewing 13 posts - 1 through 13 (of 13 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login