Hello Nic and all,
I am trying to create a Proscreener for EMA 4 (CLOSE) crosses EMA 10 (CLOSE) and vice versa but my screener seems to be not working as it is showing results for all pairs.
Could someone help me correct it please?
indicator1 = ExponentialAverage[4](close)
indicator2 = ExponentialAverage[10](close)
c1 = summation [100] (indicator1 CROSSES OVER indicator2)
SCREENER[c1]
Do you want to test if a crossover occur now? on the last bar only? or to know if it occurred from now to X previous ago too?
Hello Nic,
I would like to screen for crossover now. For both 4 ema crosses 10 ema and 10 ema crosses 4 ema.
Ok, so it is easy as ABC 🙂 Your code is almost good.
indicator1 = ExponentialAverage[4](close)
indicator2 = ExponentialAverage[10](close)
c1 = indicator1 CROSSES OVER indicator2
SCREENER[c1]
That’s awesome thanks Nic!
Will that also screen and show results whenever indicator 2 crosses indicator 1? Or do I have to add in something else?
No, you’ll have to change the c1 condition:
indicator1 = ExponentialAverage[4](close)
indicator2 = ExponentialAverage[10](close)
c1 = indicator1 CROSSES OVER indicator2 OR indicator1 CROSSES UNDER indicator2
SCREENER[c1]
No, you’ll have to change the c1 condition:
|
|
indicator1 = ExponentialAverage[4](close)
indicator2 = ExponentialAverage[10](close)
c1 = indicator1 CROSSES OVER indicator2 OR indicator1 CROSSES UNDER indicator2
SCREENER[c1]
|
Thanks Nic, that’s perfect now. Got it!
how can i add past x bars to show on the screener? please help..
Let’s say if I want the screener show the resutls of past 10 bars after the crossover?
You can change the screener condition this way, to get the last 10 bars results (if at least 1 crossover has occurred, the screener should give you this information)
indicator1 = ExponentialAverage[4](close)
indicator2 = ExponentialAverage[10](close)
c1 = indicator1 CROSSES OVER indicator2 OR indicator1 CROSSES UNDER indicator2
SCREENER[summation[10](c1)>0]
Hi Nicolas.. Thank you very much for your reply! it works!! 🙂