First Signal

Optuma Forums Optuma Scripting First Signal

Tagged: 

  • This topic has 7 replies, 4 voices, and was last updated 5 months ago by Kim.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #67911
    Thomas
    • Topics: 130
    • Replies: 176
    • Posts: 306

    Hi,

    I try to script a signal where the tool moves above a selected threshold e.g. 10. That can easily be done with the function “CrossesAbove”.

    But when the tool move above 10 and a few days later moves below 10 and than again moves above 10 I get TWO signals within a very short period of time.

    Is there a way that I get only ONE signal when the tool moves the FIRST TIME above 10?

    I think I have to choose a period of e.g. 60 days if only the signal of the FIRST TIME when the tool moves above 10 should be used. After the period of 60 days, a movement above 10 is a real new signal.

    I have tried with “TIMESINCESIGNAL” and “SIGNALAFTER” but was not successful.

    Thanks,
    Thomas

    #67913
    Darren
    • Topics: 70
    • Replies: 873
    • Posts: 943

    Hi Thomas,

    Put the results in a NOREPEAT() function, and set it to 60 bars:

    https://help.optuma.com/kb/faq.php?id=1031

    1 user thanked author for this post.
    #67923
    Kim
    • Topics: 18
    • Replies: 26
    • Posts: 44

    Hi,

    I’ve been having a similar problem that I haven’t been able to solve using NOREPEAT.

    In the image below, each yellow line represents my entry signal. In the bottom panel, the green areas represent my exit signal. I’m looking to add a time exit so that if there isn’t an exit signal within 20 bars of the entry I exit the trade. I’ve tried to do this (represented by the dotted blue line) using the same code used to produce the entry signal plus:

    As you can see, the time exit only shows when there are no entry signals for, in this case, 22 bars.

    Ideally I’d like to be able to add the time exit to the Back Tester as an “OR”, but if that’s not possible just showing the time signal on a chart 22 bars after each entry signal would be great!

    Many thanks

    TimeSinceSignal

    • This reply was modified 5 months ago by Kim.
    #67929
    Darren
    • Topics: 70
    • Replies: 873
    • Posts: 943

    Hi Kim,

    I can’t think of an easy way using a Show Bar because every time there’s a new entry the time count starts again. However, in the Backtester you can set the Max Hold Days to 31 calendar days (ie approx 22 trading days) so the trade will be automatically exited if the signal isn’t hit before then:

    Capture

    You may also be interested in our quantitative Signal Testing add-on module which takes entry signals and shows the average performance over time. The Trade Tester component also allows you to add an exit signal. For more details (including videos) please see here:

    Signal & Trade Tester KnowledgeBase

    #67931
    Kim
    • Topics: 18
    • Replies: 26
    • Posts: 44

    Hi Darren,

    I’m using Optuma 2.0 Build 99, Trader Services and can’t see the option for maximum hold days, see screenshot below. Is it only available on certain subscriptions? It would definitely be helpful to have that option!

    By the way, I already have the Signal Tester module. It’s definitely useful but nothing allows me to do a “true life” test of my strategy. Perhaps when the re-write of the back tester is released?

    Thanks again

    Kim

    Back Test

    #67933
    Matthew
    • Topics: 5
    • Replies: 631
    • Posts: 636

    Hi,

    You could wrap your entry script in an OFFSET() function to get the result you are after.

    For example:

    Entry:

    Exit:

    This would not reset if a new cross happens within the 22 bar period.

    Ex4

    With your other query, you are correct, some of the properties in the Back Tester (such as Minimum Hold Days / Max Hold Days) are part of the Enterprise services subscription only.

    1 user thanked author for this post.
    Kim
    #67935
    Kim
    • Topics: 18
    • Replies: 26
    • Posts: 44

    Thanks!!! Appears to work in the back tester too!

    #67947
    Kim
    • Topics: 18
    • Replies: 26
    • Posts: 44

    Just as an FYI, it doesn’t do what I wanted in the Back Tester

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

Pin It on Pinterest