Reply To: Variant Of Weis Wave

Optuma Forums Optuma Scripting Variant Of Weis Wave Reply To: Variant Of Weis Wave

#53025
Avatar
Kim
  • Topics: 1
  • Replies: 4
  • Posts: 5

Trevor thanks so much for your assistance. I had derived a workaround but your script is better. Shannon from what i can see you are not deleting the parts of the script that Trevor has replaced. I also took Mathews advice re removing and replacing –

The revised script is then

PSW = PERCENTSWING(PERCENT=10, DEFAULT=SwingList, COLOURSTYLE=Up/Down);

PSWStart= SWINGSTART(PSW);

PSWEnd = SWINGEND(PSW);

Rng = PSWStart – PSWEnd;

// Down Swings bars

Sig1 = if((TIMESINCESIGNAL(PSWStart) > 0 and Rng > 0) , 1, 0);

Sig2 = IF(TIMESINCESIGNAL(PSWStart) > 0 and Rng < 0, -1, 0) ;

//Sig3= If(Sig1 or Sig2, 1, 0);

// Up Swing Bars

//Sig4 = if((TIMESINCESIGNAL(PSW) > 0 and Rng < 0), 1, 0);

//Sig5= IF(TIMESINCESIGNAL(PSWEnd) < 1 and Rng > 0, 1, 0) ;

//Sig6= If(Sig4 or Sig5, 1, 0);

// Plot the Down trend Volume

Plot1 = If(Sig1, ACCSINCESIGNAL(Vol(), Sig1), 0) ;

Plot1.Colour = Red;

Plot1.Plotstyle = Histogram;

Plot1.LineWidth = 5;

Plot1.LineStyle = Solid;

// Plot the Up trend Volume

Plot2 = If(Sig2, ACCSINCESIGNAL(Vol(), Sig2), 0) ;

Plot2.Colour = Green; Plot2.Plotstyle = Histogram;

Plot2.LineWidth = 5;

Plot2.LineStyle = Solid;

The screenshot attached is 5 percent swing

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close