RRG Line Crossovers

Optuma Forums Optuma Scripting RRG Line Crossovers

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #60077
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    Good afternoon,

    i’m working on some scripting practice and notice that i’m not getting the values that i’m looking for.  In the attached i’m looking for the RRG ratio crossing above 100.  i’m using the following script:

    // rrg rs-ratio crosses above 100
    j1 = JDKRS(INDEX=SPX:WI).Ratio > 100;
    j1

    on the contrary, i’m able to get the data i’m looking for with a show-view using the following script:

    // rrg rs-ratio exceeds 100
    r1 = JDKRS(INDEX=SPX:WI).Ratio > 100
    r1

    .. any suggestions on the signal?

    Attachments:
    #60084
    MatthewMatthew
    • Topics: 5
    • Replies: 309
    • Posts: 314

    Hi,

    In your example the Show Bar tool has been applied directly to the RRG tool.  That means it is the underlying data source the script is based off of, not the chart. The effect this has is that your current script is an RRG of an RRG, so the results don’t align.

    To fix the issue there are two options.  Apply the Show Bar to the chart with the current script, then drag and drop it to the RRG Lines view (the same way you did with the Show View) and it will match.

    Or, apply the Show Bars directly to the RRG Lines tool and adjust the script to:

    If you just want the point the line crosses above.  Or…

    If you want an arrow anytime the line is above 100 (matching the Show View).

    Once either options is done the results will match.

    Ex3

    • This reply was modified 4 weeks ago by MatthewMatthew.
    2 users thanked author for this post.
    #60099
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    Hi Matthew,

    Thank you for the info.. its the second time that i’ve done that.  Love that the software is so simple once i get past these little things.  have a followup question however.. i’m able to replicate the chart above, but i can only get signals based on the ratio, while i’m wanting one on the dotted momentum line.  i’ve messed around with it this morning (dot notation, nesting) and i’m only able to get signals on the ratio line.  Any help appreciated.

    #60114
    MatthewMatthew
    • Topics: 5
    • Replies: 309
    • Posts: 314

    Hi,

    When wanting to reference a plot that isn’t the main line of a multi-plot indicator like this, you’ll need to use the process outlined in my original reply where you apply the Show Bar to the chart, then drag and drop it onto the RRG window after the script has been setup.

    Example Video: https://www.screencast.com/t/qmBi6wB5

    #60123
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    Matthew – thank you so much.

    Cheers!

    #60209
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    Hi Matthew,

    I’m back… working with the ADX indicator and am running into the same issues.  i have the value calculated correctly in the watchlist, but am unable to mark the crossovers.  i’ve attempted the replication of the video you posted for me and watched videos in the scripting school, but i’m not picking up the correct signal.  suggestions are welcomed and appreciated.

    Josh

    Attachments:
    #60227
    DarrenDarren
    • Topics: 56
    • Replies: 478
    • Posts: 534

    Hi Josh,

    For the Show Bar on the chart use the following (I’m not sure of what crossover you need but this is for the 20EMA of the DM+ crossing above the 50EMA of the DM+):

    Capture

    #60271
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    Hi Darren,

    Thank you for the information!  I’m still getting a bit stuck however.  My intention is to obtain a signal on the adx:dm+ at the moving average crossovers below:

    50ema = 50ema of the adx:dm+ (thick dashes)
    20of 50 = 20ema of the 50ema of the adx:dm+ (thin dashes)

    I’m able to obtain the correct information in the watchlist but not able to get the signals thru showbar.  here is what i have:

    //  signal when the 50ema of ADX:DM+ crosses above the 20ema of 50ema of ADX:DM+

    V1 = ADX().DMPlus;
    EMA50 = MA(V1, BARS=50, STYLE=Exponential, CALC=Close);
    20of50 = MA(EMA50, BARS=20, STYLE=Exponential, CALC=Close);

    EMA50 crossesabove 20of50

    • This reply was modified 1 week, 6 days ago by AvatarJoshua Jones.
    Attachments:
    #60304
    MatthewMatthew
    • Topics: 5
    • Replies: 309
    • Posts: 314

    Hi,

    If i apply a Show Bar using your script directly to the ADX window, i get the same results you are seeing.  This is because the Show bar is not referencing the charts data, it’s referencing the ADX.  So you end up with an ADX of an ADX, throwing the results you see out.

    Delete the Show Bar from the ADX and apply it to the chart directly.  Use your script and adjust it to display as a Line (across all views) and you will see that it will show the expected results.

    Ex3

    Attachments:
    1 user thanked author for this post.
    #60331
    AvatarJoshua
    • Topics: 6
    • Replies: 9
    • Posts: 15

    works like a charm.  i guess one of the things that i get dense on is when to apply the showbar to the price versus the tool.  is there a rule of thumb?

    #60336
    MatthewMatthew
    • Topics: 5
    • Replies: 309
    • Posts: 314

    Hi,

    Rule of thumb would be, whichever item you apply the Show Bar tool to (Chart, ADX, RRG, etc) that is what the Show Bar will consider to be the Close() value.

    1 user thanked author for this post.
Viewing 11 posts - 1 through 11 (of 11 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