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


VSA for ThinkorSwim
Updated: Views / Replies:169,556 / 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

  #311 (permalink)
Trading Apprentice
seattle usa
 
Futures Experience: Intermediate
Platform: tos
Favorite Futures: stocks
 
Posts: 3 since Apr 2011
Thanks: 0 given, 0 received

description on the screen

I can't get the per bar descriptions in the upper right of the screen. Anything I am missing? Everything else looks great!

Thanks for all your efforts.

Reply With Quote
 
  #312 (permalink)
Trading Apprentice
seattle usa
 
Futures Experience: Intermediate
Platform: tos
Favorite Futures: stocks
 
Posts: 3 since Apr 2011
Thanks: 0 given, 0 received

bar colors

OK- I got the descriptions down. Now I can only get gray bars with the black background. any thoughts?

Reply With Quote
 
  #313 (permalink)
Trading Apprentice
jennings missouri america
 
Futures Experience: Beginner
Platform: tos
 
Posts: 24 since Sep 2010
Thanks: 5 given, 27 received


edit the studies inputs by way of the drop down menu for colored bars.

Reply With Quote
 
  #314 (permalink)
Trading Apprentice
seattle usa
 
Futures Experience: Intermediate
Platform: tos
Favorite Futures: stocks
 
Posts: 3 since Apr 2011
Thanks: 0 given, 0 received

Hey T lipton-

Thanks for the reply.


I wanted to know if there is any way to change the color of the candles (not the trending candles but the non painted candles) I can only get them to be gray. Any help would be appreciated.
I want red candles down and green up. I change in appearance and it doesn't take.

Rod

Reply With Quote
 
  #315 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

# This is a conversion of the NinjaTrader VPA indicator.

# C_RP Original notes by cbritton are above. Changes made after 20100722 by Richard Paske are marked below by the C_RP comment tag.

# C_RP The next two comments are from the original comments by cbritton.
# The NT version used a LinRegSlopeSFX indicator for determining trends. Those have been
# replaced in this ToS version with a call to the built in LinearRegressionSlope indicator.

#######
# Arguments

input volumeEMALength = 30;
input narrowSpreadFactor = 0.7;
input wideSpreadFactor = 1.5;
input aboveAvgVolfactor = 1.5;
input ultraHighVolfactor = 2;
input highCloseFactor = 0.70;
input lowCloseFactor = 0.25;
input GdojiFactor = 0.2; # C_RP
input WickFactor = 0.1; # C_RP
input shortTermLength = 5; #C_RP
input midTermLength = 15; #C_RP
input longTermLength = 40; #C_RP
input colorBars = {false, default true}; #C_RP
input trendText = {false, default true};
input volumeDefinitions = { false, default true };
input alerts = { default false, true };

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

# Price information
rec isUpBar = close > close[1];
rec isDownBar = close < close[1];

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



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 = longTermLength)[0]; # 40
def MiddleTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = midTermLength)[0]; # 15
def ShortTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = shortTermLength)[0]; # 5

######################################################################
# VSA Definitions

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

# Two Period UpThrust Bar
rec isTwoPerUpT = isUpBar[1] && isWideSpreadBar[1] && isDownBar[0] && isDownCloseBar[0] && !isUpThrustBar[0] && (absValue(open[1] - close[0]) < (GdojiFactor * spread[1])) ;

# Three Period UpThrust Bar
rec isThreePerUpT = isUpBar[2] && isWideSpreadBar[2] && isDownBar[0] && isDownCloseBar[0] && !isUpThrustBar[0] && (absValue(open[2] - close[0]) < (GdojiFactor * spread[2])) ;


# C_RP 20100816
# rec isGraveDojiBar = (spread > avgSpread) && (open == low) && (close == low); totally strict Gravestone Doji. Revised version below identifies a candle with above average spread, a real body smaller than 20% of the spread, and a lower wick less than 10% of the spread as a Gravestone Doji pictured as a white triangle above the candle.

