Variant Of Weis Wave

Optuma Forums Optuma Scripting Variant Of Weis Wave

Tagged: 

Viewing 8 posts - 31 through 38 (of 38 total)
  • Author
    Posts
  • #56651
    AvatarKim
    • Topics: 1
    • Replies: 5
    • Posts: 6

    Hi Robert

    As a work around I use price time labels which you can configure for cumulative volume

    Search Knowledge base or go here https://help.optuma.com/kb/faq.php?id=387

    I find it much more flexible than any fixed script

    Hope it helps

    Cheers Kim

     

     

    #56661
    AvatarTrevor R
    • Topics: 91
    • Replies: 266
    • Posts: 357

    Hi Robert,

    You could check Optuma’s Consulting Service for paid assistance with your scripting requirement.

    Cheers

    Trevor

    #56701
    AvatarRobert
    • Topics: 0
    • Replies: 5
    • Posts: 5

    Re my previous query on this thread I approached Optuma who said they would prefer I put the following query to the forum before they get involved.

    The issue with the scripts on the forum is that engulfing and inside bars give false output. I just want to sum the volume to a variable (Plot1 in the output part of a scipt appended below) while the Gannswing() IsDown and then when the swing changes, zero Plot1 and sum the volume to Plot2 while it stays in the up direction. If the scripting language had a Do While loop command (which it doesn’t seem to) I could probably do this myself but not being familiar with the language it’s a daunting task.

    Probably a 5 minute task for someone conversant with scripting but I’ve been struggling with it for half of today! At least I’ve got a better idea of the language.

    Follows is the extract of the display part of a script from the forum that I started playing around with. If I could calculate Plot 1 and Plot 2 I’d be home!

    // Plot the Down trend Volume

    Plot1 = ?>;

    Plot1.Colour = Red;

    Plot1.Plotstyle = Histogram;

    Plot1.LineWidth = 5;

    Plot1.LineStyle = Solid;

    // Plot the Up trend Volume

    Plot2 = ? ;

    Plot2.Colour = Green;

    Plot2.Plotstyle = Histogram;

    Plot2.LineWidth = 5;

    Plot2.LineStyle = Solid;

     

    Any assistance greatly appreciated.

    #59119
    AvatarAxel
    • Topics: 7
    • Replies: 7
    • Posts: 14

    Hi Trevor,

    I tried to apply your original script (also copied below). Simply copied pasted into a new script. The only thing I see as plotted are flat lines, not your type of histogram
    Has there been any change in the script parameters or operators since 2018 for it not to work ?

     

    Thanks

    Axel

     

    ================

     

    // Volume Between Gann Swings

    GS =GANNSWING(DEFAULT=SwingList, USECLUSTERS=False, USEBREAKOUT=False, SWINGCOUNT=2);

    GSStart= SWINGSTART(GS);

    GSEnd = SWINGEND(GS);

    Rng = GSStart-GSEnd;

    // Down Swings bars

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

    Sig2 = IF(TIMESINCESIGNAL(GSEnd) < 1 and Rng < 0, 1, 0) ;

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

    // Up Swing Bars

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

    Sig5= IF(TIMESINCESIGNAL(GSEnd) < 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 Down trend Volume

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

    Plot2.Colour = Green;

    Plot2.Plotstyle = Histogram;

    Plot2.LineWidth = 5;

    Plot2.LineStyle = Solid;

    #59125
    AvatarTrevor R
    • Topics: 91
    • Replies: 266
    • Posts: 357

    Hi Axel,

    You mention you just copied and paste the script directly into Script Manager. This is fraught with issues as you are copying HTML code from the Forum into the Script Manager which requires clean text formatting. (If you read through all the posts in this thread you’ll find explanations of the issues you’ve encountered.)

    So, you need to:

    • copy the code into Notepad, then
    • copy it from Notepad to the Script Manager, then
    • go through the code and delete any “-” and replace them [“-” can get through the Notepad text as an “em” (a longer dash) rather than a “-” (a short dash or hyphen) and this will cause issues when the script runs].

    Hopefully this will resolve the issue for you.

    Cheers

    Trevor

     

    #59129
    MathewMathew
    • Topics: 28
    • Replies: 1,447
    • Posts: 1,475

    Hi All,

    Just letting you know that there is an issue with this script in the 1.6 Beta. It seems that my changes to TIMESINCESIGNAL() to allow offsets is not working correctly with the Gann Swing results.

    We’re looking into this now.

    All the best

    Mathew

    #59133
    MathewMathew
    • Topics: 28
    • Replies: 1,447
    • Posts: 1,475

    Hi Kim,

    I’m sorry I did not look at this in more detail when you first posted (I was preparing to move from the US back to Aus, so have been a bit distracted).

    For reference, here is some code to do the Weis Waves.

    To Trevor’s point above – make sure you use the “<> Code” button in the forum toolbar to insert code. That avoids the text editing changing characters.

    Now, to the idea of a Gann version of this, I would strongly caution against using swing charts for this. The issue is the lag from the swing bottom until we know it was a bottom. We could use the confirm dates of the swings (when we knew the swing had changed – change the colour style to “Unconfirmed” and you will see the difference this makes) but that will apply an offset to the interval for which the volume is being accumulated.

    We also need to couple this with the fact that volume typically fades as the trend continues. So if we delay we are missing the major volume at the start of the swing.

    So we have two choices:

    1. We accumulate from swing bottom to swing top.
    2. We accumulate from confirmation date to confirmation date.

    This all gets much more complex when we are working with swings. Make sure you have a look at this post https://www.optuma.com/swing-scripting-1/

    Put this script in a Show Plot

    And compare that with this version

    The second one is giving us the flat lines at the extremes of the swings.

    Ok, enough blabbing – here is a script that will do what you are looking for (subject to all the caveats above).

    Hope that helps

    Mathew

    1 user thanked author for this post.
    Avatar Kim
    #59137
    AvatarAxel
    • Topics: 7
    • Replies: 7
    • Posts: 14

    Hi Matthew and Trevor,

     

    Trevor, apologies but did not notice at once this is a 3 pages thread. Having said that I wrote copy/paste, but  in fact did go via a simple text editor first – learned this the hard way many years ago 🙁 .   Your recommendation is very valid indeed.

    Ok, read the entire thread in the meanwhile. Noted the last post of Matthew w/ great interest, thank you for the update script and potential issues ! This helps a lot.
    Also noted your recommendation to post a code using the <>Code function

    Thanks to both,

    Axel

     

    • This reply was modified 1 month, 3 weeks ago by AvatarAxel Cordemans. Reason: gramm
Viewing 8 posts - 31 through 38 (of 38 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