• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Correlation indicator should automatically handle rollovers.

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

    Correlation indicator should automatically handle rollovers.

    The correlation indicator takes a string that specifies which instrument to compare against. This can be troublesome during rollover because you have to go into your indicators and update the strings. So in my own spread indicator (which frankly you should also add) I have some code to automatically use the main chart's month with a bool to specify if the user wants to provide the month in the string. This might not work for every case with correlations because front months might be different, in which case perhaps we could add logic to always use the front month?


    Code:
    else if (State == State.Configure)
                {        
                    string MyFrontLeg = FrontLeg;
                    string MyBackLeg = BackLeg;
                    string Month = BarsArray[0].Instrument.FullName.Split(' ')[1];
    
                    if(!UserProvidesMonth)
                    {
                        MyFrontLeg = FrontLeg + " " + Month;
                        MyBackLeg = BackLeg + " " + Month;
                    }
    
    
                    AddDataSeries(MyFrontLeg, BarsArray[0].BarsPeriod);
                    AddDataSeries(MyBackLeg, BarsArray[0].BarsPeriod);
                }

    #2
    Hello TheWhiteDragon,

    Thank you for your post.

    I've added a feature request to add rollover handling to the Correlation indicator for you - this may be tracked with the number SFT-4302.

    As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

    Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

    If you'd like to share your code, you can submit to the User App Share here if you haven't already:

    https://ninjatrader.com/support/foru...app-submission

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Papercut110, Today, 09:08 PM
    0 responses
    2 views
    0 likes
    Last Post Papercut110  
    Started by iq200, 11-09-2019, 08:26 AM
    5 responses
    56 views
    0 likes
    Last Post koganam
    by koganam
     
    Started by johng964, Today, 02:57 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by spamula, Today, 03:00 PM
    2 responses
    16 views
    0 likes
    Last Post spamula
    by spamula
     
    Started by MARTIN MARTIN, Today, 01:01 PM
    0 responses
    16 views
    0 likes
    Last Post MARTIN MARTIN  
    Working...
    X