rec isGraveDojiBar = (spread > avgSpread) && (absValue(open - close) < (GdojiFactor * spread)) && ((absValue(close - low) < (WickFactor * spread)) or (absValue(open - low) < (WickFactor * spread))); # less strict Gravestone Doji


# trbar
def reversalLikelyBar = (volume[1] > sAvgVolume[0] && isUpBar[1] && isWideSpreadBar[1] && isDownBar[0] && isDownCloseBar && isWideSpreadBar[0] && LongTermTrendSlope > 0 && high == Highest(high, 10)[0]);

# hutbar
rec isPseudoUpThrustBar = (isUpBar[1] && (volume[1] > aboveAvgVolfactor * sAvgVolume[0]) && isDownBar[0] && isDownCloseBar && !isWideSpreadBar[0] && !isUpThrustBar[0]);
# hutcond
def pseudoUpThrustConfirmation = (isPseudoUpThrustBar[1] && isDownBar[0] && isDownCloseBar && !isUpThrustBar[0]);

# C_RP Failed UpThrustConfirmation or pseudoUpThrustConfirmation occurs when the close of bar following such confirmation is not lower than the close of the confirmation bar

rec isFailedUpThrustConfirmation = (isNewConfirmedUpThrustBar[1] or pseudoUpThrustConfirmation[1]) && close[0] >= close[1];

# tcbar
def weaknessBar = (isUpBar[1] && high[0] == Highest(high, 5)[0] && isDownBar[0] && (isDownCloseBar OR isMidCloseBar) && volume[0] > sAvgVolume[0] && !isWideSpreadBar[0] && !isPseudoUpThrustBar[0]);

# stdn, stdn0, stdn1, stdn2
def strengthInDownTrend = (volume[0] > volume[1] && isDownBar[1] && isUpBar[0] && (isUpCloseBar OR isMidCloseBar) && ShortTermTrendSlope < 0 && MiddleTermTrendSlope < 0);
def strengthInDownTrend0 = (volume[0] > volume[1] && isDownBar[1] && isUpBar[0] && (isUpCloseBar OR isMidCloseBar) && ShortTermTrendSlope < 0 && MiddleTermTrendSlope < 0 && LongTermTrendSlope < 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]);

# Failed strength in downtrend signal force a follow-up bar that closes below mid-point of confirmaton bar C_RP

def isFailedStrengthSignal = (isStrengthConfirmationBar[1] or isStrengthConfirmationBar2[1] or strengthinDownTrend2[1])&& close[0] <= (close[1] - (spread[1]/2));

# stvol
def stopVolBar = low[0] == Lowest(low, 5)[0] && (isUpCloseBar OR isMidCloseBar) && volume[0] > aboveAvgVolfactor * sAvgVolume[0] && LongTermTrendSlope < 0;

# C_RP stvol at highs - the opposite of stvol
def stopVolBarHighs = high[0] == Highest(high, 5)[0] && (isDownCloseBar OR isMidCloseBar) && volume[0] > aboveAvgVolfactor * sAvgVolume[0] && LongTermTrendSlope > 0;

# ndbar, nsbar
def noDemandBar = (isUpBar[0] && isNarrowSpreadBar[0] && isTwoDaysLowVol && isDownCloseBar);
# C_RP 20100809
# def noSupplyBar = (isDownBar[0] && isNarrowSpreadBar[0] && isTwoDaysLowVol && isDownCloseBar);
def noSupplyBar = (isDownBar[0] && isNarrowSpreadBar[0] && isTwoDaysLowVol && isUpCloseBar);

# lvtbar, lvtbar1, lvtbar2
rec supplyTestBar = (isTwoDaysLowVol && low[0] < low[1] && isUpCloseBar);
def supplyTestInUpTrendBar = (volume[0] < sAvgVolume[0] && Low[0] < Low[1] && isUpCloseBar && LongTermTrendSlope > 0 && MiddleTermTrendSlope > 0 && isWideSpreadBar[0]);
def successfulSupplyTestBar = (supplyTestBar[1] && isUpBar[0] && isUpCloseBar);

def successfulSupplyTestBar2 = (successfulsupplyTestBar[1] && isUpBar[0] && x1 <= 2 && volume[0] > volume[1]); # C_RP x1 finds Mid and UpCloseBars

# dbar
def distributionBar = (volume[0] > ultraHighVolfactor * sAvgVolume[0] && isDownCloseBar && isUpBar[0] && ShortTermTrendSlope > 0 && MiddleTermTrendSlope > 0 && !isConfirmedUpThrustBar[0] && !isUpThrustBar[0]);

# eftup, eftupfl, eftdn
def effortToMoveUpBar = (high[0] > high[1] && low[0] > low[1] && Close[0] > Close[1] && Close[0] >= ((high[0] - low[0]) * highCloseFactor + low[0]) && spread[0] > avgSpread && volume[0] > volume[1]);
def failedEffortUpMove = (effortToMoveUpBar[1] && (isUpThrustBar[0] OR upThrustConditionOne OR upThrustConditionTwo OR upThrustConditionThree));

def effortToMoveDownBar = ( ((high[0] < high[1]) OR (isWideSpreadBar && volume[0] > 1.5 * sAvgVolume[0])) && low[0] < low[1] && close[0] < close[1] && Close[0] <= ((high[0] - low[0]) * lowCloseFactor + low[0]) && spread[0] > avgSpread && volume[0] > volume[1]);


#C_RP old code - def effortToMoveDownBar = (high[0] < high[1] && low[0] < low[1] && close[0] < close[1] && Close[0] <= ((high[0] - low[0]) * lowCloseFactor + low[0]) && spread[0] > avgSpread && volume[0] > volume[1]);

######################################################################
# set the shapes on the graph

# upthurst and NOT confirmed - red square on top
plot upThrustBarPlot = if isUpThrustBar[0] AND !isNewConfirmedUpThrustBar[0] then (high + 2 * tickSize()) else Double.NAN;
upThrustBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
upThrustBarPlot.SetStyle(Curve.POINTS);
upThrustBarPlot.SetDefaultColor(Color.Red);
upThrustBarPlot.HideBubble();
upThrustBarPlot.HideTitle();

# C_RP 20100816
# any instance of a Gravestone Doji - white triangle on top
plot GraveDojiBarPlot = if isGraveDojiBar[0] then (high +4 * tickSize()) else Double.NAN;
GraveDojiBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
GraveDojiBarPlot.SetStyle(Curve.POINTS);
GraveDojiBarPlot.SetDefaultColor(CreateColor(255,255,255));
GraveDojiBarPlot.HideBubble();
GraveDojiBarPlot.HideTitle();

# C_RP
# Two Period UpThrust Plot - magenta triangle high on top
plot TwoPerUpTPlot = if isTwoPerUpT[0] then (high + 4 * tickSize()) else Double.NAN;
TwoPerUpTPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
TwoPerUpTPlot.SetStyle(Curve.POINTS);
TwoPerUpTPlot.SetDefaultColor(Color.magenta);
TwoPerUpTPlot.HideBubble();
TwoPerUpTPlot.HideTitle();

# C_RP
# Three Period UpThrust Plot - magenta triangle high on top
plot ThreePerUpTPlot = if isThreePerUpT[0] then (high + 4 * tickSize()) else Double.NAN;
ThreePerUpTPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
ThreePerUpTPlot.SetStyle(Curve.POINTS);
ThreePerUpTPlot.SetDefaultColor(Color.magenta);
ThreePerUpTPlot.HideBubble();
ThreePerUpTPlot.HideTitle();

# reversal likely - blue diamond on top C_RP red 6 * ticksize
plot reversalLikelyBarPlot = if reversalLikelyBar then (high + 6 * tickSize()) else Double.NAN;
reversalLikelyBarPlot.SetPaintingStrategy(PaintingStrategy.POINTS);
reversalLikelyBarPlot.SetDefaultColor(Color.Red);
reversalLikelyBarPlot.HideBubble();
reversalLikelyBarPlot.HideTitle();

# new confirmed upthrust bar - red triangle (down) on top C_RP for upThrustConditionOne only
plot isNewConfirmedUpThrustBarPlot = if isNewConfirmedUpThrustBar && upThrustConditionOne then (high + 2 * tickSize()) else Double.NAN;
isNewConfirmedUpThrustBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
isNewConfirmedUpThrustBarPlot.SetDefaultColor(Color.Red);
isNewConfirmedUpThrustBarPlot.HideBubble();
isNewConfirmedUpThrustBarPlot.HideTitle();

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

# strength in down trend - lime square on bottom C_RP cyan for weakest strengthInDownTrend
plot strengthInDownTrendPlot = if strengthInDownTrend then (low - 4 * tickSize()) else Double.NAN;
strengthInDownTrendPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
strengthInDownTrendPlot.SetDefaultColor(Color.cyan);
strengthInDownTrendPlot.HideBubble();
strengthInDownTrendPlot.HideTitle();

# strength in down trend - lime square on bottom C_RP for next-to-weakest strengthInDownTrend
plot strengthInDownTrend1Plot = if strengthInDownTrend1 then (low - 4 * tickSize()) else Double.NAN;
strengthInDownTrend1Plot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
strengthInDownTrend1Plot.SetDefaultColor(Color.green);
strengthInDownTrend1Plot.HideBubble();
strengthInDownTrend1Plot.HideTitle();

# supply test in up trend - lime square on bottom of the bar C_RP grey
plot supplyTestInUpTrendBarPlot = if supplyTestInUpTrendBar then (low - 4 * tickSize()) else Double.NAN;
supplyTestInUpTrendBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
supplyTestInUpTrendBarPlot.SetDefaultColor(CreateColor(153,153,153));
supplyTestInUpTrendBarPlot.HideBubble();
supplyTestInUpTrendBarPlot.HideTitle();

# successful test for supply - yellow triangle up on bottom of the bar C_RP cyan
plot successfulSupplyTestBarPlot = if successfulSupplyTestBar or successfulSupplyTestBar2 then (low - 2 * tickSize()) else Double.NAN;
successfulSupplyTestBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
successfulSupplyTestBarPlot.SetDefaultColor(Color.cyan);
successfulSupplyTestBarPlot.HideBubble();
successfulSupplyTestBarPlot.HideTitle();

# successful test for supply - yellow triangle up on bottom of the bar C_RP cyan double triangle for strong follow-up bar
plot successfulSupplyTestBarPlot2 = if successfulSupplyTestBar2 then (low - 4 * tickSize()) else Double.NAN;
successfulSupplyTestBarPlot2.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
successfulSupplyTestBarPlot2.SetDefaultColor(Color.cyan);
successfulSupplyTestBarPlot2.HideBubble();
successfulSupplyTestBarPlot2.HideTitle();

# stopping volume green (diamond) circle at bottom of bar
plot stopVolBarPlot = if stopVolBar then (low - 2 * tickSize()) else Double.NAN;
stopVolBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
stopVolBarPlot.SetDefaultColor(Color.green);
stopVolBarPlot.HideBubble();
stopVolBarPlot.HideTitle();

# stopping volume yellow (diamond) circle at top of bar
plot stopVolBarHighsPlot = if stopVolBarHighs then (high + 7 * tickSize()) else Double.NAN;
stopVolBarHighsPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
stopVolBarHighsPlot.SetDefaultColor(Color.yellow);
stopVolBarHighsPlot.HideBubble();
stopVolBarHighsPlot.HideTitle();

# 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 - 4 * tickSize()) else Double.NAN;
isStrengthConfirmationBarPlot.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
isStrengthConfirmationBarPlot.SetDefaultColor(Color.green);
isStrengthConfirmationBarPlot.HideBubble();
isStrengthConfirmationBarPlot.HideTitle();

# 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 - 7 * tickSize()) else Double.NAN;
isStrengthConfirmationBarPlot2.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
isStrengthConfirmationBarPlot2.SetDefaultColor(Color.green);
isStrengthConfirmationBarPlot2.HideBubble();
isStrengthConfirmationBarPlot2.HideTitle();

