CCI pattern screen

Viewing 7 posts - 1 through 7 (of 7 total)
  • #13306

    Hi am trying to create a screener where it identifies the following on CCI:

    in past x bars

    CCI crosses above -100 then crosses above 100 crosses below 100 then crosses above 100 (without going lower than -100)

    or

    CCI crosses below 100 then crosses below -100 then crosses above -100 then crosses below -100 (without going higher than 100)

     

    normally I would use a loopback over x bars and write each cross over event to an array. Then I would test the array for that specific pattern.

     

    But it seems like ProScreener does not let me create my own arrays.

     

    Thanks 🙂

     

    #13307

    1472825722_flagPlease update your country flag in your profile. Thank you 🙂

    Hi Philip, you don’t need arrays to store your tests. We can make a loop or a summation of boolean over the last X periods to test if all your conditions were met.

     

    #13323

     

    #13324

    Hi Nicolas, I have tried to imagine what you mean and created a fragment of code which I believe would catch the condition where CCI crosses first over -100 then subsequently through 100 and then again through 100.

     

    If I can get it working for one direction then the others will follow easily.

    But Pro Screener tells me that The program “MyScreener(7)” does not contain code 😀 so obviously it doesn’t understand something. But I don’t see what is wrong. It all looks syntactically ok, no yellow triangles. Any way to debug or to see what is causing the problem for ProScreener? I would not like to bother you every time I try to code:)

    So is this the kind of structure you meant?

     

    #13375

    Please update your profile with your country.

    This is a test quickly coded during lunch, screener take long time because of many loops. Didn’t test it much, so please stay calm and have a beer, I’ll get back here asap if you need more assistance 🙂

     

    #13394

    Hi Nicolas, thanks at least the for loops are not nested… time for a beer.

     

    country updated (I thought I did that yesterday..)

     

    Thanks again

    #16258

    Hi, from the Probacktest and ProOrder manual, I dug up the following functions….could be exactly what I was looking for….in case anyone else want to do something similar, here’s the text:

     

    Here are several separate examples where using a FOR loop is avoided:

    // Determine the number of times the condition c1 was verified over the n last candlesticks:

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

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