Auto Fib (Fibonacci) Levels Indicator for ThinkorSwim

@tomsk the whole point of a touch is 90% of the time on the 5 min chart when the stock rips up and touches the 161.8% its quite the resistance and it does a nice pullback i will instantly buy the put expiring that friday and run it down 1 or 2 fib levels ,believe it or not i grew my account this past week by 100% along with my brother and sister . Its a great technique. i want a watchlist that will alert me (a stock will pop up in it) when it hits the 161.8 on the 5 min . Then i will goto that stock and asses the situation . Dont know if you do options but the technique is great. Look at NFLX on 1/24/20 the 5 min chart the high was 161.8 as soon as i saw a hard time getting through i brought the put . As you can imagine it was a 400% trade. So what Im getting at if you can come up with something it will greatly benefit you as well . Im a moron when it comes to making scripts . But I do know what works but I cant make it .

To hopefully provide the results that you want, @Buckbull, you can append @tomsk's code as modified to the bottom of the swinghl_fibs_v15 script as follows:
def triggerLow = open > fib6 and low <= fib6;
def triggerHigh = open < fib6 and high >= fib6;
plot scan = triggerLow or triggerHigh;

Then in the scanner, add this as a custom study filter:
SwingHL_Fibs_v15()."scan" is true

Although you seem unhappy with the modifications to this code, I did them to respond to requests so that users may understand the code and eventually be able to do things on their own.

As to your last request as to responsiveness, you can adjust the inputs: swingback1 and/or swingforward1.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

@BLT Much appreciated in looking through this, a real novel approach in carving a workaround to the scanner complexity problem encountered earlier. Applying those three modified statements to V1.5 (I named this modified approach V1.5a on my end), I was able to obtain 42 results running a scan against the S&P 500 on a daily aggregation. A very nice fresh approach, very much obliged.
 
Ok let me see if I got this right .....

Im copying the v15 script
then go in scan tab goto add study paste it in Thinkscript editor

then add this script to the bottom of it
like so.
def triggerLow = open > fib6 and low <= fib6;
def triggerHigh = open < fib6 and high >= fib6;
plot scan = triggerLow or triggerHigh;



xrsuWuu.png



Then I do this and its done ? I think I did it right . lol Probably not .

fIooEvG.png
 
No, you add the code to the study and save it. Then you go to the scanner and add the scanner code provided.
 
No, you add the code to the study and save it. Then you go to the scanner and add the scanner code provided.
ok i added this to the actual study and saved it

def triggerLow = open > fib6 and low <= fib6;
def triggerHigh = open < fib6 and high >= fib6;
plot scan = triggerLow or triggerHigh;

then i went to scanner clicked add study pulled it up and this comes up . Now is it right ?
IHdIc26.png
 
Although you seem unhappy with the modifications to this code, I did them to respond to requests so that users may understand the code and eventually be able to do things on their own.
I am not unhappy at all , I have been looking for a thing like this for a long time . I 100% appreciate your time and help . Cant thank you enough !
 
Have been thinking about this idea for a while and wanted to ask if this is possible to code into a new script. So basically what i`m looking for is a combination of the FibChoices v.1 study by @BLT posted here and the Woodies Pivots study. And more specifically, i want to combine these two studies to find out when a retracement/upper extension level in FibChoices coincide with one of the 3 resistance levels in Woodies study. So for example, let`s say the R3 Pivot is at price 10.50 and there is also currently an extension level in FibChoices at price 10.49. So they are very close to each other and whenever these prices coinside, i want to be notified by an alert sound and possibly also a label that lights up and says "match" for example. The price margin should be +- 3 cents.

Can this be coded?

And if you`re asking me why i don`t combine these two studies on the same chart already is because i use them on different timeframes and prefer it that way. It`s also the alert function i am mostly interested in so if anyone can have a look at this and maybe help me code it, would be very grateful.
 
Last edited:
@BLT Scan worked good but im trying to figure out the right settings . Whats the definition of MaxBars1 ? Is it how far back it looks in time ?
 
Actually maxbars1 can be deleted/ignored as it is not used in this version. When I coded this, I borrowed from code I had previously used, which I found did not need this limiter, and deleted it the rest of the code, but not the input maxbars1. Just use the inputs for swingback1 and/or swingforward1 to adjust the swings to your best use.
 
I am am looking for charting code to project the mean of the previous weeks (week1) action (VWAP) on the Friday close into the new week as a horizontal line along with 4 parallel Fib lines. The slope of that week (week1) (ie Bullish or Bearish) should adjust the new weeks Fib lines so the Fib lines distances and values from the mean in the current week(week2) will be reversed and/or adjusted depending on the direction and degree of the bullish/bearish trend. So the resulting chart should show all days of the current week(week2) with the 5 horizontal lines as of Sunday projecting out to the end of Friday. When the last price crosses a fib line in a particular direction a Buy or Sell alert should be generated.(Audible and email) Each week (After Friday close) a new Centerline and associated Fib lines should be projected into the coming week from the previous weeks ending VWAP.
Another possible approach might be to project the actual VWAP from week1 as a diagonal and project the Fib lines with the same slope as the VWAP but this would not be as easy to read. I do not want continuously changing Fib lines - only weekly projections.
I am not clear on how to draw based on time periods. It seems to me these don't adjust depending on the time frame selected. If I want to set a variable based on a certain range of days in a previous week how does that not change if I switch the view from days to weeks, etc. There doesn't seem to be any of the Java date builtins. How does one specify a starting point of Sunday at open for a one week period starting at the beginning of the previous week and ending at the close on Friday of that week ? How is a horizontal line projected into the coming week? Is there any way to specify a chunk of Java code within a thinkscript?
Any pointers? Thanks.
 
Thanks guys for giving a nice script V15, i've a query here is there any setting to show the Fib % bubble towards left side instead of changing the Time axis settings? @Buckbull
 
Yes, at the input: bubble_mover, enter minus numbers until the bubbles are moved to the left to where you would like them.
 
Hello, I have a certain fib level from the previous month plotted onto this month's chart. I want to scan for when the price crosses this level on an intraday basis, but the problem is, they both (Price and Fib) need to be on a monthly period, which doesn't help me on an intraday basis. Does anyone have a solution for that? thanks in advance
 
Hello everyone. Can someone please help me find out how to remove some of the lines? I'm trying to see just the 100, 0, 61.8 and the 50% lines. Thank you.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
512 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top