# blue square at top of bar C_RP orange
plot isPseudoUpThrustBarPlot = if isPseudoUpThrustBar then (high + 2 * tickSize()) else Double.NAN;
isPseudoUpThrustBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
isPseudoUpThrustBarPlot.SetDefaultColor(CreateColor(255,102,102));
isPseudoUpThrustBarPlot.HideBubble();
isPseudoUpThrustBarPlot.HideTitle();

# blue triangle (down) at top of bar C_RP orange
plot pseudoUpThrustConfirmationPlot = if pseudoUpThrustConfirmation then (high + 2 * tickSize()) else Double.NAN;
pseudoUpThrustConfirmationPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
pseudoUpThrustConfirmationPlot.SetDefaultColor(CreateColor(255,102,102));
pseudoUpThrustConfirmationPlot.HideBubble();
pseudoUpThrustConfirmationPlot.HideTitle();

# Failed UpthrustBarPlot Confirmation plots a green square 2 * tickSize above the failed bar C_RP
plot FailedUpThrustConfirmationPlot = if isFailedUpthrustConfirmation then (high + 2 * tickSize()) else Double.NAN;
FailedUpThrustConfirmationPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
FailedUpThrustConfirmationPlot.SetDefaultColor(Color.green);
FailedUpThrustConfirmationPlot.HideBubble();
FailedUpThrustConfirmationPlot.HideTitle();

# yellow triangle (down) at top of bar
plot weaknessBarPlot = if weaknessBar then (high + 2 * tickSize()) else Double.NAN;
weaknessBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
weaknessBarPlot.SetDefaultColor(Color.yellow);
weaknessBarPlot.HideBubble();
weaknessBarPlot.HideTitle();

# aqua triangle up at bottom of bar C_RP green triangle for next-to-strongest strengthInDownTrend
plot strengthInDownTrend2Plot = if strengthInDownTrend2 then (low - 2 * tickSize()) else Double.NAN;
strengthInDownTrend2Plot.SetPaintingStrategy(PaintingStrategy.LINE_VS_TRIANGLES);
strengthInDownTrend2Plot.SetDefaultColor(Color.green); # ????
strengthInDownTrend2Plot.HideBubble();
strengthInDownTrend2Plot.HideTitle();

# Failed strength in downtrend signal plots red square at candle's bottom. Under rare conditions a strengthinDownTrend2 green triangle can be overwritten by a successfulsupplyTest cyan triangle below the previous bar. If the bar following the cyan triangle is a FailedStrengthSignal a red square will be plotted on the following bar which is a desirable artifact of this coincidence. C_RP

plot failedstrengthsignalPlot = if isfailedstrengthsignal then (low - 2 * tickSize()) else Double.NAN;
failedstrengthsignalPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
failedstrengthsignalPlot.SetDefaultColor(Color.red);
failedstrengthsignalPlot.HideBubble();
failedstrengthsignalPlot.HideTitle();

# distribution at end of uptrend - blue square on top C_RP magenta
plot distributionBarPlot = if distributionBar then (high + 2 * tickSize()) else Double.NAN;
distributionBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
distributionBarPlot.SetDefaultColor (Color.magenta);
distributionBarPlot.HideBubble();
distributionBarPlot.HideTitle();

# supply test bar - pink square on bottom C_RP white
plot supplyTestBarPlot = if supplyTestBar then (low - 2 * tickSize()) else Double.NAN;
supplyTestBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
supplyTestBarPlot.SetDefaultColor(Color.white);
supplyTestBarPlot.HideBubble();
supplyTestBarPlot.HideTitle();

# no demand bar - blue squre on top C_RP orange circle
plot noDemandBarPlot = if noDemandBar then (high + 2 * tickSize()) else Double.NAN;
noDemandBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
noDemandBarPlot.SetDefaultColor(CreateColor(255,102,102));
noDemandBarPlot.HideBubble();
noDemandBarPlot.HideTitle();

# no supply bar - lime diamond on bottom C_RP turquoise
plot noSupplyBarPlot = if noSupplyBar then (low - 2 * tickSize()) else Double.NAN;
noSupplyBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
noSupplyBarPlot.SetDefaultColor (Color.cyan);
noSupplyBarPlot.HideBubble();
noSupplyBarPlot.HideTitle();

