Variant Of Weis Wave

Optuma Forums Optuma Scripting Variant Of Weis Wave

Tagged: 

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #51403
    AvatarTrevor R
    • Topics: 60
    • Replies: 190
    • Posts: 250

    Hi Kim,

    Unfortunately, due to other commitments, I don’t have time to study your referenced article and analyse your script at present.

    However, I would caution the use of SWINGSTART and SWINGEND, both of which, I believe, require the GANNSWING() function definition (https://forum.optuma.com/topic/help-with-gann-swing-pattern-solution-please/) before they can be used. Also, one must remember that a SWINGEND becomes a SWINGSTART at the end of one swing, which is of course the start of a new swing.

    Cheers

    Trevor

    The Auld Tyma from

    Auld Tyma Data Logo with URL 1 cm

    #52869
    AvatarShannon
    • Topics: 0
    • Replies: 3
    • Posts: 3

    Hi Kim,

    Have you had any luck with the Weis wave script ?  I would also like to be able to apply Weis wave to my charts but I am not having much luck and my scripting knowledge is very low.

     

    Cheers Shannon

    #52965
    AvatarTrevor R
    • Topics: 60
    • Replies: 190
    • Posts: 250

    Hi Kim,

    Apologies for not getting back to you sooner, but here is a revised version of your script. I’ve commented out the parts of your script and added my changes in bold italics so you can see what I’ve done.

    // Kim #51395 20190303 

    //Volume Between Swings

    //PSW = PERCENTSWING(PERCENT=5.0, DEFAULT=SwingEnd, COLOURSTYLE=Up/Down);

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

    PSWStart= SWINGSTART(PSW);

    //PSWEnd = SWINGEND(PSWEnd);

    PSWEnd = SWINGEND(PSW);

    Rng = PSWStart – PSWEnd;

    // Down Swings bars

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

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

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

    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(Sig6, ACCSINCESIGNAL(Vol(), Sig4), 0) ;

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

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

    Plot2.LineWidth = 5;

    Plot2.LineStyle = Solid;  

    Here what the resulting plot looks like (with PercentSwing = 10%): 20190503 Kim #51395 20190303

    Is this the result you are after?

    Cheers

    Trevor

    The Auld Tyma from

    Auld Tyma Data Logo with URL 1 cm

    #53003
    AvatarShannon
    • Topics: 0
    • Replies: 3
    • Posts: 3

    Hi Trevor,

    I have used your latest script for Weis Wave but I am having some issues. The first is I am not getting the swing overlay on the chart and the second is show view isn’t showing accumulative volume it is just showing equal height bars across show view. Please see attached screen shot of my issue.

    If you could please help that would be very much appreciated. 

    Thank you Shannon.   Weis Wave

    #53011
    AvatarTrevor R
    • Topics: 60
    • Replies: 190
    • Posts: 250

    Hi Shannon,

    The swing overlay is a standard Optuma tool: Percent Swing Chart Overlay (PCSC). 

    As to the second issue, I suspect that you have done a straight copy from the Forum and paste into the Script Manager. Unfortunately this can introduce hidden characters that interfere with the operation of the script. To avoid this problem when copying scripts  from anywhere it is advisable to first paste the script into a text only editor like Notepad or Notepad++, then do a second copy and paste in the Optuma Manager. That way any hidden characters are completely removed from the script before pasting into Optuma.

    Make sure when you apply the PCSC and the “#% Swings Volume” (as I’ve named it on my system) script to a chart that your set the same percent value (eg 10%) in both the tool and the script, otherwise you’ll be scratching your head again.

    Cheers

    Trevor

    The Auld Tyma from

    Auld Tyma Data Logo with URL 1 cm

    #53013
    AvatarShannon
    • Topics: 0
    • Replies: 3
    • Posts: 3

    Hi Trevor,

    Thanks for the quick reply.

    I have now added the PCSC tool and have downloaded Notepad++ and have copied and pasted the script as you have suggested as I was previously coping straight from this forum.

    Unfortunately I’m still having the same issues please see my attached picture of the steps I have taken.

    Cheers Shannon

    Notepad++Weis Wave With ScriptWeis Wave Swing Overlay

    #53015
    MatthewMatthew
    • Topics: 4
    • Replies: 216
    • Posts: 220

    Hi Shannon,

    The first thing i can see in the screen shot you provided is that the Show View has been applied to the Volume tool, not the chart itself…

    Ex3

    For the script to work you need to apply the Show View to the chart.

    If that doesn’t fix it, Edit the script and go to the RNG line (8th from the top), and remove the – sign, then re-add it.  This symbol is sometimes pasted in incorrectly, even from Notepad, and deleting / readding it is the only way to fix it.  (The next major update to Optuma will include improvements to pasting scripts from outside sources to stop this).

     

    #53025
    AvatarKim
    • 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

    Attachments:
    #53035
    AvatarTrevor R
    • Topics: 60
    • Replies: 190
    • Posts: 250

    Hi Kim & Shannon,

    Kim, your Percent Plot on the chart is 5% and your script 10%. Always make sure they are the same 

    Here is a minimalist listing of the script, use Notepad to copy/paste and replace the “em dash” with a hyphen “-” (as suggested by Matthew) when using this script:

    // Kim’s Weis Wave 20190513

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

    PSWStart= SWINGSTART(PSW);

    PSWEnd = SWINGEND(PSW);

    Rng = PSWStart – PSWEnd;

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

    Sig2 = IF(TIMESINCESIGNAL(PSWStart) > 0 and Rng < 0, -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;

    Here a screenshot with both the script and Percent Swing Overlay Plot set for 10%:

    20190513 Kims Weis Wave

    Cheers

    Trevor

    The Auld Tyma from

    Auld Tyma Data Logo with URL 1 cm

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.

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