invert Screener code
Forums › ProRealTime English forum › ProScreener support › invert Screener code
- This topic has 35 replies, 2 voices, and was last updated 9 months ago by sam00075.
-
-
12/20/2023 at 6:11 AM #225492
Hello the community,
is there a way to invert this screener, so we get the Bearish Breakouts instead of the Bullish ?
https://www.prorealcode.com/prorealtime-market-screeners/screener-break-out-with-high-volume/
Thanks in advance.
12/20/2023 at 10:42 AM #225500Hi @sam00075
Here’s the screener for the “Bearish BreakOut”…
Bearish BreakOut with Big Volume123456789101112131415161718192021222324252627282930313233343536373839// today variationtdVar = (Open - Close) / Close * 100// Var conditionavgVar = 0for i = 1 to 10 doif (close[i] > open[i]) thenavgVar = avgVar + (close[i] - open[i]) / open[i]elseavgVar = avgVar + (open[i] - close[i]) / close[i]endifnextavgVar = avgVar / 10 * 100c1 = tdVar > avgVar// Lowest break conditionminValue = Lowest[10](Low)[1]c2 = minvalue < Open and Close < minvalue// Volume conditionavgVol = average[20](volume)sum = 0for i=0 to 20if (volume[i] < avgVol*10) thensum = sum + volume[i]elsesum = sum + avgVolendifnextavgVol = sum / 21c3 = avgVol > 1000// Breakout Var%breakoutVar = (close - minvalue)/close*100// ScreenerSCREENER[c1 and c2 and c3](breakoutVar as "Breakout Var%")1 user thanked author for this post.
12/22/2023 at 11:25 PM #22565202/10/2024 at 9:27 PM #227869Hello @JS , thanks again for the last code, works like a charm.
I need your help for another one if you have time : I’d like to add some criterias to the screener “Break out with high volume”
https://www.prorealcode.com/prorealtime-market-screeners/screener-break-out-with-high-volume/
1- The price candle spreads the Bollinger band to the upside.
2- The MACD baseline is touched, and broken to the upside.
3- The volume is bigger than the last candle (tho i guess it’s already the case in the actual code ?)
I joined a picture as an example for the configuration i’m looking for.
Thank you in advance.
02/10/2024 at 10:18 PM #227871Hi Sam,
How many periods do you want to use for the Bollinger Band and how much standard deviation?
The BollingerUp[period](Close) uses 2 standard deviations I think…
For the MACD, use the line: MACDLine[12,26,9](Close) or MACD[12,26,9](Close)?
The volume larger than the last candle is not yet specific in the code but is no more than: C5=Volume>Volume[1]
1 user thanked author for this post.
02/10/2024 at 10:46 PM #22787202/10/2024 at 11:44 PM #227874Hi @JS , thanks for the quick reply.
– i don’t know what the technical term is for the MACD : What i meant is Cross the Horizontal line, in direction of the upside, i think the Horizontal line value is 0,00
– for the bollinger band standard deviation, and periods, i have no idea, if you can please do what you think is best, we’ll ajust if needed.
– for the volume, let’s test the without adding this part, just keeping what’s in the original code, we’ll see if it’s needed after testing the code.
02/11/2024 at 12:17 AM #227875Hi Sam,
Hereby the screener with the extra conditions:
Break Out with Big Volume Plus12345678910111213141516171819202122232425262728293031323334353637383940414243444546// today variationtdVar = (close[0] - open[0]) / open[0] * 100// Var conditionavgVar = 0for i = 1 to 10 doif (close[i] > open[i]) thenavgVar = avgVar + (close[i] - open[i]) / open[i]elseavgVar = avgVar + (open[i] - close[i]) / close[i]endifnextavgVar = avgVar / 10 * 100c1 = tdVar > avgVar// highest break conditionmaxValue = highest[10](high)[1]c2 = maxvalue < close and open < maxvalue// Volume conditionavgVol = average[20](volume)sum = 0for i=0 to 20if (volume[i] < avgVol*10) thensum = sum + volume[i]elsesum = sum + avgVolendifnextavgVol = sum / 21c3 = avgVol > 1000// Breakout Var%breakoutVar = (close - maxvalue)/close*100// Extra Conditionsc4=Close Crosses Over BollingerUP //The price candle spreads the Bollinger band to the upside.c5=MACD[12,26,9](Close) Crosses Over 0 //The MACD baseline is touched, and broken to the upside.//c6=Volume>Volume[1] //The volume is bigger than the last candle// ScreenerSCREENER[c1 and c2 and c3 and c4 and c5](breakoutVar as "Breakout Var%")1 user thanked author for this post.
02/11/2024 at 12:38 AM #22787702/11/2024 at 12:46 AM #22787902/11/2024 at 12:50 AM #22788002/11/2024 at 12:54 AM #22788202/11/2024 at 1:05 AM #22788302/11/2024 at 1:09 AM #22788402/11/2024 at 1:14 AM #227885 -
AuthorPosts
Find exclusive trading pro-tools on