# effort to move up - turquoise diamond in the median of the bar C_RP green
plot effortToMoveUpBarPlot = if effortToMoveUpBar then (median) else Double.NAN;
effortToMoveUpBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
effortToMoveUpBarPlot.SetDefaultColor(CreateColor(0, 255, 0));
effortToMoveUpBarPlot.HideBubble();
effortToMoveUpBarPlot.HideTitle();

# effort to move down - yellow diamond in the median of the bar C_RP for all except red bars the circle's color is magenta
plot effortToMoveDownBarPlot = if effortToMoveDownBar && !(shortTermTrendSlope < 0 && MiddleTermTrendSlope < 0 && longTermTrendSlope < 0) then (median) else Double.NAN;
effortToMoveDownBarPlot.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
effortToMoveDownBarPlot.SetDefaultColor(Color.magenta);
effortToMoveDownBarPlot.HideBubble();
effortToMoveDownBarPlot.HideTitle();

# effort to move down - yellow diamond in the median of the bar C_RP yellow circle for Red bars
plot effortToMoveDownBarPlotYel = if effortToMoveDownBar && shortTermTrendSlope < 0 && MiddleTermTrendSlope < 0 && longtermtrendslope < 0 then (median) else Double.NAN;
effortToMoveDownBarPlotYel.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
effortToMoveDownBarPlotYel.SetDefaultColor(Color.yellow);
effortToMoveDownBarPlotYel.HideBubble();
effortToMoveDownBarPlotYel.HideTitle();

#######
# Trend Text Definitions
# C_RP 20100722 edited by Richard Paske to shorten text
# C_RP some colors changed to match symbols with text backgrounds

AddChartLabel(trendText, concat("Vol: ", if volume > sAvgVolume[0] + 2.0 * sAvgVolumeSTD then "VH"
else if Volume[0] > (sAvgVolume[0] + 1.0 * sAvgVolumeSTD) then "H"
else if (Volume[0] > sAvgVolume[0]) then ">Avg"
else if (Volume[0] < sAvgVolume[0] && Volume[0] > (sAvgVolume[0] - 1.0 * sAvgVolumeSTD)) then "<Avg"
else if (Volume[0] < (sAvgVolume[0] - 1.0 * sAvgVolumeSTD)) then "L"
else ""), Color.white);
AddChartLabel(trendText, concat("Spr: ", if (spread > (avgSpread * 2.0)) then "W"
else if (spread > avgSpread) then ">Avg"
else "N"), Color.white);

# C_RP 20100809 added isVeryLowCloseBar and changed execution order so that both Verys and Mid execute first
AddChartLabel(trendText, concat("Cls: ", if (isVeryHighCloseBar) then "VH"
else if (isVeryLowCloseBar) then "VL"
else if (isMidCloseBar) then "M"
else if (isUpCloseBar) then "H"
else if (isDownCloseBar) then "D"
else "NC"), Color.white);

AddChartLabel(trendText, concat("Trd: ", concat("St-", if (ShortTermTrendSlope > 0) then "U"
else "D")), Color.white);

AddChartLabel(trendText, concat("Mt-", if (MiddleTermTrendSlope > 0) then "U" else "D"), Color.white);

AddChartLabel(trendText, concat("Lt-", if (LongTermTrendSlope > 0) then "U" else "D"), Color.white);


######
# Volume Bar Definitions

