3 Bar Play - Pattern Scan?

BenTen

BenTen

Administrative
Staff
VIP
@TopDog I don't know about that indicator. Not sure why they only have the bullish script and scanner.
 
T

TopDog

New member
VIP
@Len20 Were you able to build the bearish version of this study ? Bullish version looks like it's working on momentum trades. Just wondering..
 
L

Len20

Member
I was only able to make the bullish version so far. I will probably convert it to bearish at some point but I'm pretty slow at coding and making it work (not a coder in real life), and I haven't had the time to work on it recently. When I do get it done, I will definitely post it here. I'd say a week or two at least
 
Last edited:
L

Len20

Member
Updated my code on page 1 (HERE) to V 1.6. Now includes bullish and bearish indicator and scans.
Adding bearish mode made the code "complex" so the bullish and bearish scans had to be separate, but the indicator is combined and configurable. The scan can be configured to look for at minimum the ignitor bar, the pause bar/s, or the trigger bar.
 
TonyFE

TonyFE

New member
VIP
Remember there is more to the 3/4 bar play than developing the indicator, as per Jarret Live traders. His concept works most of the time. I played with some coding, i'm no expert, but I tinkered with the basic concept and had trouble with meeting some of the Official criteria such as the 1st "above avg" wide bar not being in the middle of a trend. If you can get this to work with the SwingArms - bingo.
 
Z

zbostick

New member
@Len20 Would you be able to do this for Trading View? Or let me know what charting platform this code works with?
 
L

Len20

Member
@zbostick I don't know anything about coding for TradingView unfortunately. This code is for Thinkorswim by TD Ameritrade
 
Z

zbostick

New member
@zbostick I don't know anything about coding for TradingView unfortunately. This code is for Thinkorswim by TD Ameritrade
@Len20 Yeah I downloaded ThinkorSwim, but for some reason I cannot get it to work. I dont know if should show past results or not, but working on it now. I don't know if you could get me the rundown on where to paste each section of code or not, would be awesome if you have the time to do so! If not, I will keep tinkering!
 
Last edited:
L

Len20

Member
@zbostick
For the indicator on the chart, go to Studies, Edit studies..., "Create" button, Thinkscript editor tab, erase the default line of code and paste in the desired code, click OK.
For the scan, go to scanner tab, add filter, Study, change study to "Custom...", choose thinkscript Editor tab, erase existing line and paste scanner code in there, click OK, add whatever other filters you like. Click scan
For more details, I believe there are some tutorials on this site
 
L

luicius

New member
@Len20, how effective are your scans with Futures?
Would the following be the only settings I have to adjust?
Code:
def start = 0000;
def end = 2359;
I generally trade in the 5 minute time frame.
Would I have to enable EXT hours for the 5 min?
 
L

Len20

Member
@luicius I honestly know nothing about futures but I think the scan would still work the same as stocks. The start and end times are only used in determining if there is an uptrend/downtrend. The lookback for the trend won't go beyond the start or end time.

-If you still want results even during an uptrend, just set Show_During_Uptrend = yes and the times are not even used (or Show_During_Dntrend or Show_During_Trend)
-If you want to set it to no to hide patterns during a trend, just change the times to the opening hours and closing hours for the futures.
-If futures are 24hrs ( I have no clue lol), just change the 2 lines defining the variables diffTimeZone1 and diffTimeZone2 to
Code:
def diffTimeZone1 = 0;
def diffTimeZone2 = 0;
That should solve it
 
Last edited:
L

luicius

New member
@Len20 Futures are very similar to stocks. Main difference is they trade virtually 23 hours from Sunday 6PM ~ Friday 5PM.
Futures stop trading each weekeday at 5PM for an hour for maintenance. The tricky part of your scan is the EXT toggle. I will continue backtesting your scan for Futures.
 
L

Len20

Member
@luicius In that case, I think I would set it as
Code:
def start = 1800;
def end = 1700;
I don't know how the EXT Hours checkbox applies to futures though. My best guess is to leave it checked
 
L

luicius

New member
There are traders who only trade certain stocks and was wondering is there a way to only run the script on certain symbols like APPL, NFLX, TSLA, AMD, FB, BYND, and BABA?
 
S

sindhu19

New member
2019 Donor
There are traders who only trade certain stocks and was wondering is there a way to only run the script on certain symbols like APPL, NFLX, TSLA, AMD, FB, BYND, and BABA?
make a watchlist with those names and run the scan refer to it.
 
L

leo2022

New member
Hey folks, new trader here.

I'm also very interested in the 3BP. Although if you scan for the pattern as described above in its complete form you're actually missing the correct entry point. According to the video he says that entry point is the moment the trigger bar or last bar reaches the level of the narrow bars. Does anyone know how to tweak the script to look for the entry igniting bar(s) then 2 or 3 narrow bars. I guess if the scanner picks it up I would have to watch and wait to see if the last entry bar becomes an entry bar.
Thanks
 
L

Len20

Member
@leo2022
Near the top of my scan code there is a place where you can choose the minimum to scan for:
Code:
# CHOOSE SCAN MODE #
# ( 1 = Ignitor Bar , 2 = Pause Bars , 3 = Trigger Bar )
input scanMode = 3;
Just change the 3 to a 1 or 2 to change the mode
 
L

leo2022

New member
@leo2022
Near the top of my scan code there is a place where you can choose the minimum to scan for:
Code:
# CHOOSE SCAN MODE #
# ( 1 = Ignitor Bar , 2 = Pause Bars , 3 = Trigger Bar )
input scanMode = 3;
Just change the 3 to a 1 or 2 to change the mode
Thanks :)
 

Similar threads

Top