NexusFi: Find Your Edge


Home Menu

 



Categories Help    






The Elite Circle
File sharing for Elite Members only, includes any and all platforms and file types


Sort by
Filter

Show full/short entries Entries
atgPairsCorrelation 5 *
atgPairsCorrelation - NinjaTrader correlation indicator

Exported using NT version 7.0.1000.29.

Change Log
2015-09-08 - Added support to automatically label the plots.
2015-09-14 - Speed enhancements. Reduced 5 loops through the correlation period to 1 loop.

The atgPairsCorrelation indicator plots the correlated logarithmic returns of two data series.

Thanks to @Oysteryx for helping me make this indicator.

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 value 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.

In addition to comparing pairs of data series, special functionality is included that allows you to compare with an interest rate spread.

A template to load the indicator as displayed in the screen shot is available on the support thread. The template displays the correlations of the following instruments:

ES -> ZN/ZT spread
ES -> 6J
ES -> CL
ES -> GC
ES -> ZB
ES -> 6A
ES -> 6E

It’s assumed that the primary data series loaded on the chart is one of the two data series to be correlated. 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 the template (see support thread ) 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 their plots are overlaid.

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



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. Here’s an example of how to configure an interest rate spread:


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.

Known issues:
  • Inefficient correlation algorithm
  • Chart stays on top of the z-order.
 
Suggest other entries I might like
Details: atgPairsCorrelation


September 8th, 2015
Size: 3.71 KB
PriceHline 5 *
Draws a horizontal line at the current price which changes as price changes. A + or - offset in ticks from current price can also be applied. Has the added feature of drawing lines for the current Bid and Ask, but by default these lines are not displayed. The line styles are controlled using the Lines section listed within the indicator's settings/parameters dialog.
 
Suggest other entries I might like
Details: PriceHline


September 5th, 2015
Size: 2.41 KB
Walk Forward Optimized Moving Average Indicator 5 *
Version 1

This indicator is a Walk Forward Optimizer for a pair of moving averages. The moving averages in this case is the Ahrens Moving Averages that I have previously posted in the elite section. Pay attention to the output window as I print the results of the optimization there.

HOW IT WORKS

At the beginning of each session it will optimize the two variables (Moving Average Periods) for the last three sessions and draw the optimized moving averages for the current session. So the optimized variables are never tested on the current session that it is being drawn. Optimized prices takes place after the moving average cross on the open of the next bar.

I used the walk forward method to avoid CPU lag and massive curve fitting.

It works only on minute charts at the moment, but i am exploring solutions for other chart types.

I created a thread to post ideas or general discussion around said indicator here:

Cheers,

Sody
 
Suggest other entries I might like
Details: Walk Forward Optimized Moving Average Indicator


August 28th, 2015
Size: 4.36 KB
inputPCFileData 5 *
Input CBOE daily Put/Call data file into NinjaTrader as an indicator.
CBOE data can be downloaded from https://www.cboe.com/data/putcallratio.aspx
 
Suggest other entries I might like
Details: inputPCFileData


August 16th, 2015
Size: 2.94 KB
Simple Excel spreadsheet for ZB ZF ZN conversion to decmial 5 *
No big shakes here just something I use to plot my levels on 5 yr notes, ZF, using rancho's tradeplan indy.
Ron
 
Suggest other entries I might like
Real Line Break 5 *
This is a variation of Gordos "Better Line Break".
The difference: the "Real Line Break" uses the close of the last bar as open. This gives a more realistic chart and backtesting results.
Install via "Import Ninja Script".
(The code uses "Custom6" as ID. Change the value, if you already have an bar type with this number.)
Version 1.
 
Suggest other entries I might like
Details: Real Line Break


May 10th, 2015
Size: 4.79 KB
ChartTraderCustomBehavior 5 *
Here is an indicator to customize Ninja's ChartTrader. It allows you to customize the layout and visibility of the 8 standard order control buttons. Additionally when a position is open, it will hide all of those ChartTrader buttons as well as disabling the right-click context menu choices for buy and sell.

It helps to reduce distractions and allows one to focus on a single order, which some may find useful, as I have.

I want to recognize those who posted the code that helped me put this together. Thanks to @SilverDragon for the code to customize layout and visibility of the buttons. You can find a more thorough explanation plus a great video in his post at . Also thanks to @ninjatrader_Bertrand for the nice trick on determining market position from within an indicator.

Note that any chart on which this indicator is running will have it's ChartTrader buttons hidden and context menu buy/sell choices disabled whenever there is an open position on any instrument. This is beta 1.0.01. For educational purposes only. Use at your own risk.
 
Suggest other entries I might like
Details: ChartTraderCustomBehavior


April 13th, 2015
Size: 4.79 KB


Keywords: "charttrader buttons" "context menu" "right-click
PnFSignals&Alerts 5 *
This indicator add signals and Alerts (Text to Speech) for the following Point & Figure Patterns:

Triple Top
Ascending Triple Top
Spread Triple Top
Upside Symmetric Triangle
Upside Breakout of Bullish Resistance Line
Upside Breakout of Bearish Resistance Line
Ascending Triangle
Bullish Catapult
Triple Bottom
Descending Triple Bottom
Spread Triple Bottom
Downside Symmetric Triangle
Downside Breakout of Bullish Resistance Line
Downside Breakout of Bearish Resistance Line
Descending Triangle
Bearish Catapult

Add reference System.Speech.dll from:
C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Speech.dll

Follow Along @:

Cheers,

Sody
 
Suggest other entries I might like
Details: PnFSignals&Alerts


April 9th, 2015
Size: 16.92 KB
SodyR 4 *
Takes Williams%R, smooths it, then change the formula to to draw Percent R on price.

A better explanation can be found here:

Cheers,

SodyTexas
 
Suggest other entries I might like
Details: SodyR


March 24th, 2015
Size: 7.78 KB
MySQL & Ninjatrader Total PNL 5 *
What I did was build a simple strategy in Ninjatrader that does the following:

1- Builds a Database in MySQL
2- Builds needed tables (OpenPnL & ClosedPnL)
3- Stores PNL for all instruments that the strategy is loaded
4- Runs a Query for both Open and Closed PNL
5- Using existing indicator Strategy Plot draws both total PNL (Open + Closed) and Realized PNL

The possibilities of this method are very robust. I can reference the MySQL database in Excel or third party apps, or I can build logic in the trading system to stop trading at a defined loss.

You will need MySQL loaded on your machine, and I suggest setting up your own user name and pass word. There are plenty resources online on how to do this.

Also, you will need to add references to two dll files (MySql.Data.MySqlClient & System.Data) that are included in MySQL installation; the paths are:

C:\Program Files\MySQL\MySQL Connector C 6.1.3\lib\vs11
C:\Program Files (x86)\MySQL\MySQL for Visual Studio 1.1.4\Assemblies\v2.0

Follow along @:

Cheers,
SodyTexas
 
Suggest other entries I might like
Details: MySQL & Ninjatrader Total PNL


March 24th, 2015
Size: 6.22 KB
 



 
Category
 




© 2026 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 - Downloads - Top