- This topic has 6 replies, 3 voices, and was last updated 1 month ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Bar offset
Tagged: Indicators, OFFSET
Hello,
Is it possible to offset indicators (CCI, RSI, etc) similar to how you can offset in high, low, close? ie CCI 1 bar ago is above CCI 2 bars ago.
Hi Jon, this is how I do offsets.
1 2 3 4 5 6 |
V1 = RSI(BARS=5); V2 = OFFSET(V1, OFFSET=1); V3 = OFFSET(V1, OFFSET=2); V2 > V3 |
Attached is a file with the formulas.
I hope this what you are looking for, Jamie
You must be logged in to access attached files.
That worked thanks alot James
Another option is to use square brackets for the offset, so [1] is the previous bar’s value, [2] is two bars ago, etc. The following works the same as Jamie’s code above:
1 2 3 4 |
V1 = RSI(BARS=5); V1[1]>V1[2] |
Thank Darren, So would this example be appropriate with the brackets, MA(CALC=High, BARS=10)[1] – MA(BARS=10, CALC=Low)[1] ?
Correct – that would calculate the difference between yesterday’s moving average values.
Thanks D!
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. |