- This topic has 2 replies, 2 voices, and was last updated 10 months 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 › Volume Study
Hi,
I am wondering if someone can help. I am attempting to come up with a script, and coding is new to me, for a scan to find stocks that have volume today that is less than the volume of each of the last two days. Once I can get this right I would like to add another variable such as and is above the 20ma. So far the best I have come up with is below but it is not correct. I can’t quite get scripting right to just look back at actual volume and compare the current day to each of the last two days so have used the script below. I would appreciate any help.
1 2 3 |
plot1=((VOL(OFFSET=0) < (1.08 *VOL(OFFSET=1))) and (VOL(OFFSET=0) < (1.08 * VOL(OFFSET=2)))); |
Regards
Les
Hi Les,
As you are doing a scan with a true / false condition you don’t need the Plot1, so remove that and it should work.
Also, another way to look at offsets is to use the square brackets method, so this will achieve the same result:
1 2 3 |
VOL()<(1.08 * VOL()[1]) and VOL()<(1.08 * VOL()[2]) |
Thankyou Darren, I will give this a go.
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. |