- This topic has 1 reply, 2 voices, and was last updated 9 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 › SCANNING FOR BOOLEAN VALUE TRUE
OPTUMA SCAN SCRIPTING ISSUE
GOAL
TO CORRECT EXISTING SCAN SCRIPT
PROBLEM
EXISTING SCAN SCRIPT NOT PICKING UP ELIGIBLE CANIDATES
REQUIRED
NEED TO SCAN FOR 1 CRITERIA.
1. 5 SMA OF SLOW STOCHASTICS FOR TRUE CONDITION (BOOLEAN TRUE) SEE BELOW
CURRENT BOOLEAN STOCHASTIC SCRIPT:
1 2 3 |
// THIS SCRIPT INDICATES TRUE OR FALSE WHETHER THE 5 SMA OF STOCH (125,5,1) IS BULLISH X >60 OR BEARISH X <40 (BOOLEAN) FOR USE ON WATCH LISTS ONLY |
S1 = ma(stoch(TYPE=Slow, BAR1=125, BAR2=5, BAR3=1), CALC=Close);
V1 = CLOSE(S1)>=60; //BULLISH
V2 = CLOSE(S1)<=40; //BEARISH
SWITCH(V1,V2)
(THIS SCRIPT IS IN A WATCHLIST AND INDICATES TRUE WHEN INDICATOR INITIAL CROSS IS ABOVE 60 AND REMAINS TRUE UNTIL INDICATOR CROSSES BELOW 40 FOR A FALSE SIGNAL)
HOW TO WRITE SCRIPT SO THAT I CAN SCAN WATCHLIST FOR THE BOOLEAN VALUE TO BE TRUE ONLY (BULLISH)?
Hi,
You can adjust the existing script to reference only the V1 criteria passing for use in a scan…
1 2 3 4 5 |
S1 = ma(stoch(TYPE=Slow, BAR1=125, BAR2=5, BAR3=1), CALC=Close); V1 = CLOSE(S1)>=60; V1 |
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. |