last turning point (Gann)

Optuma Forums Optuma Scripting last turning point (Gann)

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #68283
    Phillip
    • Topics: 1
    • Replies: 2
    • Posts: 3

    I have been duelling with this issue for over a week following earlier advice.  Have attempted to use both SWINGEND and SWINGSTART as well as the dot notation alternate.  I am attempting to find for a watchlist the most recent turning point and seem to get the one before as shown in the attached workbook.
    The most recent (as shown by the Gann Swing Overlay 3 Day) and confirmed as confirmed in the spreadsheet extracts (attached) does not seem to be revealed in the script for the watch list?  The workbook shows the start and end and a couple of offsets for each but when I check values for EthUSD not the 1700.36.  (I have the same issue with other items).

    Once I validated these I was planning to put Volume for each swing and the volume since the last swing into the watchlist of “entry” criteria.I was thinking that I needed to use the bar list as opposed to the swing list for this.  As attempts to date with ACCSINCESIGNAL have seemed to fail.  The signal is the turning point and the duration (lookback) the number of bars which I calculated by SWINGSTART – SWINGEND ; Does this return bars or price difference?

    #68307
    Matthew
    • Topics: 5
    • Replies: 616
    • Posts: 621

    Hi,

    The workbook you uploaded does not seem to have any Watchlist or tools applied as per your screenshot, it is just a blank chart of ETHUSD, so I can’t confirm what scripts you are using at the moment.

    To identify the current swing (1700.3 in this instance) no offsets or dot notations are needed.

    The above script would return the value of 1700.3 for ETHUSD, which is what i think you are looking for?

    I’ve attached a workbook with the current swing, and swing offsets included in the Watchlist, with the corresponding swing marked on the chart for your reference.

    Ex7

    The volume between each swing can be tricky, you need to work out if you are wanting to mark the volume from the bar the swing actually turns (confirmed) or just a straight count between Swing Start to Swing End. The functions to do this will change depending on the answer to that question.

    1 user thanked author for this post.
    #68361
    Phillip
    • Topics: 1
    • Replies: 2
    • Posts: 3

    I have made progress with this challenge thanks to your help. However the script below if I just use the first 4 lines in a show view seems to show peaks offset from the swing start and swinging; I assume this is the confirmed turns.  What I want to use for this task is simply the swing start and swinging values.  You expected this issue and state that there are different functions that I should use.

    I have experimented  by setting

    1  ss = SWINGSTART();
    2  se = SWINGEND();
    3. d1 = ss – se;
    4. V1 = ACCSINCESIGNAL(ss,d1)

    However it appears not to accept the d1 = ss -se. I am assuming this is due to ss, se values being the wrong datatype.  Is this correct and can I use dot notation to specify date etc?

    #68363
    Matthew
    • Topics: 5
    • Replies: 616
    • Posts: 621

    Hi,

    The SwingStart and SwingEnd functions need a swing to base their values on.  In your example, something like this:

    Once this is done, the d1 variable in your will produce a result.

    With V1, you need to remember that ACCSINCESIGNAL requires a Boolean to trigger from. d1 is not a Boolean, so the function has no trigger.

    You can see some examples here:

    https://help.optuma.com/kb/faq.php?id=1008

    #68369
    Matthew
    • Topics: 5
    • Replies: 616
    • Posts: 621

    Further to my last reply, measuring the Volume between Swing Start and End, without taking the confirmation date into consideration is quite tricky.  We go to a lot of trouble to try and make sure the Confirmation date of a swing turn is always taken into account with scripting, as it is essential for the backtesting of any swing scripts to return relevant results.

    Below is a script you can use to add up the volume between Swing Tops and Bottoms, without taking confirmation dates into consideration.

    I am not sure if this will just be used on charts, but please note this script can’t be used on the Back Tester or Scanning Manager.

    Ex4

    • This reply was modified 1 month ago by Matthew.
    #68423
    Phillip
    • Topics: 1
    • Replies: 2
    • Posts: 3

    I have been testing the script and tweaks of it on a number of stocks; I start by using the script as a show view and note that it drops to zero one bar after the turning point which is great.  I then added a view using the VOL() tool, and also added the script to the watchlist.  What happens is that the total volumes are different.  I assume this is due to the way VOL() is calculated.  Can you confirm this please.

    I also exported the Volume view data into a spreadsheet and added according to the turning points as shown in the show view created from the script above. But again I get different numbers.  Tried offet by one and looking to see if I can get alignment using just my eye but to no avail.

    So I am missing something; please help educate me on validation of this thanks.

    #68435
    Matthew
    • Topics: 5
    • Replies: 616
    • Posts: 621

    Hi,

    Using the original script from my last reply, I’ve marked the Cumulative Volume totals and the range they are being calculated from for your reference:

    Ex4

    Each bars volume is only being counted once, and resets at the start of the next swing.  Based on this, the results appear to be as expected.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest