Checking daily criteria in an intraday screener possible?
08/03/2023 at 3:16 PM #218551
I use a simple Engulfing Pattern screener on a M15 chart on all Nasdaq stocks. Now I want to use a volume and price filter and the daily chart should have more than 250 candles.
The following filter is working perfect if I use the screener on a daily timeframe but I am not sure how to apply these filters in a M15 screener. Can somebody help me?12345678910minCapital=10000000minShares=100000minPrice=10conditionCapital=0if close>minPrice and barindex>250 thenaverageCapital=(summation(volume*close)-highest(volume*close))/30averageShares=(summation(volume)-highest(volume))/30conditionCapital=averageCapital>minCapital and averageShares>minSharesendif
I only want to see stocks which have an average volume of at least $10 million and 100k shares per day in the last 30 days.08/03/2023 at 3:44 PM #218553
I just searched the forum and found this. Would this be correct in my case?1234567891011121314minCapital=10000000minShares=100000minPrice=10conditionCapital=0timeframe(daily)if close>minPrice and barindex>250 thenaverageCapital=(summation(volume*close)-highest(volume*close))/30averageShares=(summation(volume)-highest(volume))/30conditionCapital=averageCapital>minCapital and averageShares>minSharesendiftimeframe(default)if conditionCapital then......08/03/2023 at 4:01 PM #218554
The code is correct, but I fear it won’t work correctly because of the 256-bar limit with IG (even with PRT Premium, 1024 bars are not enough), as in a single day thare are 96 15-minute bars, which yields 24K bars when multiplied by 250 days.08/03/2023 at 4:07 PM #21855509/11/2023 at 3:50 PM #220768
I have another question regarding the same topic. I use an intraday screener and want to check very simple daily criteria but there must be something wrong with my code.1234567timeframe(daily)uptrend=close>ExponentialAverage(close) and ExponentialAverage(close)>ExponentialAverage(close)conditionCapital=(volume+volume+volume)/3>=300000 and close>10 and DHigh(1)-DLow(1)>1filter=uptrend and conditionCapitaltimeframe(default)if filter then
As you can see I want the current price above the EMA50 and the EMA50>EMA100. This is my very simple trend definition. Then I want a minimum average volume of 300k shares in the last 3 days. Price must be >10 USD and the daily price range of yesterday must be > 1 USD.
When I start the screener it doesn’t find anything. Can anyone help me with this? Thank you!09/11/2023 at 6:57 PM #220798
You say “I want the current price above the…” but you use “Close” which is yesterday’s Close price…?
The same goes for EMA50 and EMA100, you also use yesterday’s values here…
Why do you use a second time frame (Default)…???
Don’t you mean just the screener below…Trending Stocks1234567891011121314TimeFrame(Daily)EMA50=ExponentialAverage(Close)EMA100=ExponentialAverage(Close)C1=Close>EMA50C2=EMA50>EMA100C3=(Volume+Volume+Volume)/3 > 300000C4=Close>10C5=Range>1Filter=C1 and C2 and C3 and C4 and C5Screener[Filter]09/11/2023 at 7:07 PM #220801
I am sorry, that was a misunderstanding. You are absolutely right. I want yesterday’s close price above yesterday’s EMA50 and yesterday’s EMA50 must be above yesterday’s EMA100. Additionally I want minimum 300k as the average volume of the last 3 days, yesterday’s close above 10 USD and yesterday’s price range must be > 1 USD.
These are only the criteria for the daily timeframe. If they are all met, my intraday M15 screener looks for engulfing patterns. Therefore I use the screener on the M15 timeframe but I need to be sure that the daily criteria are also met. I just don‘t know how exactly I refer to daily criteria in an M15 screener.09/11/2023 at 8:04 PM #220806
Is this what you meant…Trending Stocks12345678910111213141516171819TimeFrame(Daily)EMA50=ExponentialAverage(Close)EMA100=ExponentialAverage(Close)C1=Close>EMA50C2=EMA50>EMA100C3=(Volume+Volume+Volume)/3 > 300000C4=Close>10C5=Range>1Filter=C1 and C2 and C3 and C4 and C5TimeFrame(Default)Bearish=Close>Open and Open>Close and Close<OpenBullish=Close<Open and Open<Close and Close>OpenScreener[Filter and Bearish or Filter and Bullish]09/11/2023 at 8:11 PM #220807
This is exactly what I mean. Your coding style is so „elegant“, I definitely need to learn that style too.
Just one thing: I want to optimize the screener therefore the calculation for the M15 engulfing pattern must only be done if the daily criteria are met. Therefore I used the syntax „if filter then“.
That has the following reason: In the future I won‘t only scan for an engulfing pattern on the M15 but I want to screen for more complex structures like double tops or double bottoms. And it‘s unnecessary work to screen for a complex pattern if the (simple) daily criteria are not fulfilled.09/11/2023 at 8:30 PM #220810
When you use the condition “filter” in the “screener[filter…]” then only the stocks where these conditions are true are selected (here on a daily basis)…
So, the screener does already what you want…09/11/2023 at 8:51 PM #220811