Custom Breadth Indicator

Optuma Forums Optuma Scripting Custom Breadth Indicator

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #66893
    Andrew
    • Topics: 7
    • Replies: 5
    • Posts: 12

    Hi,

    I’m looking to create a custom breadth thrust indicator that would seem fairly simple, however, I ‘m not having much luck creating it. The indicator is basically the Zweig Breadth thrust model but using the S&P500 data in lieu of the NYSE data. The calculation is (SP500 Advances / SP500 Advances + SP500 Declines). The output data would have a 10 day ema placed on it and presented in Histogram format.

    Using the GetData Function, here’s what I have:
    GETDATA(CODE=ADVSPX:BM)/GETDATA(CODE=ADVSPX:BM)+GETDATA(CODE=DECSPX:BM)

    Not getting desired result from the custom breadth module.

    Please advise.

    TIA

    P.S. I’m moving this post from a custom breadth module tutorial post Darren put up in mid November. So if seen as a dup please disregard.

    #66895
    Matthew
    • Topics: 5
    • Replies: 625
    • Posts: 630

    Hi,

    You would not need to build this in custom breadth. As it is a calculation based on existing breadth codes you can use a script with a show view.

    The following uses your formula and applies a 10EMA as well…

    One question, with the formula you posted, are you sure it is not meant to be

    ?

    #66897
    Andrew
    • Topics: 7
    • Replies: 5
    • Posts: 12

    Matthew,

    My mistake, it should in fact be V3= V1/(V1+V2)

    Thanks again!

    #67787
    Drew
    • Topics: 12
    • Replies: 13
    • Posts: 25

    Hello,

    Is there a way to script the condition of crossing from below the .40 level to above 0.615 within 10 days on this indicator for the Zweig Breadth Thrust? There is a TimeSinceSignal function, but it would need to to include both levels. Many thanks.

    #67788
    Matthew
    • Topics: 5
    • Replies: 625
    • Posts: 630

    Hi,

    You would need to use both the TimeSinceSignal() function and the SignalAfter() function.  This script uses the V4 plot for the cross rules, you can change it to V3 if that was what you were after.

    Here is how it looks on the chart (blue shaded zones):

    Ex3

    2 users thanked author for this post.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest