- This topic has 1 reply, 2 voices, and was last updated 1 month 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 › Script Help: Close above Ichimoku cloud
I am trying to create a watchlist with specific true/false metrics.
I can’t figure out how to script a close above the Ichimoku cloud.
I am using CLOSE() > ICHIMOKUCLOUD(DEFAULT=CloudBandUpper);
and I tried: CLOSE() > ICHIMOKUCLOUD(DEFAULT=SenkouSpanA); and CLOSE() > ICHIMOKUCLOUD(DEFAULT=SenkouSpanB);
The True/False result doesn’t match the actual chart. Not sure what I am doing wrong.
Thanks for any help!
Hi,
The Ichimoku Cloud plots past the last bar. The script is referencing the last value of the tool, which in your screenshot the Close is below, causing the criteria to fail.
To achieve the result you are after you need to lock the Ichimoku Clouds function to the bars, so it does not go into the future.
The best way to do that is using the BARINDEX() function as per the following…
1 2 3 4 5 6 7 8 9 |
//Set Cloud Plot V1 = ICHIMOKUCLOUD().CloudBandUpper; //Lock Plot to Bar V2 = BARINDEX() > 0; V3 = IF(V2 == 1,V1,0); //Is Close > Plot CLOSE() > V3 |
Once done, the expected results are returned.
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. |