Three inside up/down candlestick pattern screener
Forums › ProRealTime English forum › ProScreener support › Three inside up/down candlestick pattern screener
- This topic has 9 replies, 3 voices, and was last updated 7 years ago by Marcel van Vliet.
-
-
09/17/2017 at 3:20 PM #46414
Hi, I tried to modify the morning/evening star screener from @Francesco into a Three inside up/down screener. The screener seems to work but picks the pattern anywhere in the past.
I think the problem starts with identifying the base candle………?????
Does anybody (@Fransesco?) has an idea how to scan the last recent build patterns only?
12345678910111213141516171819202122232425262728293031323334353637383940//Author: Francesco modified: Marcel van Vliet//Date: 20-01-2017 Date: 16-09-2017//BaseCandle parameter = first candle of the pattern, starting from right (it is possible to run screener staring from any past candle)BaseCandle = 0Open0 = Open[BaseCandle]Close0 = Close[BaseCandle]Open1 = Open[BaseCandle + 1]Close1 = Close[BaseCandle + 1]Open2 = Open[BaseCandle + 2]Close2 = Close[BaseCandle + 2]Open3 = Open[BaseCandle + 3]Close3 = Close[BaseCandle + 3]Open4 = Open[BaseCandle + 4]Close4 = Close[BaseCandle + 4]//Three inside upC1=Open0<Close0 andClose1>Open0 and Close2<Close1 and Close3< Close2 and Open4≤Close3 and Open4<Close4//Three inside downC2=Open0>Close0 andClose1<Open0 and Close2>Close1 and Close3> Close2 and Open4≥Close3 and Open4>Close4//Go Short Signal = -1If C2 thenGo = -1endif//Go Long Signal = 1If C1 thenGo = 1endifCondition = (C1 or C2)SCREENER[Condition] (Go AS "Go")09/19/2017 at 8:05 AM #46554I discovered that the ‘greater than or equal sign’ and the ‘smaller than or equal sign’ are not valid in PRT language.
Can anyone, maybe @Nicolas help me out with this?
Thank you.
09/19/2017 at 8:18 AM #46561The problem in your code is that once you set your ‘Go’ variable to a value, the program keep this value until the code has finished reading the whole data history. You need to reset it to its default state if your C1 or C2 conditions are not true:
123456789//Go Short Signal = -1If C2 thenGo = -1//Go Long Signal = 1elsIf C1 thenGo = 1elseGo = 0endifIt should do the trick, please tell us.
09/19/2017 at 2:07 PM #46594@Nicolas, Thanks a lot.
Please, can you post me the ‘greater than or equal sign’ and the ‘smaller than or equal sign’ which are used in PRT?
I can’t find this in the manual.
Thanks you.
09/19/2017 at 2:17 PM #4659512IF close >= open THEN //Greater Than OR Equal toIF close <= open THEN //Smaller Than OR Equal to09/20/2017 at 5:11 PM #46724@robertogozzi Thanks a lot.
Is it worth the effort to upload the screener for the library?
09/21/2017 at 7:18 AM #46750Is it worth the effort to upload the screener for the library?
Sure! It could serve as a reference to other users around here 🙂 Thanks for sharing Marcel.
09/21/2017 at 9:05 AM #46767Here is the result of our ‘author combined screener’ for the three inside up/down candlestick pattern. Unfortunately I only have acces to Euronext stocks and Forex to test it. Is there somebody willing to test it on other securities before I load it up in the library?
1234567891011121314151617181920212223242526272829303132333435363738//Author: Francesco modified: Marcel van Vliet//Date: 20-01-2017 Date: 16-09-2017//BaseCandle parameter = first candle of the pattern, starting from right (it is possible to run screener staring from any past candle)BaseCandle = 0Open0 = Open[BaseCandle]Close0 = Close[BaseCandle]Close1 = Close[BaseCandle + 1]Close2 = Close[BaseCandle + 2]Close3 = Close[BaseCandle + 3]Open4 = Open[BaseCandle + 4]Close4 = Close[BaseCandle + 4]//Three inside upC1=Open0<Close0 and Close1>Open0 and Close2<Close1 and Close3< Close2 and Open4<=Close3 and Open4<Close4 and Close4>=Close0//Three inside downC2=Open0>Close0 and Close1<Open0 and Close2>Close1 and Close3> Close2 and Open4>=Close3 and Open4>Close4 and Close4 <=Close0//Go Short Signal = -1If C2 thenGo = -1//Go Long Signal = 1elsIf C1 thenGo = 1elseGo = 0endifCondition = (C1 or C2)SCREENER[Condition] (Go AS "Go")09/21/2017 at 10:17 AM #4677309/21/2017 at 6:32 PM #46858Ok, Thank you sure enough for me to upload it.
-
AuthorPosts
Find exclusive trading pro-tools on