AddChartLabel(volumeDefinitions, if isUpThrustBar[0] then "Weakness on UpThrust" #C_RP Red Square
else if upThrustConditionOne then "Weakness confirmed on Downbar after UpThrust" #C_RP Red Triangle
else if upThrustConditionTwo && !upThrustConditionOne then "Weakness confirmed on High-volume Downbar after UpThrust" #C_RP Red DownArrow
else if upThrustConditionThree then "Weakness confirmed on High-volume UpThrust" #C_RP Red DownArrow
else if isTwoPerUpT then "Weakness on 2-period UpThrust" #C_RP Magenta Triangle
else if isThreePerUpT then "Weakness on 3-period UpThrust" #C_RP Magenta Triangle
else if isGraveDojiBar then "Reversal possible on Gravestone Doji" #C_RP Whute Triangle
else if strengthInDownTrend then "Strength returning in Downtrend" #C_RP Cyan Square
else if strengthInDownTrend0 then "Strength returning in long Downtrend" #C_RP Cyan Square
else if strengthInDownTrend1 then "Strength returning on High Volume in Downtrend" #C_RP Green Square
else if strengthInDownTrend2 then "Strength on High-volume UpBar closing on High" #C_RP Green Triangle
else if supplyTestBar[0] then "Test for Supply" #C_RP White Square
else if successfulSupplyTestBar[0] then "Strength confirmed on UpBar closing Near High after Test" #C_RP Cyan Triangle
else if isStrengthConfirmationBar then "Strength confirmed on UpBar" #C_RP Green UpArrow
else if isStrengthConfirmationBar2 then "Strength confirmed on UpBar closing Near High" #C_RP Two Green UpArrows
else if isfailedstrengthsignal then "Bearish on Failed Strength Confirmation in downtrend" #C_RP Red Square
else if distributionBar then "Distribution on High-volume UpBar closing Down in Uptrend" #C_RP Magenta Square
else if isPseudoUpThrustBar[0] then "Weakness on Pseudo-UpThrust." #C_RP Orange Square
else if pseudoUpThrustConfirmation then "Weakness confirmed on DownBar closing Down after PseudoUpThrust" #C_RP Orange Triangle
else if isFailedUpthrustConfirmation then "Less Bearish on Failed UpThrust Confirmation" #C_RP Green Square
else if supplyTestInUpTrendBar then "Test for Supply in Uptrend" #C_RP Gray Square
else if weaknessBar then "Weakness on High-volume DownBar after High-volume UpMove" #C_RP Yellow Triangle
else if noDemandBar then "Weakness on No Demand" #C_RP Orange Circle
else if noSupplyBar then "Strength on No Supply" #C_RP Cyan Circle
else if effortToMoveUpBar[0] then "Bullish on Effort-to-Rise" #C_RP Green Circle on middle of Bar
else if effortToMoveDownBar then "Bearish on Effort-to-Fall" #C_RP Magenta or Yellow Circle on middle of Bar
else if failedEffortUpMove then "Bearish on Failed Effort-to-Rise" #C_RP no symbol for this indication
else if stopVolBar then "Stopping Volume at Lows indicates Downtrend end likely" #C_RP Green Circle
else if stopVolBarHighs then "Stopping Volume at Highs indicates Uptrend end likely" #C_RP Yellow Circle
else "",
if isUpThrustBar[0] then Color.Red
else if upThrustConditionOne then Color.red
else if upThrustConditionTwo && !upThrustConditionOne then Color.red
else if upThrustConditionThree then Color.red
else if isTwoPerUpT then Color.magenta
else if isThreePerUpT then Color.magenta
else if isGraveDojiBar then CreateColor(255,255,255)
else if strengthInDownTrend1 then Color.green
else if strengthInDownTrend0 && !strengthInDownTrend then Color.cyan
else if strengthInDownTrend && !strengthInDownTrend1 then Color.cyan
else if isFailedStrengthSignal then Color.red
else if supplyTestBar[0] then Color.white
else if successfulSupplyTestBar[0] then CreateColor(102,255,0)
else if isStrengthConfirmationBar then Color.Green
else if distributionBar then Color.magenta
else if isPseudoUpThrustBar[0] then (CreateColor(255,102,102))
else if pseudoUpThrustConfirmation then (CreateColor(255,102,102))
else if isFailedUpThrustConfirmation then (Color.green)
else if supplyTestInUpTrendBar then CreateColor(153,153,153)
else if strengthInDownTrend2 then Color.green
else if weaknessBar then Color.Yellow
else if noDemandBar then CreateColor(255,102,102)
else if noSupplyBar then Color.cyan
else if effortToMoveUpBar[0] then CreateColor(0, 255,0)
else if effortToMoveDownBar then Color.magenta
else if failedEffortUpMove then Color.Blue
else if stopVolBar then Color.green
else if stopVolBarHighs then Color.yellow
else Color.black);

