NexusFi: Find Your Edge


Home Menu

 





atgPairsCorrelation indicator support


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one timendaGain with 8 posts (19 thanks)
    2. looks_two Big Mike with 3 posts (1 thanks)
    3. looks_3 k7ler with 1 posts (0 thanks)
    4. looks_4 RyanTX with 1 posts (0 thanks)
    1. trending_up 5,973 views
    2. thumb_up 21 thanks given
    3. group 10 followers
    1. forum 11 posts
    2. attach_file 8 attachments




 
Search this Thread

atgPairsCorrelation indicator support

  #1 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235

This is the main support thread for the atgPairsCorrelation indicator for NinjaTrader.

The atgPairsCorrelation indicator plots the correlated logarithmic returns of two data series. The inputs to the indicator are standard price series data. The indicator internally generates the logarithmic returns and calculates and plots the correlation between them.

The indicator plots a value that ranges between -1 and +1. A positive value means that the two data series are correlated ( moving together ) while a negative value means they're moving in opposite directions. The magnitude of the value expresses the fidelity of the correlation. A value of 1 is achieved if you compare an instrument with itself.

Special thanks to @Oysteryx for making this possible.



The indicator download page is here.

A chart template that configures the indicator is attached to this post.

The template assumes that the ES daily data series loaded on the chart. The chart series is always compared with one other series that the indicator loads internally. You may of course use any data series you want on the chart and in the settings for the indicator to run correlation studies on pairs of interest to you.

To use this template load it on a chart of the ES with at least 365 days of daily data. This template loads 7 instances of the atgPairsCorrelation into a single chart panel so that they plots are overlaid.

You must maintain the property settings for each instance so that the contract months are current.

Spreads
For running a correlation on an interest rate spread you must enter the two instruments involved in the spread into SpreadLeg1 and SpreadLeg2. In addition you must enter weights for each leg of the spread. the CME publishes these weights here:

https://www.cmegroup.com/trading/interest-rates/files/ics-ratios-2015-12.pdf

They are frequently changed so be sure to check it regularly.

The SecondInstrument parameter ( set to ES 09-15 ) is ignored if SpreadLeg1 and SpreadLeg2 are populated.

The CME weights found on the aforementioned web page for each leg are specified in SpreadLeg1Weight and SpreadLeg2Weight.

Here are some basic property settings to configure the indicator to compare the ES to the 6J contract ( USDJPY futures contract ):



For running a correlation on an interest rate spread you must enter the two instruments involved in the spread into SpreadLeg1 and SpreadLeg2. In addition you must enter weights for each leg of the spread. the CME publishes these weights here:
https://www.cmegroup.com/trading/interest-rates/files/ics-ratios-2015-12.pdf

Here's how to configure a correlation of the ES to the spread between the ZN and ZT ( 10 year - 2 year US treasury bond futures contracts ).


Attached Files
Elite Membership required to download: atgCorrelation.xml
Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


timendaGain View Post
Here's an updated version that plots the labels.

You should update the zip file download instead and add a small text section for changelog, then make a post here that you've done so. I will read the post, and then send out notice emails to everyone who downloaded the file so they know the new file is available.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235


Added support to automatically label the plots.

New version attached as well as uploaded to the downloads page. @Big Mike


Attached Files
Elite Membership required to download: atg.PairsCorrelation.zip
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235

One thing I don't like about this indicator is that the correlation function is inefficient. In fact that's an understatement. It loops through the correlation period 5 times! It should not loop even once. My next priority is finding or coding a replacement algorithm.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235

Speed enhancements. Reduced 5 loops through the correlation period to 1 loop. See attached. New version is also on the downloads page. @Big Mike

Attached Files
Elite Membership required to download: atg.PairsCorrelation.zip
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


timendaGain View Post
Speed enhancements. Reduced 5 loops through the correlation period to 1 loop. See attached. New version is also on the downloads page. @Big Mike

Please update the changelog, then let me know. If I send notifications now, it looks like nothing was changed since Sept 8

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235


Big Mike View Post
Please update the changelog, then let me know. If I send notifications now, it looks like nothing was changed since Sept 8

Mike

I understand that's because I did 2 changes on the 8th? If so then changing the 2nd entry in the changelog from 9/8 to 9/14 should fix it? I've done that now.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


timendaGain View Post
I understand that's because I did 2 changes on the 8th? If so then changing the 2nd entry in the changelog from 9/8 to 9/14 should fix it? I've done that now.

No, sorry. My mistake. I am catching up on hundreds of posts I've not had a chance to read over the last few days and didn't realize your post was from the 8th.

We don't send out notification updates twice in one day so it wouldn't matter.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #9 (permalink)
 timendaGain 
New York, NY
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader
Trading: ES MES
Posts: 792 since Nov 2010
Thanks Given: 149
Thanks Received: 235


Big Mike View Post
No, sorry. My mistake. I am catching up on hundreds of posts I've not had a chance to read over the last few days and didn't realize your post was from the 8th.

We don't send out notification updates twice in one day so it wouldn't matter.

Mike

Okay. No new changes since the 8th but depending on when you sent a notification for the 1st change they may miss the 2nd. Best to notify them again.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #10 (permalink)
 RyanTX 
Houston, TX
 
Experience: Advanced
Platform: NinjaTrader / InvestorRT
Trading: ES / 6E
Posts: 10 since Jun 2009
Thanks Given: 2
Thanks Received: 5


Is there a Ninja version for the Diversion indicator that I somehow missed ?

If not, would it be possible to list the text of the TradeStation code so I can see if it can be converted to Ninja.

Thanks,

Ryan.

Reply With Quote




Last Updated on December 30, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts