VSA for ThinkorSwim - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


VSA for ThinkorSwim
Updated: Views / Replies:170,000 / 429
Created: by cbritton Attachments:131

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 131  
 
Thread Tools Search this Thread
 

VSA for ThinkorSwim

  #411 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: TOS
Favorite Futures: stocks
 
Posts: 5 since Mar 2013
Thanks: 3 given, 0 received


Hornblower View Post
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.


# Arguments

def volumeEMALength = 30;
def narrowSpreadFactor = 0.7;
def wideSpreadFactor = 1.5;
def aboveAvgVolfactor = 1.5;

#######
# Calculations

rec spread = high - low;
def median = (high + low ) / 2;
rec avgVolume = compoundValue(volumeEMALength, ExpAverage(volume,
volumeEMALength), Double.NaN);

# Calculate Volume moving average and it's standard deviation
rec sAvgVolume = compoundValue(volumeEMALength, Average(volume,
volumeEMALength), Double.NaN);
def sAvgVolumeSTD = stdev(sAvgVolume, volumeEMALength);

# check if the vloume has been decreasing in the past two days.
def isTwoDaysLowVol = (volume < volume[1] && volume[0] < volume[2]);

# Calculate Range information
def avgSpread = WildersAverage(spread, volumeEMALength)[0];
rec isWideSpreadBar = (spread > (wideSpreadFactor * avgSpread));
rec isNarrowSpreadBar = (spread < (narrowSpreadFactor * avgSpread));





# 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));

# Price information
rec isUpBar = close > close[1];
rec isDownBar = close < close[1];
def isUpCloseBar = (x1 < 2);
def isDownCloseBar = (x1 > 2);
def isMidCloseBar = (x1 < 2.2 && x1 > 1.8);
def isVeryHighCloseBar = (x1 < 1.35);
# C_RP 20100809 added isVeryLowCloseBar
def isVeryLowCloseBar = (x1 >= 2.65);


# Trend Definitions

rec fiveDaysSma = compoundValue(5, Average(close, 5)[0], Double.NaN);
def LongTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
40)[0];
def ShortTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
5)[0];
def MiddleTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
15)[0];

# stdn, stdn0, stdn1, stdn2
def strengthInDownTrend = (volume[0] > volume[1] && isDownBar[1] && isUpBar[0]
&& (isUpCloseBar or isMidCloseBar) && ShortTermTrendSlope < 0 &&
MiddleTermTrendSlope < 0);

def strengthInDownTrend1 = (volume[0] > (sAvgVolume[0] * aboveAvgVolfactor) &&
isDownBar[1] && isUpBar[0] && (isUpCloseBar or isMidCloseBar) &&
ShortTermTrendSlope < 0 && MiddleTermTrendSlope < 0 && LongTermTrendSlope < 0);
def strengthInDownTrend2 = (volume[1] < sAvgVolume[0] && isUpBar[0] &&
isVeryHighCloseBar && volume[0] > sAvgVolume[0] && ShortTermTrendSlope < 0);


rec bycond1 = (strengthInDownTrend or strengthInDownTrend1);
# bycond


def isStrengthConfirmationBar = (isUpBar[0] && bycond1[1]);

# 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;

Thanks for the green arrow scan hornblower - works great. i added the scan to my watchlists, also added a label and assignbackground color.

def cond1 = isStrengthConfirmationBarPlot >0;
addLabel (cond1, "^", Color.BLUE);

assignbackgroundcolor(if cond1>0 then color.green else color.black);

Is it a lot of work for you to extract the code (from VPA1_09) for red down arrows? I'll have a try and see how far I can get. Thanks


Last edited by Haggerstone8; December 8th, 2014 at 03:37 PM.
Reply With Quote
 
  #412 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: TOS
Favorite Futures: stocks
 
Posts: 5 since Mar 2013
Thanks: 3 given, 0 received

Here's the code for Red DownArrow, seems to be working. But it's messy I'll try to clean up later.
I tested it with Russell 2000 and 1000.


# Arguments

def volumeEMALength = 30;
def narrowSpreadFactor = 0.7;
def wideSpreadFactor = 1.5;
def aboveAvgVolfactor = 1.5;

#######
# Calculations

rec spread = high - low;
def median = (high + low ) / 2;
rec avgVolume = compoundValue(volumeEMALength, ExpAverage(volume,
volumeEMALength), Double.NaN);

# Calculate Volume moving average and it's standard deviation
rec sAvgVolume = compoundValue(volumeEMALength, Average(volume,
volumeEMALength), Double.NaN);
def sAvgVolumeSTD = stdev(sAvgVolume, volumeEMALength);

# check if the vloume has been decreasing in the past two days.
def isTwoDaysLowVol = (volume < volume[1] && volume[0] < volume[2]);

# Calculate Range information
def avgSpread = WildersAverage(spread, volumeEMALength)[0];
rec isWideSpreadBar = (spread > (wideSpreadFactor * avgSpread));
rec isNarrowSpreadBar = (spread < (narrowSpreadFactor * avgSpread));





# 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));

# Price information
rec isUpBar = close > close[1];
rec isDownBar = close < close[1];
def isUpCloseBar = (x1 < 2);
def isDownCloseBar = (x1 > 2);
def isMidCloseBar = (x1 < 2.2 && x1 > 1.8);
def isVeryHighCloseBar = (x1 < 1.35);
# C_RP 20100809 added isVeryLowCloseBar
def isVeryLowCloseBar = (x1 >= 2.65);


# Trend Definitions

rec fiveDaysSma = compoundValue(5, Average(close, 5)[0], Double.NaN);
def LongTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
40)[0];
def ShortTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
5)[0];
def MiddleTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length =
15)[0];



# utbar

#rec isWideSpreadBar = (spread > (wideSpreadFactor * avgSpread));

#def MiddleTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = midTermLength)[0]; # 15

rec isUpThrustBar = isWideSpreadBar && isDownCloseBar && ShortTermTrendSlope > 0 && middleTermTrendSlope > 0; #C_RP added positive middleTermTrendSlope requirement to filter out upThrusts in trends that are only short term. Consider adding longTermTrendSlope requirement as well.

# utcond1

def upThrustConditionOne = (isUpThrustBar[1] && isDownBar);


# utcond2

def upThrustConditionTwo = (isUpThrustBar[1] && isDownBar[0] && volume > volume[1]);

# utcond3

def upThrustConditionThree = (isUpThrustBar[0] && volume > 2 * sAvgVolume[0]);

# scond1

rec isConfirmedUpThrustBar = (upThrustConditionOne OR upThrustConditionTwo OR upThrustConditionThree);

# scond

rec isNewConfirmedUpThrustBar = (isConfirmedUpThrustBar[0] && !isConfirmedUpThrustBar[1]);


#Plot with Red Down Arrow

# new confirmed upthrust bar - red triangle (down) on top C_RP red arrow down at 4 * tickSize for conditions 2 and 3

plot isNewConfirmedUpThrustBarPlot23 = if isNewConfirmedUpThrustBar && (upThrustConditionTwo or upThrustConditionThree) then (high + 4 * tickSize()) else Double.NAN;

isNewConfirmedUpThrustBarPlot23.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

isNewConfirmedUpThrustBarPlot23.SetDefaultColor(Color.Red);

isNewConfirmedUpThrustBarPlot23.HideBubble();

isNewConfirmedUpThrustBarPlot23.HideTitle();

Reply With Quote
 
  #413 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

VSA


@StockJock

That VSA excel spreadsheet you're referencing can be found (not sure if you already know) over at thinkscripter dot com

Pro Member, Door Number Three, Building a Better Volume Spread Analysis

First three or four pages of the thread

After that it meanders off to here and there, then comes back into focus (SwimTrader does a damn good job)

There's a plethora of info in that thread

I've a few contributions/ additions towards the end (here2learn)

Hope this helps

Keep the rubber side down

-Bill_M

Reply With Quote
 
  #414 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

Scalping /CL

Here's a screenshot I took earlier this morning

The strategy behind this is you bracket up or down spike bars with the ToS fib tool (my usual pull is either low to high or high to low, 100, to 0 with levels of .67, .5 and .33)

So let's say we bracket a bar w/ open 6300 and close of 6330, the levels would be 6300, 6310, 6315, 6320 and 6330.

The idea behind this is to play those levels for long or short with emphasis on 50% or 33% ie it's staying in the upper or lower range of the spike bar (nothing novel or fancy, I think I might have originally got this from Al Brooks or?)

