Reply To: Variant Of Weis Wave

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

  • Topics: 1
  • Replies: 5
  • Posts: 6

Trevor i have been away and so would thank you for your input. On researching further it would appear the Weis wave incorporates the Zig Zag which would be the same or similar to Percent swing overlay in Optuma. “used to filter out relatively small price movements. You can preset the deviation as a percentage in order to discard smaller moves” That is what is meant by “5¢ wave from daily closes”. The problem with the zig zag is it repaints. However there is a work around please see article I have tried to rewrite the Script to encapsulate the ability to preset the deviation but its not working and would appreciate some help. I would also like to incorporate a secondary criteria based around the stochastic discussed in the article to stop the indicator repainting but my scripting expertise is limited and i have no idea how that would be achieved or if this possible. My updated script is as follows : 

//Volume Between Swings




Rng = PSWStart-PSWEnd;

// Down Swings bars

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


Sig2 = IF(TIMESINCESIGNAL(PSWEnd) < 1 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(Sig3, ACCSINCESIGNAL(Vol(), Sig1), 0) ;

Plot1.Colour = Red; Plot1.Plotstyle = Histogram; Plot1.LineWidth = 5;

Plot1.LineStyle = Solid;

// Plot the Up trend Volume

Plot2 = If(Sig6, ACCSINCESIGNAL(Vol(), Sig4), 0) ;

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

Plot2.LineStyle = Solid;

Screen shot attached




Pin It on Pinterest