Welcome to NexusFi: the best trading community on the planet, with over 200,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
The below code is for finding stocks that provides the VSA Green Arrow indications in TOS Scan Hacker. This code must be entered as one of the criteria and as custom code. I also add criteria for price above 5 and volume above 300,000 shares for day. The nice thing about the code is that you can selectively use for monthly, weekly, daily, etc by changing the time period. This may affect the volume filter but I am not sure.
# Check if the close is in the Highs/Lows/Middle of the bar.
# C_RP 20100809
# original code - def x1 = if (close == low) then avgSpread else (spread /(close - low));
def x1 = if (high == low) then 2.0 else if (close == low) then 2.65 else (spread /
(close - low));
# C_RP try the line below with various divisors totalSum result in a minimum of 2.3 on a spread of 1 pip instead of using a fixed 2.3 as in the line above
# def x1 = if (high==low) then 2.0 else if (close == low) then (spread / 0.43 ) else (spread / (close - low));
# bycond2 C_RP UpClose on higher volume with all slopes down adds extra strength
def isStrengthConfirmationBar2 = (isUpBar[0] && isUpCloseBar[0] && volume[0] >
volume[1] && LongTermTrendSlope < 0 && bycond1[1]);
# Plot with green arrow
# green triangle up at bottom of the bar C_RP Green arrow up 4 * tickSize for strong strength_In_DownTrend
# plot isStrengthConfirmationBarPlot = if isStrengthConfirmationBar then (low - 5 * tickSize()) else if isStrengthConfirmationBar2 then (low - 9 * tickSize()) else Double.NAN;
plot isStrengthConfirmationBarPlot = (isStrengthConfirmationBar);
# green triangle up at bottom of the bar C_RP Green arrow up 7 * tickSize for strongest strength_In_DownTrend with isUpCloseBar
# plot isStrengthConfirmationBarPlot2 = if isStrengthConfirmationBar2 then (low - 9 * tickSize()) else Double.NAN;
Great code, Hornblower. How do you get the "rec" command to work in a ThinkScript custom quote? For a long time "rec" commands didn't work in ThinkScript custom quotes, they worked only in indicators and I've been looking for a way arround that or waiting for the TOS developers to change ThinkScript. Also, could you show me what part of your code is the reference indicator and which part is the custom quote? Thanks.
The code originated from the TOS thinkscript from the latest Volume Spread Analysis code (VPAV1_09Study.ts) provided in this thread. I just extracted the code from that source that is necessary for scanning only for a green arrow and let the TOS scanner find those stocks meeting the criteria. Remember the code is limited to find those stocks that have a green arrow for that day but could be modified for green arrow for week, hour, etc by selecting the aggregate period. The default is the "D" (daily).
Early question on why the "rec" works is not important. All I know is that it works now when you paste the code into the custom box for scanning. If you get errors, just modify the code to make it work using thinkscript code. TOS may have also changed the rules in using "rec" since you previously utilized it. TOS also provides a wizard to aid "non-programmers" in building custom code.
I took the links provided and compiled them into a word document
Hope this proves useful/ helpful
Regardless of time frame (these seem to be day) this applies to all timeframes - if I didn't suggest day you would no different than five (5) minute intraday
I am wondering where this thread migrated to, there was mention of bigmike's. How is the study being used? Why is it a video file and how to import to TOS?
Appreciate any information, thanks.