A few scripting questions

Optuma Forums Optuma Scripting A few scripting questions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61987
    AvatarJeffrey
    • Topics: 2
    • Replies: 0
    • Posts: 2

    Hello everyone!
    I am new to Optuma and have a few questions that I could not find answers to via the free instructional videos. I apologize if I have overlooked them! If you have a link that you could direct me to or point me in the right general direction, I would greatly appreciate it!!

    1. I would like to use the OPTEX() code in my script, but I only want the signal to fire when the BQ line is within the blue or red areas.

    optex bands

    2.   Is there a way to have the “Showbar” arrow appear on the first or last day of retrograde only? As opposed to multiple arrows showing the duration of the retrograde period? Also, is it possible to generate a signal X amount of days after mercury turns direct or even signal at the end of the Orb shadow?

    3.   Is there a way to have the signal WAIT to be generated until the “low of the high bar” has been exceeded  (assuming we’re planning on going short), after certain criteria have been met? For example, Moon reaches its maximum latitude then waits to be trigged by the violation of the “low of the high bar”.
    Highbar entry

    Thank you!!
    Jeff

    #61993
    MathewMathew
    • Topics: 32
    • Replies: 1,648
    • Posts: 1,680

    Hi Jeff,

    Re 1. Each of those levels are available using the ” dot notation” whenever a function has multiple outputs, enter a “.” and you will see the options available.
    In this case I also want to use a variable as it is more efficient.

    So this would be the code to signal when the Black Ratio line enters into the red zone.

    Re 2 and 3. Remember that we have a separate group for Astro scripts. In this case your questions are more general so I’ll answer them here.

    Re 2: When you have a true false condition, that is stored as 1 for true and 0 for false. So something you can do when you want to signal on the first bar is use the ChangeTo operator to find when the result ChangeTo 1
    eg If you were looking at Higher Bars —something which could be true multiple times in a row — and you wanted to capture only the first higher bar.

    Re 3: You would use offsets. In this case you have a Higher bar and you want the last bar to be higher and this bar to have a low which is lower than the previous bar. We use square brackets to offset the data.

    Hope that helps

    Mathew

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close