Reply With Quote
The following 5 users say Thank You to Massive l for this post:
 
  #316 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

^use this code instead.

Reply With Quote
The following 2 users say Thank You to Massive l for this post:
 
  #317 (permalink)
Elite Member
adana turkey
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: FXCM
Favorite Futures: forex
 
Posts: 14 since Apr 2011
Thanks: 5 given, 10 received

thanks


Massive l View Post
^use this code instead.

Yep, thanks. First run, and it is working just fine. Great job converting to TOS!

Just had to correct some syntax problems which may have happened during copy-pasting. I am attaching your code in working .ts format for the convenience of others.

I guess I can google and eventually figure it out but it would be a great convenience if you could you also post a cheat sheet for the symbols and colors plus some kind of use-guide if you have one available? Or maybe you can put some links to instructions / explanations for the original NinjaTrader VPA indicator? (I am familiar with VSA but a restatement in the context of this specific indicator would certainly be fantastic)

again, thanks... vow

Attached Files
Register to download File Type: ts NinjaVPASTUDY.ts (27.1 KB, 144 views)
Reply With Quote
The following 2 users say Thank You to ulgolog for this post:
 
  #318 (permalink)
Elite Member
adana turkey
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: FXCM
Favorite Futures: forex
 
Posts: 14 since Apr 2011
Thanks: 5 given, 10 received

TOS (NINJATRADER) VPA INDI CHEAT XLS

Attached is the start of a cheat xls for this indicator. It seems like something like this, at least a list of the symols+colors and their names, is needed to even begin to explore the use this indicator with close to 30 different symbols.

Attached are a png and pdf listing the symbols, colors and the corresponding symbol/plot titles used in the indicator.

There is also an excel sheet with the same information plus a requote of the code, but the excel workbook also has sheets and columns for explaining how each symbol is derived /calculated, what each one means, how they might be utilized, and how the derivation or usage fits with VSA / VPA theory...

Nope, no luck. They are all blank for the time being. I hope people who are more in command of the indicator, its usage and its reference to VSA /VPA will- in time- fill in the blanks and repost new versions here.

There are some great coders and traders around here, and this stuff has been repeatedly talked about in different contexts, and those who are competent are probably bored to death with going over the same ground... But if this works out with the excel thing, it should be a great summary both for VSA/ VPA theory and the usage of this particular VPA indicator- all in one document- which could then be referred to and annotated by newbies and grandmasters alike.

I am deleting the attachments. will re-post them after correction...


Last edited by ulgolog; May 8th, 2011 at 02:59 PM.
Reply With Quote
 
  #319 (permalink)
Elite Member
adana turkey
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: FXCM
Favorite Futures: forex
 
Posts: 14 since Apr 2011
Thanks: 5 given, 10 received

Hohum

Sorry about too many messages...

The color coding cheat pages I posted loook kind of purty but they seem to be somehow messed up, so maybe ignore them...

Something seems wrong: duplicate symbols and duplicate colors exist for different labels. I'll look in the code to see if I can make sense out of it... (the xls can be used and changed later)

29 symbols /labels /signals exist in this indicator. need to get organized and standardized re colors, labels, signals etc; otherweise, we'll have a rough time making sense of it or talking about it...

Reply With Quote
 
  #320 (permalink)
Trading for Profit
Chicago + Illinois/USA
 
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
 
StockJock's Avatar
 
Posts: 256 since Aug 2010
Thanks: 15 given, 148 received


Has anyone used the VPA or VSA indicators and made profit? I'd like to hear from some members who have used them that are willing to share some of their successful analysis - how and when the indicator helped them to make the decision to buy or sell.

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 09:34 AM.

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-14 in 0.26 seconds with 20 queries on phoenix via your IP 54.82.56.95