Using Summation to identify double bottom

Forums ProRealTime English forum ProScreener support Using Summation to identify double bottom

Viewing 6 posts - 1 through 6 (of 6 total)
  • #237650

    Please see attached chart screenshot

    I am trying to identify where a 10 period ma (broken blue line) does not make a lower low

    I thought I could use summation function.

    something like

    Where 10ma>10ma[1] and 10ma[1]<10ma[2]  (ie 10ma has reversed direction)

    using summation exmaine the last n bars (lets n = 6) ma10<ma10[1] and look for assets where the count=>5 (remember the for latest bar the ma10>ma10[1])

    Then for the prior 10 bars prior to bar 6 I need to see assets where the ma10[]>ma10[]>=7

    Then for the 14 bars prior to that i need return assets where ma10[]<ma10[] >=12

    If all three criteria are met then include in results.

    I hope this making sense.  Basically I wish to examine the 6 bars then the prior 10 bars prior  and then the 14bars prior to that so looking at total 30 bars

     

    Any help would be appreciated.

    Thank you very much

    Simon

    #237672

    Also it is possible to check whether the value of 10ma[1] is above the 10ma low of the entire period?

    #237680

    Hi Simon,
    I believe there’s a more efficient way to approach the problem to reduce computational time while still getting the results you’re looking for.
    Instead of manually iterating over the bars, you can use a combination of the 10-period moving average and a check for direction changes. Additionally, with the summation function, you can quickly verify how many times this change has occurred within a range of N bars. Here’s how the code might look:

    This approach optimizes the calculations and reduces complexity, while being more efficient in terms of runtime. You can adjust the number of bars to examine or combine it with other criteria as needed.
    I hope this helps.

    #237684

    Thanks this does help.

     

    Thinking I will only look for those asset where the check = 2

    // Use summation to check how many times the change occurred in the last 15 bars
    check = summation[15](change)
    Is there a way to somehow check whether for the 2nd (latest) change in direction, that MA10 value is above MA10 value at the time of the 1st change in direction?
    Many thanks
    Simon
    #237702

    Here you have an example:

    #237718

    Thank for this, although this appears to be an indicator?  Just in case I did not make myself clear .

    I am seeking to screen for assets where the 2nd change of direction the 10ma value is higher than the 10ma at the point where the first change of direction occurred.

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

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