I'm not in this for the long haul, one contract (low risk reward) 4-5-6 ticks here and there - adds up quickly

/CL M1 12-9-14

Pull on the first spike up bar is 6322 to 6333, 50% 6328
Pull on the second spike up bar is 6341 to 6354, 50% is 6347

Leaving the long pull up on both bars (50% is 50%) the 6347 went resistance and the 6322 gave us an area where price reacted, resumed north

I'm not cherry picking these charts (pull up you own chart, software not needed) go over to the thread I started over at thinkscripter dot com

-Bill_M

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



EDIT

Here's a better screenshot of the above (the only diff is now I'm testing fib pull with .75 and .25 vs .67 and .33)

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Last edited by WilleeMac; December 9th, 2014 at 02:05 PM.
Reply With Quote
 
  #415 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

/CL scalpin VSA

/CLF5 12-10-14 M1

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



Study = VSA_Lite with Lookback 89, Standard Deviation Moves 1.985, -1.985

-Bill_M

Reply With Quote
 
  #416 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

Scalping /CL

Today M1, two red dots are 10000amET

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



-Bill

Reply With Quote
 
  #417 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



Wow

-Bill

Reply With Quote
 
  #418 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

/CL

Per the previous screen shots and below screenshot

The gray bars are normal spread/ volume, nothing taking place out of the ordinary: however one caveat - they are based on the look back period. Technically the bar(s) could be a wide spread or narrow spread on volume other than low volume etc (from experience this is not bad)

The yellow bars are low volume bars - I've added to the study to have them show as low volume if the volume on that bar is less than .30 volume of the bars in the look back period. I f you increase this factor (it can be set by the operator) then you would have less gray bars and more yellow bars.

The blue bars are churn bars - especially noticeable at the pit close (in conjunction w/ watching the DOM)

The cyan and magenta spike bars are exactly that. Keep in mind the volume on those bars is relative to what has happened in the look back period as well they are also based on a +/- 1.985 standard deviation move

An interesting thing concerning the spike bars - they can represent where they either hit the bid or lifted the offer

-Bill

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #419 (permalink)
Elite Member
Prospect, KY. USA
 
Futures Experience: None
Platform: Sierra Chart
Broker/Data: Infinity
Favorite Futures: /CL
 
WilleeMac's Avatar
 
Posts: 684 since Jan 2012
Thanks: 301 given, 608 received

I'm going to re-post a post I posted at thinkscripter dot com

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



When you see this at a high or reverse at a low, it's in your best interest to take note

However if a genius to hold /CL over many moons never mind

-Bill

PS

I have yet to see any of the ToS VSA study's posted here so far to be this robust

Curious

Reply With Quote
 
  #420 (permalink)
Trading Apprentice
Kansas City, MO USA
 
Futures Experience: Intermediate
Platform: TOS, Laser,IB
Favorite Futures: Stocks
 
Posts: 8 since Jul 2014
Thanks: 0 given, 5 received

VSA Effort to move UP


I don't have time to read back through all of these posts to see if this has been mentioned, but you can scan for "Effort to move UP" in TOS Stock Hacker. Use with Fibonacci retracements or Ambush Fibonacci and you will see a lot of these on the 1hr charts pushing through those levels. Use with TOS RelativeVolumeStDev for confirmation. To reduce noise I have unchecked the "show plot" for all plots except: Effort to move up, Effort to move down,Two/Three per, and Weakness... I feel these are the most significant and most prevalent. Also look for confirmation of a signal across multiple time frames. I see "Weakness" on the 133tick and 1m chart side by side quite often near a top with "Effort to move up" close behind. Multiple "Effort to move down" bars followed by an "Effort to move up" on 5m. I will post some screen shots when I get the time and make my post count.

Reply With Quote

Reply



futures io > > > > > VSA for ThinkorSwim

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume Spread Analysis (VSA) slumlord Traders Hideout 57 December 6th, 2017 01:19 AM
VSA indicator for MT4 sam1197 MetaTrader 12 December 21st, 2015 08:15 PM
VSA alexav Russian Traders 5 December 17th, 2012 05:03 AM
VSA in MC? TonyB MultiCharts 10 May 28th, 2011 11:37 AM


All times are GMT -4. The time now is 04:45 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-18 in 0.18 seconds with 20 queries on phoenix via your IP 54.221.136.62