- This topic has 1 reply, 2 voices, and was last updated 2 weeks 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 › DEMAND SUPPLY ,IDENTIFYING BAR LENGHT BELOW AND ABOVE 50%
// get the range of the bar r1 = HIGH()-LOW(); // get the body value b1 = ABS(close()-OPEN()); // is body > 50% of range? v1 = b1 / r1 > 0.49; //true and close is up v1 and CLOSE() IsUp
// get the range of the bar r1 = HIGH()-LOW(); // get the body value b1 = ABS(close()-OPEN()); // is body > 50% of range? v1 = b1 / r1 > 0.5; //true and close is down v1 and CLOSE() IsDown
Hi Mohd,
I cleaned up the formatting of your 2 scripts and they now show as expected, with the green Show Bar arrows for up days and red for down when the body is > 50% of the range:
Up days:
1 2 3 4 5 6 7 8 9 10 |
// get the range of the bar; r1 = HIGH()-LOW(); // get the body value; b1 = ABS(close()-OPEN()); // is body > 50% of range?; v1 = b1 / r1 > 0.5; //true and close is up; v1 and CLOSE() IsUp |
Down days:
1 2 3 4 5 6 7 8 9 10 |
// get the range of the bar; r1 = HIGH()-LOW(); // get the body value; b1 = ABS(close()-OPEN()); // is body > 50% of range?; v1 = b1 / r1 > 0.5; //true and close is down; v1 and CLOSE() IsDown |
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. |