3 bar play, 4 bar play
Forums › ProRealTime English forum › ProScreener support › 3 bar play, 4 bar play
- This topic has 23 replies, 4 voices, and was last updated 3 years ago by prosign.
-
-
11/14/2019 at 10:37 AM #112762
Hi,
are there any code ready for ProRealtime for a 3 vs 4 days play
desctibed here:
11/14/2019 at 10:39 AM #112763It’s a long video, you should recap the rules and maybe add some screenshots.
11/14/2019 at 10:47 AM #11276411/14/2019 at 11:42 AM #112769There you go:
Patterns 1-2-3-4 (3 & 4 Bars Play)12345678910111213141516171819202122232425262728293031323334353637383940414243444546// Patterns 1-2-3-4 (3 & 4 Bars Play)//// https://www.prorealcode.com/topic/3-bar-play-4-bar-play/// https://www.youtube.com/watch?v=eXO1EXDnCpEDEFPARAM CalculateOnLastBars = 2000Bullish = close > openBearish = close < openBody = abs(close - open)// Pattern1Pattern1a = Body > Body[1] AND Body[1] < Body[2] AND Body < Body[2]Pattern1b = Bullish AND Bearish[1] AND Bullish[2]Pattern1c = open > close[1] AND close > open[1] AND open < open[1]Pattern1d = open[1] = close[2] AND close[1] > open[2]Pattern1 = Pattern1a AND Pattern1b AND Pattern1c AND Pattern1d// Pattern2Pattern2a = Body > Body[2] AND Body[2] > Body[1] AND Body < Body[3]Pattern2b = Bullish AND Bullish[1] AND Bearish[2] AND Bullish[3]Pattern2c = open > open[1] AND close > close[1] AND open < close[1]Pattern2d = open[1] > close[2] AND open[1] < open[2] AND close[1] = open[2]Pattern2e = close[2] > open[3] AND close[2] < close[3] AND open[2] = close[3]Pattern2 = Pattern2a AND Pattern2b AND Pattern2c AND Pattern2d AND Pattern2e// Pattern3Pattern3a = Body > Body[1] AND Body[1] < Body[2]Pattern3b = Bearish AND Bullish[1] AND Bearish[2]Pattern3c = open < close[1] AND open > open[1]Pattern3d = open[1] = close[2] AND close[1] > open[2]Pattern3 = Pattern3a AND Pattern3b AND Pattern3c AND Pattern3d// Pattern4Pattern4a = Body > Body[2] AND Body[2] > Body[1] AND Body < Body[3]Pattern4b = Bearish AND Bearish[1] AND Bullish[2] AND Bearish[3]Pattern4c = open > close[1] AND open < open[1]Pattern4d = open[1] < close[2] AND close[1] = open[2]Pattern4e = open[2] = close[3] AND close[2] < open[3]Pattern4 = Pattern4a AND Pattern4b AND Pattern4c AND Pattern4d AND Pattern4e//Result = 0IF Pattern1 THENResult = 1ELSIF Pattern2 THENResult = 2ELSIF Pattern3 THENResult = 3ELSIF Pattern4 THENResult = 4ENDIFRETURN ResultI couldn’t get any result. I fear it’s because of the “=” operator.
That’s why I asked you for some details, because pics show equal levels as to close and open many times, but in real market it’s a very rare condition.
Anyway, you can study the code, which is very simple and intuitive, and change what you think needs to be changed.
1 user thanked author for this post.
11/14/2019 at 11:50 AM #11277311/14/2019 at 11:53 AM #11277511/14/2019 at 11:55 AM #112777Because this is an Indicator and you should use it in ProBuilder (as you requested using the ProBuilder support forum).
If you want to use it as a screener, just remove line 5 and replace the last line with:
1SCREENER ResultIf you used this forum by mistake and want to switch to ProScreener, just let me know and I’ll move it.
11/14/2019 at 12:08 PM #11278211/14/2019 at 12:18 PM #112786The correct syntax is:
1SCREENER[Result]In any case I’ll move the topic to ProScreener.
11/14/2019 at 2:06 PM #11279411/14/2019 at 2:43 PM #112802After the first RETURN line there cannot be any more lines, unless they are comments.
11/14/2019 at 2:51 PM #11280611/14/2019 at 3:20 PM #112809The code I posted is correct as an indicator.
To use it as a screener you just have to follow these two steps:
- remove (or comment out) line 5
- replace line 46 with
1SCREENER[Result]
11/22/2020 at 8:10 PM #151239Great code here.
In the youtube clip they just use this on the FIRST three or four bars when the market opens and it has to GAP from yeasterdays closing.So, can we first code that it is a major gap in from the first bar today, from the last bar yeasterday, for bull (patttern 1 and 2) we need to have a gap up, and for bear (pattern 3 and 5) we need to have a big gap down.
and to have this on only the first bars, should we put in a timestamp? or is it possible to know if it is the first bar for today?Thanks for the great work @robertogozzi
11/25/2020 at 1:25 AM #151473Can you make an example?
-
AuthorPosts
Find exclusive trading pro-tools on