Loading ...
Sorry, an error occurred while loading the content.

Re: Help on writing a line here to determine UPSIDE-DOWNSIDE volume

Expand Messages
  • www888www
    Works perfectly... thank you Trade Scripter!!!
    Message 1 of 10 , Apr 1, 2011
    • 0 Attachment
      Works perfectly...
      thank you Trade Scripter!!!

      --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@...> wrote:
      >
      > The REC statement was not initializing correctly. I removed the check for IsNan and added barNumber()
      >
      > declare lower;
      > declare zerobase;
      >
      > input length = 50;
      >
      > def ClsGrtr = close > close[1];
      >
      > plot Vol = volume;
      > plot VolAvg = (wma(volume, length));
      > plot VolAvg40 = 1.40 * VolAvg;
      >
      > Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
      > Vol.SetLineWeight(2);
      > Vol.DefineColor("Up", Color.UPTICK);
      > Vol.DefineColor("Down", Color.DOWNTICK);
      > Vol.AssignValueColor(if ClsGrtr then Vol.color("Up") else if close <
      > close[1] then Vol.color("Down") else GetColor(1));
      > VolAvg.SetDefaultColor(GetColor(8));
      > VolAvg.SetLineWeight(3);
      >
      > VolAvg40.SetDefaultColor(GetColor(5));
      > VolAvg40.SetStyle(curve.short_DASH);
      > VolAvg40.SetLineWeight(2);
      >
      > rec CountUp = if barNumber()==0 then 0 else if ClsGrtr then
      > CountUp[1] + 1 else CountUp[1];
      > rec CountDwn = if barNumber()==0 then 0 else if close < close[1] then
      > CountDwn[1] + 1 else CountDwn[1];
      >
      > addChartLabel(yes,concat("Up ",CountUp),color.green);
      > addChartLabel(yes,concat("Down ",CountDwn),color.red);
      >
      > rec CountUpAvg = if barNumber()==0 then 0 else if volume > VolAvg40[1] and
      > close > close[1] then CountUpAvg[1] + 1 else CountUpAvg[1];
      >
      > rec CountDownAvg = if barNumber()==0 then 0 else if volume > VolAvg40[1]
      > and close < close[1] then CountDownAvg[1] + 1 else CountDownAvg[1];
      >
      > addChartLabel(yes,concat("Up Avg ",CountUpAvg),color.green);
      > addChartLabel(yes,concat("Down Avg ",CountDownAvg),color.red);
      >
      > Trade Scripter
      >
      >
      > --- www888www wrote:
      > >
      > > hey Trade Scripter,
      > >
      > > I use CRM and Daily 30 days...from eyeballign the data chart...I see there are 3 Downside big Volume days and zero Upside Volume days...however, I got 6 and 3 for it...meanwhile, I get 32Updays and negative 8 down days.???
      > >
      > > --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@> wrote:
      > > >
      > > > I took a look at the study, but I don't know why the results are wrong. You did create the new counters, and they are counting results. What ticker symbol are you using, and what time frame? Did you count what the results were supposed to be manually?
      > > >
      > > > Trade Scripter
      > > >
      > > > --- www888www wrote:
      > > > >
      > > > > Okay I remodify...but still couldn't get it work properly...please advise...thank you!!!
      > > > >
      > > > > **************
      > > > > declare lower;
      > > > > declare zerobase;
      > > > >
      > > > > input length = 50;
      > > > >
      > > > > plot Vol = volume;
      > > > > plot VolAvg = (wma(volume, length));
      > > > > plot VolAvg40 = 1.40 * VolAvg;
      > > > >
      > > > > Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
      > > > > Vol.SetLineWeight(2);
      > > > > Vol.DefineColor("Up", Color.UPTICK);
      > > > > Vol.DefineColor("Down", Color.DOWNTICK);
      > > > > Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
      > > > > VolAvg.SetDefaultColor(GetColor(8));
      > > > > VolAvg.SetLineWeight(3);
      > > > >
      > > > > VolAvg40.SetDefaultColor(GetColor(5));
      > > > > VolAvg40.SetStyle(curve.short_DASH);
      > > > > VolAvg40.SetLineWeight(2);
      > > > >
      > > > > rec CountUp = if IsNan(CountUp[1]) then 0 else if close > close[1] then CountUp[1] + 1 else CountUp[1];
      > > > >
      > > > > addChartLabel(yes,concat("Up ",CountUp),color.green);
      > > > > addChartLabel(yes,concat("Down ",barNumber()-CountUp),color.red);
      > > > >
      > > > > rec CountUpAvg = if IsNan(CountUpAvg[1]) then 0 else if volume > VolAvg40[1] and close > close[1] then CountUpAvg[1] + 1 else CountUpAvg[1];
      > > > >
      > > > > rec CountDownAvg = if IsNan(CountDownAvg[1]) then 0 else if volume > VolAvg40 and close < close[1] then CountDownAvg[1] + 1 else CountDownAvg[1];
      > > > >
      > > > > addChartLabel(yes,concat("Up Avg ",CountUpAvg),color.green);
      > > > > addChartLabel(yes,concat("Down Avg ",CountDownAvg),color.red);
      > > > > **************
      > > > >
      > > > > --- In TOS_thinkscript@yahoogroups.com, "www888www" <chirocafe@> wrote:
      > > > > >
      > > > > > Still need help...I modify the code but not getting what I want...please help...
      > > > > >
      > > > > > looking for # of Updays vs. Downdays above 40% of over the MOVING average of the Volume
      > > > > >
      > > > > > ***
      > > > > > declare lower;
      > > > > > declare zerobase;
      > > > > >
      > > > > > input length = 50;
      > > > > >
      > > > > > plot Vol = volume;
      > > > > > plot VolAvg = (wma(volume, length));
      > > > > > plot VolAvg40 = 1.40 * VolAvg;
      > > > > >
      > > > > > Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
      > > > > > Vol.SetLineWeight(2);
      > > > > > Vol.DefineColor("Up", Color.UPTICK);
      > > > > > Vol.DefineColor("Down", Color.DOWNTICK);
      > > > > > Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
      > > > > > VolAvg.SetDefaultColor(GetColor(8));
      > > > > > VolAvg.SetLineWeight(3);
      > > > > >
      > > > > > VolAvg40.SetDefaultColor(GetColor(5));
      > > > > > VolAvg40.SetStyle(curve.short_DASH);
      > > > > > VolAvg40.SetLineWeight(2);
      > > > > >
      > > > > > rec CountUp = if IsNan(CountUp[1]) then 0 else if close > close[1] then CountUp[1] + 1 else CountUp[1];
      > > > > >
      > > > > > addChartLabel(yes,concat("Up ",CountUp),color.green);
      > > > > > addChartLabel(yes,concat("Down ",barNumber()-CountUp),color.red);
      > > > > >
      > > > > > rec CountUpAvg = if IsNan(CountUpAvg[1]) then 0 else if close[1] > VolAvg40[1] then CountUpAvg[1] + 1 else CountUpAvg[1];
      > > > > >
      > > > > > addChartLabel(yes,concat("Up ",CountUpAvg),color.green);
      > > > > > addChartLabel(yes,concat("Down ",barNumber()-CountUpAvg),color.red);
      > > > > > ***
      > > > > >
      > > > > > --- In TOS_thinkscript@yahoogroups.com, "www888www" <chirocafe@> wrote:
      > > > > > >
      > > > > > > Wow thanks.
      > > > > > > However, I'm having difficulty modifying to the specific like number of UP green volume where it surpasses 40% threshold and DOWN red where it surpasses 40% threshold volume.
      > > > > > >
      > > > > > > thanks Tradescripter.
      > > > > > >
      > > > > > > --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@> wrote:
      > > > > > > >
      > > > > > > > You can add this to your code:
      > > > > > > >
      > > > > > > > rec CountUp = if IsNan(CountUp[1]) then 0 else if close > close[1] then CountUp[1] + 1 else CountUp[1];
      > > > > > > >
      > > > > > > > addChartLabel(yes,concat("Up ",CountUp),color.green);
      > > > > > > > addChartLabel(yes,concat("Down ",barNumber()-CountUp),color.red);
      > > > > > > >
      > > > > > > > Trade Scripter
      > > > > > > >
      > > > > > > > --- ww888www wrote:
      > > > > > > > >
      > > > > > > > > Hey guys,
      > > > > > > > >
      > > > > > > > > Below is my modification of the Volume with a dashline for Volume greater than 40% on the 50data AvgVolume.
      > > > > > > > >
      > > > > > > > > I like to be able to display on the subgraph a number of all the UP (green) Volume above 40% and a number of all the DOWN (red) Volume above 40%.
      > > > > > > > >
      > > > > > > > > Is there a way to tally that counter???
      > > > > > > > > Thanks.
      > > > > > > > >
      > > > > > > > > *****************
      > > > > > > > >
      > > > > > > > > declare lower;
      > > > > > > > > declare zerobase;
      > > > > > > > >
      > > > > > > > > input length = 50;
      > > > > > > > >
      > > > > > > > > plot Vol = volume;
      > > > > > > > > plot VolAvg = (wma(volume, length));
      > > > > > > > > plot VolAvg40 = 1.40 * VolAvg;
      > > > > > > > >
      > > > > > > > > Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
      > > > > > > > > Vol.SetLineWeight(2);
      > > > > > > > > Vol.DefineColor("Up", Color.UPTICK);
      > > > > > > > > Vol.DefineColor("Down", Color.DOWNTICK);
      > > > > > > > > Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
      > > > > > > > > VolAvg.SetDefaultColor(GetColor(8));
      > > > > > > > > VolAvg.SetLineWeight(3);
      > > > > > > > >
      > > > > > > > > VolAvg40.SetDefaultColor(GetColor(5));
      > > > > > > > > VolAvg40.SetStyle(curve.short_DASH);
      > > > > > > > > VolAvg40.SetLineWeight(2);
      > > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      >
    • Ale
      Hello I m trying to apply this code to use stockhacker on stocks that have increased a certain percentage in volume, where should I specify this in the code?
      Message 2 of 10 , Apr 6, 2011
      • 0 Attachment
        Hello

        I'm trying to apply this code to use stockhacker on stocks that have increased a certain percentage in volume, where should I specify this in the code?
        Thank you
      Your message has been successfully submitted and would be delivered to recipients shortly.