Coding assistance with screener
Forums › ProRealTime English forum › ProScreener support › Coding assistance with screener
- This topic has 8 replies, 3 voices, and was last updated 1 month ago by
Peterphe.
-
-
07/23/2024 at 8:38 PM #235689
Ive created this screener.
1234567c1 = (((close - close[1])/close[1]) * 100) > 3.7 and volume>volume[1] and average[10](volume) > 200000c2 = range[1]/close[1]*100 < 2c = c2 and c1SCREENER(c as "test")In short it searches for a candle with range less then 2% the day before and a 4% increase of price the day/close, and some volume criteras.
Could someone help me figure out why it didnt triggered here, but instead got triggered here? See pic.
07/23/2024 at 10:17 PM #23569507/24/2024 at 12:08 PM #235714In addition your code DOES NOT trigger anything, as it simply returns ALL scanned instruments since you used C as a criterion, not as a condition.
Replace the last line by:
1SCREENER[c](c as "test")1 user thanked author for this post.
07/31/2024 at 4:07 PM #235983I’m still having problems with my code Robert. Do you have minute to assist me on this? 🙂
I want to screen for a small price move yesterday (yesterday’s high – yesterday’s open = ±3%) and a bigger move today (>5% move). This screener gives me a few good cases, but it also gives me a couple that are completely wrong. The wrong cases had a downward price move of more than 6% yesterday.
This time I know the screener has access to real time data.
123456c1 = (((close - close[1])/close[1]) * 100) > 5 and volume>volume[1] and average[10](volume) > 200000c2 = abs((((high[1] - open[1])/open[1]) * 100)) < 3SCREENER[c1 and c2]07/31/2024 at 6:49 PM #235987Hi,
For yesterday’s rise, you first have to determine if it is a rise (Close[1]>Open[1]) and then you have to specify an interval between which the price should end… For example: Price rising>2.5% and Price rising<3.5%...Acceleration Days1234c1=Close[1]>Open[1] and (High[1]-Open[1])/Open[1]*100>2.5 and (High[1]-Open[1])/Open[1]*100<3.5c2=(Close-Close[1])/Close[1]*100>5Screener[c1 and c2](((Close-Close[1])/Close[1]*100) as “Big Step%”)1 user thanked author for this post.
08/01/2024 at 4:01 PM #2360221c1=Close[1]>Open[1] and (High[1]-Open[1])/Open[1]*100>2.5 and (High[1]-Open[1])/Open[1]*100<3.5Thanks for your reply. Though Im pretty sure this is not what i want to scan for.
To me it doesnt matter if yesterdays move is up or down. I simply want to know if yesterdays move was a tight candle/narrow candle. And todays move is big/wide spread candle. See picture.
1c2 = abs((((high[1] - open[1])/open[1]) * 100)) < 3To my understanding c2 in my code above should give me:
absolute value of ( ( yesterdays high – yesterdays low ) in percent ) < 3 percent
But its only accurate in 50 or 60% of the cases. Why its not completely accurate I dont understand.
08/01/2024 at 5:48 PM #236034As to c1, 5% is really high on DAX (roughly 900 pips in a day), it may work with stocks, instead.
Also average[10](volume) > 200000 is a quite high value.
1 user thanked author for this post.
08/01/2024 at 6:10 PM #236035Instead of using a “Range” relative to the “Open” of the candle, you might want to compare the “Range” between them, for example:
C1=Range/Range[1] > 3
The Range of the current candle must be at least 3x larger than the “Range” of the previous candle…
Acceleration Days1234c1=Range/Range[1]>3c2=(Close-Close[1])/Close[1]*100>5Screener[c1 and c2](((Close-Close[1])/Close[1]*100) as "Big Step%")2 users thanked author for this post.
08/04/2024 at 12:25 AM #236114Im not trading DAX with this. Im trading smaller nastaq stocks.
Sorry guys, its like im having dyslexia when Im writing code. This line should of course be c2 = abs((((close[1] – open[1])/open[1]) * 100)) < 3. NOT c2 = abs((((high[1] – open[1])/open[1]) * 100)) < 3. Now I hope it will work just fine.
Regarding Range, I dont think it will suit screeners for small stocks. My impression is that small stocks Range is almost never tight, instead the stocks are pretty much allways trading to their ATR%, which is often around 5% or higher. Though close and open can still create narrow candles/”tight candle”. So when I want to find a stock were buyers and sellers havnt pushed to price in any direction yesterday, and a big move today/current day, I think absolute value ( close-open/open*100) will suit my purpose better.
-
AuthorPosts
Find exclusive trading pro-tools on