September 14, 2019 at 2:50 pm #54661
I wondered if someone couldn’t give me a nudge in the correct direction here. I use the following to identify a period when there are three higher closes in my market of choice
CLOSE(OFFSET=2)<CLOSE(OFFSET=1) AND CLOSE(OFFSET=1)<CLOSE()
How might I limit the results so that the above is only indicated so long as it had not also occurred in the previous 7 TD’s for example?
Thanks in advance for any help with this.
AndrewSeptember 14, 2019 at 2:59 pm #54663Mathew
- Topics: 28
- Replies: 1,335
- Posts: 1,363
Put your script into a variable – it does not matter what you call it. Remember the semi-colon at the end
Then use the NoRepeat function on that variable set to 7 bars (or 5 if you want trading days). See here for more help https://help.optuma.com/kb/faq.php?id=1031
v1 = CLOSE(OFFSET=2)<CLOSE(OFFSET=1) AND CLOSE(OFFSET=1)<CLOSE();
Another tip. You could change your line to be this
v1 = CLOSE() IsUp AND CLOSE() IsUp;
That is telling Optuma the previous bar needs to be a higher close and the current bar needs to have a higher close.
Hope that helps
- This reply was modified 8 months, 2 weeks ago by Mathew.
1 user thanked author for this post.September 15, 2019 at 5:30 pm #54677
I’ve been experimenting with this today, I get numerous vertical lines on my chart if I use
CLOSE(OFFSET=1) IsDown and CLOSE() IsDown
however when I add the norepeat variable as follows I get no vertical lines
V2 = CLOSE(OFFSET=1) IsDown and CLOSE() IsDown;
If I add a MA variable as below my vertical lines reappears
v2 = CLOSE(OFFSET=1) IsDown and CLOSE() IsDown;
NOREPEAT(v2, BARS=7) and CLOSE()<MA(BARS=7)
What am I overlooking with the second script here?
AndrewSeptember 16, 2019 at 8:49 am #54681Matthew
- Topics: 4
- Replies: 254
- Posts: 258
I can’t repeat the issue you’re seeing. When i use the script posted in your reply this is what i get:
I’m not sure if there’s more to your script and you’re only posting a part of it, but from what i can see it’s working as expected.
I’ve attached an example workbook as well, download it and try it on your copy of Optuma, if you continue to have problems attach the full script and perhaps a sample workbook of the issue you’re seeing and i can look at it further.
You must be logged in to access attached files.September 20, 2019 at 6:37 pm #54715
Hi guys – apologies for the delay. Please find attached my workbook for review – still not sure why its not working as Matt’s does ?
Grateful for any direction here.
You must be logged in to access attached files.September 23, 2019 at 6:16 pm #54743
- You must be logged in to reply to this topic.