Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

calcualtions of spread and correlation indicators

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    calcualtions of spread and correlation indicators

    @ NinjaTrader_PaulH
    thank you for converting to NT8 (10/03/2015) the spreadoscillator indicator posted on the ninjatraderecosystem.
    By looking the arithmetic of its script and if I consider the case it is applied to ES and RTY, I understand it first calculates the difference of the dollar values of these two futures and then it calculates such difference as a percent of the sum of the two futures’ dollar values.
    So for the two ES and RTY micro futures the two values compared should approximately be

    SP500 2977 * 5 = $14885
    RTY 1531 * 5 = $7655.

    (.. I tried to check this using the print action of the strategy builder. but I was unable to find out how to tell the SB to print just the: double FirstValue and the double SecondValue @ lines 63 and 64 of the indicator)

    So the spreadoscillator is plotting the (14885 – 7655) / ((14885 + 7655)*100)

    If I want to compare the two spreads vs the ES, say the spread ES-RTY and the spread ES-NQ (for ex., because I wish to know which one of these two spreads is bigger, or because when one trades a spread between two futures, usually makes sense entering two opposing positions with the same dollar values for the two instruments) wouldn’t it be more correct to calculate the spreads comparing similar $ values for the two futures, ie using the spread ES-2*RTY (RTY dollar value is nearly half of ES dollar value) and the spread ES-NQ (ES and NQ are almost of the same size) ?

    If this is correct, is it possible to modify the script of the spreadoscillator indicator so that it can measure the spreads between same size dollar values?

    I tried to find out whether the correlation indicator uses same size dollar values for its calculations, but I cannot understand by looking at the script how such correlation calculations are executed by the indicator. I was going to find out whether these two indicators can be used together for more informed spread trades.

    thx
    Attached Files
    Last edited by guidoisot; 09-30-2019, 04:53 AM.

    #2
    Hello guidoisot,

    Thanks for your post.

    Regarding, "... wouldn’t it be more correct to calculate the spreads comparing similar $ values for the two futures, ie using the spread ES-2*RTY (RTY dollar value is nearly half of ES dollar value) and the spread ES-NQ (ES and NQ are almost of the same size) ?" I could not advise as to what or would not be "correct" in the indicator case as I did not design the indicator. I recommend reviewing the basis of the indicator as defined by the indicator author and perhaps contacting him directly. From the download description, "The SpreadOscillator, as discussed in the October 2013 Stocks &Commodities article titled "An Expert Of A System" by Sylvain Vervoort".

    Each instrument will have its own Dollar per point and its own point size. The indicator is pulling the instruments point value (dollars per point) from MasterInstrument.PointValue Reference: https://ninjatrader.com/support/help...pointvalue.htm

    Regarding, "...is it possible to modify the script of the spreadoscillator indicator so that it can measure the spreads between same size dollar values?" If you would like an indicator created for you or customized to your specific needs, we can provide a reference to 3rd party programmers who can provide this service.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by inanazsocial, Today, 01:15 AM
    0 responses
    2 views
    0 likes
    Last Post inanazsocial  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    5 responses
    22 views
    0 likes
    Last Post trilliantrader  
    Started by Davidtowleii, Today, 12:15 AM
    0 responses
    3 views
    0 likes
    Last Post Davidtowleii  
    Started by guillembm, Yesterday, 11:25 AM
    2 responses
    9 views
    0 likes
    Last Post guillembm  
    Started by junkone, 04-21-2024, 07:17 AM
    9 responses
    71 views
    0 likes
    Last Post jeronymite  
    Working...
    X