15EMA/50SMA crossover screener fault?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #91423 quote
    thetragiccircle
    Participant
    Junior
    //criteria = 0
    // SHORT
    indicator1 = ExponentialAverage[15](close)
    indicator2 = Average[50](close)
    c1 = (indicator1 = indicator2)
    indicator3 = Stochastic[5,2](close)
    c2 = (indicator3 >= 75)
    short= c1 AND c2
    //criteria = 0
    // LONG
    indicator1a = ExponentialAverage[15](close)
    indicator2a = Average[50](close)
    c1a = (indicator1a = indicator2a)
    indicator3a = Stochastic[5,2](close)
    c2a = (indicator3a <= 25)
    long= c1a AND c2a
    TIMEFRAME (default)
    if long then
    criteria=1
    elsif short then
    criteria=-1
    endif
    
    SCREENER[long or short](criteria as "XMTS")

    I am trying to use a screener where it will signal when the 15EMA crosses below the 50SMA  from above, when there is a Stochastic cycle high (%K above 80) – short signal…..and for a long signal when the 15EMA crosses above the 50SMA from below when there is a Stochastic cycle low (%K below 20)…..I have run this screener from a default 5 min timeframe over approximately 10 markets for several days and have never had a signal…..can you check this for me please in case I have made an error (although no error is showing), or perhaps the conditions have just not been met over a couple of days. Thank you

    #91424 quote
    robertogozzi
    Moderator
    Master

    There’s a logical error in lines 5 and 13, since the “=” relation is impossible to be true (or very unlikely), try replacing it with “<=” or “>= and it’ll work (I don’t know if that will be what you expected, though!).

    #91442 quote
    thetragiccircle
    Participant
    Junior

    Thank you, I will try that this morning…I had also tried CROSSES UNDER and CROSSES OVER, and that never worked either.

    #91444 quote
    robertogozzi
    Moderator
    Master

    Thank you, I will try that this morning…I had also tried CROSSES UNDER and CROSSES OVER, and that never worked either.

    It’s still due to unlikely conditions. I suggest that you add ALL indicators, with the same settings as in your code, to your chart, then identify visually WHEN a signal could have been triggered. If you never see one it’e because those settings have to be changed!

    #91463 quote
    thetragiccircle
    Participant
    Junior

    The cross over and under condition has worked…it just appears that the conditions were not met while I had the scanner on. Thank you

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

15EMA/50SMA crossover screener fault?


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by thetragiccircle
7 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/14/2019
Status: Active
Attachments: No files
Logo Logo
Loading...