September 25, 2020 at 5:39 am #60077
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;
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
.. any suggestions on the signal?September 25, 2020 at 10:19 am #60084
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:123CLOSE() CrossesAbove 100
If you just want the point the line crosses above. Or…123Close() > 100
If you want an arrow anytime the line is above 100 (matching the Show View).
Once either options is done the results will match.
September 26, 2020 at 3:29 am #60099
- This reply was modified 4 weeks ago by 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.September 28, 2020 at 8:49 am #60114
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/qmBi6wB5September 28, 2020 at 1:32 pm #60123
Matthew – thank you so much.
Cheers!October 7, 2020 at 5:46 am #60209
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.
JoshOctober 8, 2020 at 1:49 am #60227Darren
- Topics: 56
- Replies: 478
- Posts: 534
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+):1234567V1 = ADX().DMPlus;EMA20 = MA(V1, BARS=20, STYLE=Exponential, CALC=Close);EMA50 = MA(V1, BARS=50, STYLE=Exponential, CALC=Close);EMA20 CrossesAbove EMA50October 10, 2020 at 11:37 am #60271
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
October 12, 2020 at 8:44 am #60304
- This reply was modified 1 week, 6 days ago by Joshua Jones.
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.October 13, 2020 at 7:47 am #60331
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?October 13, 2020 at 11:06 am #60336
- You must be logged in to reply to this topic.