- This topic has 2 replies, 2 voices, and was last updated 2 weeks ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Two Plot Histogram
Tagged: Two Plot Histogram
I am trying to script a histogram that has one plot on the top and a different plot on the bottom. The script is displaying as valid in the Scrip Manager but is not displaying on the chart correctly. The first script displays completely incorrect while the second script is better but still incorrect. I’m trying to display pos/neg bars on the top and pos/neg bars on the bottom.
Thanks,
Tim
1 2 3 4 5 6 7 8 |
Jaw = MA(BARS=13, STYLE=Smoothed, CALC=Close)[8]; Teeth = MA(BARS=8, STYLE=Smoothed, CALC=Close)[5]; Lips = MA(BARS=5, STYLE=Smoothed, CALC=Close)[3]; Top Histo = (Jaw-Teeth); Bottom Histo =ABS(Teeth-Lips); DIFFPCT(Top Histo,Bottom Histo) |
1 2 3 4 5 6 7 8 9 10 11 12 |
Jaw = MA(BARS=13, STYLE=Smoothed, CALC=Close)[8]; Teeth = MA(BARS=8, STYLE=Smoothed, CALC=Close)[5]; Lips = MA(BARS=5, STYLE=Smoothed, CALC=Close)[3]; Plot2 = (Jaw-Teeth); Plot1 =ABS(Teeth-Lips); Plot1.Plotstyle = Histogram; Plot1.HistColScheme = Positive/Negative; Plot2.Plotstyle = Histogram; Plot2.HistColScheme = Positive/Negative; |
Hi Tim,
The DIFFPCT is giving odd values because the current TopHist value is negative, whereas BottomHist is using positive numbers only with the ABS() function. Make them both consistent and the values should make more sense.
With two histogram outputs they will overwrite each other, so it’s probably best to use two separate Show Views.
Thanks.
Cookie | Duration | Description |
---|---|---|
cname | 14 days | This cookie is set by Optuma. The cookies is used to store the users campaign selection for selecting the correct version of Optuma to trial and is "Necessary". |
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |