- This topic has 1 reply, 2 voices, and was last updated 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Green Line Breakout
Tagged: All Time High, OFFSET, horizontal line, breakout
Hi guys,
Please see the attached picture. I want to write a script that will:
1) Find every time price closes at an all-time high on a monthly chart.
2) Draw a horizontal line from that new all-time high when the 4th bar opens, only if the previous 3 closes were below that all-time high.
thank you
You must be logged in to access attached files.
Hi,
I’ve done some work on a script that looks to work, at least provide you with the building blocks to edit to do exactly what you’re wanting:
1 2 3 4 5 6 7 8 9 10 11 |
//Set Highest High V1 = HIGHESTHIGH(RANGE=All History); V2 = HIGH()[3] == V1; //Set Close Criteria V3 = CLOSE()[1] < V1 and CLOSE()[2] < V1 and CLOSE()[3] < V1 ; V4 = V2 and V3; //Plot High once criteria met V5 = NONZERO(IF(V4 == 1,V1,0)); V5 |
It does not draw the line from the trigger high, it waits for the criteria to occur.
We do not have a function that plots a HL to the end and keeps it there as new values are formed, it’s a single line that moves as a new value is triggered.
You must be logged in to access attached files.
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. |