assistance with using time since signal

Optuma Forums Optuma Scripting assistance with using time since signal

  • This topic has 2 replies, 2 voices, and was last updated 1 week ago by Tim.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66165
    Tim
    • Topics: 11
    • Replies: 19
    • Posts: 30

    Folks I want to use in script for showbar that a slow stochastic of 10 etc. periods crosses below say 25 in the last (eg.5 days/bars)  and the gann 3 bar swing turns up within the (5 days/bars of crossing below the stoch 25 line . I know how to script for the the gann swing and stochs etc. as below, but I can’t work out effectively get the time frame  since signal correct.  any help appreciated

    thanks in advance

    a1 = gannswing()turnsup;
    a2 = stochscan();
    a1 and a2

    #66170
    Matthew
    • Topics: 5
    • Replies: 430
    • Posts: 435

    Hi,

    You could use the TimeSinceSignal() function.

    Wrap the Timesincesignal() around a2 variable and it will generate a count of how long it has been since it last triggered.

    You can then set the criteria to TimeSinceSignal(a2) <= 5

    You can see further examples here: https://help.optuma.com/kb/faq.php?id=1030

    #66261
    Tim
    • Topics: 11
    • Replies: 19
    • Posts: 30

    Thanks Maatthew I have sorted it now, mucho appreciated

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

Pin It on Pinterest