Hi,
Please help me with a screening code for:
Moving average crossover between price and a 20 day moving average on a weekly chart.
Plus a filter e.g for shares between $1 and $5.
Regards,
Segie
There you go:
Timeframe(Daily)
Sma20 = average[20,0](close)
Timeframe(Weekly)
c1 = close CROSSES OVER Sma20
Timeframe(default)
c2 = (close >= 1) AND (close <= 5)
c3 = (high <> low)
Cond = c1 AND c2 AND c3
SCREENER[Cond]
Can a time period also be added?
For example, based on the previous weekly candle close.
So if I run a screener today I can screen for the previous weekly candle/ price close.
Regards,
Segie
You can check the previous weekly candle withy [1] and the 5th previous daily candle with [5]:
Timeframe(Daily)
Sma20 = average[20,0](close[5])
Timeframe(Weekly)
c1 = close[1] CROSSES OVER Sma20
Timeframe(default)
c2 = (close >= 1) AND (close <= 5)
c3 = (high <> low)
Cond = c1 AND c2 AND c3
SCREENER[Cond]
Hi,
Regarding Line 2. Will ‘close 5’ be affected by the type of day I run it?
Example on Friday, Saturday or the next Monday. Trying to figure out if it takes Saturday and Sunday into account?
Regards,
Segie
Regarding
[5] is the 5th previous trading day, so holidays are ignored.