January 22nd, 2017
Size: 73.56 KB
Downloaded: 8 times
1814
ericson
This adds a ChartStyle called PointOnClose.
Copy BruChartStyles.cs into your Types folder,
e.g. C:\Users\YourUserName\Documents\NinjaTrader 7\bin\Custom\Type
Compile any indicator using Tools + Edit NinjaScript
Close and re-start NinjaTrader.
Tested with NinjaTrader 7.0.1000.31
This is different fill type that I use when testing stocks. Whatever you set for slippage in the strategy analyzer will be applied as a percentage.
Ex: If you set 0.005 for slippage, it will apply 0.5% slippage to each transaction.
I find this more useful than the default tick or price based fill types, since this helps normalize the slippage across stocks with a wide range of values. If going long, the slippage is defined as either 0.5% or the next high, whichever is greater (same as the default slippage calc from NT). For low priced stocks, it also applies a minimum of $0.01/share.
Note that for a typical stock, 0.5% is quite conservative. 0.3% would probably even be a bit high (But obviously that depends on your strategy).
June 20th, 2013
Size: 4.96 KB
Downloaded: 26 times
1422
kbeary33
The attached file is a new chart style for NinjaTrader 7 that adds High, Low, Close (HLC) bars, which are popular for Volume Spread Analysis (VSA).
There are indicators for NT that can be used to simulate HLC bars, but these are not coloured by paint bar indicators, which are designed to colour bars and not other indicators.
This chart style will be coloured by paint bar studies, because it creates a new bar style.
The first version of the chart style is described here and that page has tips on programming and installing the chart style.
Installation
Download HlcChartStyle.zip, then follow the usual import procedure. File, Utilites, Import NinjaScript. Then restart NT.
The screen shot shows HLC bars coloured by Better ProAm from Emini-Watch.
November 6th, 2012
Size: 2.03 KB
Downloaded: 677 times
1300
pawnbroker
This strategy is simple straight forward... and replaces the other... Sorry if I'm not doing it right. I added screen capture as well as indicator capture... You can fire this off at each trade... or you can fire it off by depressing the mouse down on the button...
It's design is to help you look for signals... and compare the visual to the data later... I know when back testing and simulation... it would have been easier if I had this routine already built in...
This combines code that was found on the board and creates a utility tool. Simply copy the code into your strategy or use this a start. Modify the MouseDown event and add any indicator that you want to have printed or output to a file.
Optimization Type:
RSquared is the coefficient of determination.
The optimization performs simple linear regression of the equity curve by the least squares method to determine slope of a linear line. This linear regression line is then correlated with the equity curve by trade # to calculate r-squared. The closer to 1 the better the fit. I have wrote the code to only return result with positive net income.
I have pulled the following definition from Investopedia which provides a very good explanation.
What Does Coefficient of Determination Mean?
A measure used in statistical model analysis to assess how well a model explains and predicts future outcomes. It is indicative of the level of explained variability in the model. The coefficient, also commonly known as R-square, is used as a guideline to measure the accuracy of the model.
Investopedia explains Coefficient of Determination
One use of the coefficient of determination is to test the goodness of fit of the model. It is expressed as a value between zero and one. A value of one indicates a perfect fit, and therefore, a very reliable model for future forecasts. A value of zero, on the other hand, would indicate that the model fails to accurately model the dataset.
Copy file to directory ".../Ninja Trader 7/bin/custom/type/" and open up any indicator for editing and recompile. This optimization type will then show up in strategy analyzer.
Revision 0.12 - Uploaded 11/10/2011: Fixed error in calculation
November 9th, 2011
Size: 3.63 KB
Downloaded: 202 times
1041
eleven
Similiar to the Expectancy Score Optimization Type, but this one does not include opportunity. Look at this link to read how this file can help you with your optimizing.
Join us on this thread to read more about how to use Optimization Types to improve your optimizations.
Enjoy!
Gordo
P.S. If you get a score of 777, that means there were no trades that met the criterea. I score of 888 means there were less than 52 trades in a year's time and a score of 999 means the strategy had no losing trades making it not viable.
Expectancy is how much you expect to earn from each trade for every dollar you risk. Opportunity is how often your strategy trades. You want to maximize the product of both. Expectancy = (AW × PW + AL × PL) ⁄ |AL| (expected profit per dollar risked) Expectancy score = Expectancy × Opportunity where AW = average winning trade (excluding maximum win) PW = probability of winning (PW = <wins> ⁄ NST
where <wins> is total wins excluding maximum win) AL = average losing trade (negative, excluding scratch losses) |AL| = absolute value of AL PL = probability of losing (PL = <non-scratch losses> ⁄ NST) Opportunity = NST × 365 ⁄ studydays (opportunities to trade in a year) where
NST = <total trades> − <scratch trades> − 1 In other words, NST = non-scratch trades during the period under test (a scratch trade loses commission+slippage or less) minus 1 (to exclude the maximum win).
studydays = calendar days of history being tested
This code atttempts to duplicate this algebraic information in NT7 eese.
April 29th, 2011
Size: 2.22 KB
Downloaded: 396 times
898
gordo
I've converted the indicator ExportChartData to a Strategy to make it easier to apply against a basket of instruments. Thanks to BigMike and Sam for some older comments and code that inspired this .
Next releases will include enums to select various DateTime output formats. It is currently outputing POSIX-style DateTime. Feel free to make it better!
Strategy ExportData changelog:
24 February 2011: ver 3.35 posted. Significant refactor. Adds enums for DateTime output formats, delimiters, file types. Adds user-configurable output preferences for export to Matlab and R, and a code example for exporting indicator data with timeseries data.
21 February 2010: ver 3.00 posted
22 February 2010: ver 3.01 posted. Deleted Print statements that were used for debugging and changed an if/if to an if/else to save processor power.
22 February 2010: ver 3.10 posted. Added OnStartUp() and OnTermination() methods and moved code there from OnBarUpdate() for efficiency.
2 November 2010: ver 3.2 posted. Fixed bug where spaces in path names would throw an exception, added better exception handling, added Print statements in OnStartUp() and OnTermination(). NT7b23 compile.
National Stock Exchange provides bhavcopies or End of Day data. But sadly the same cannot be fed to NinjaTrader natively. So I build a custom ImportType file so that the same can be fed to NinjaTrader.
The same is supposed to work in conjunction with [U][U]Data Downloader[/U][/U] (in Data Downloader use the default format to format the data). Of-course any data of similar format can also be fed. Being an open-source code you can always modify the same to suit your needs.
October 30th, 2010
Size: 50.93 MB
Downloaded: 576 times
705
sam028
Exported with NT7 7.0.0.15
NinjaTrader do not have Dynamic Data Exchange (DDE) capability. This indicator helps one to build a DDE connection between NT and any client application like excel. NT acts as the server and sends the data.
.Net do not supports DDE natively but there is a very good free open source library namely NDDE, which i have used to make the dde link.
The indicator uses many "non-supported stuffs". So use/edit is judiciously.
an alternative to the native Data Box or the Mini Data box dsDataBox displays the OHLC in the tool strip of the chart. Can be edited to include custom information like volume etc. It uses many non supported stuffs so do take care on that.
June 14th, 2010
Size: 2.33 KB
Downloaded: 378 times
491
bukkan
Hi,
The attachment contains 4 lists with tickers of the AMEX, ARCX, NASDAQ and the NYSE.
Importing these lists into Ninjatrader 7b16 will solve the problem that since NT7 it does no longer recognize tickers on the fly and gives an error if any stock ticker is entered that is not already in the instrument list.
Import a list goes as follow:
File->Utilities->Import Stock Symbol List
Select the correct exchange from the list and import the list. Please note, this can take a very long time.
BetterRenko is avail in elite area, and provides a better implementation, but this is left here for those interested.
Renko implemenation that maintains the correct wicks/volume.
It should coexist with SbsRenko and MedianRenko and NT Renko. The implementation also allows CandleSticks or OpenClose bar types to be used, but maintains the wick data reguardless of how it is displayed. The bar open is repainted, which is a weakness.
To use this, just import the zip file, compile some indicator, and restart Ninja to get the code loaded.
In this post I'll describe how to quickly setup the FTSE 100 stock list in NT7.
It is a pity that there is no easy "just import" and share these list stock list with all the mappings to the different brokers like Yahoo, Google Interactive Brokers etc yet.
I have already request the NT-team to implement a full import/export of the Instrument Manager, however I hope they do.
Please add you're support on this threat Here is you like this idea too.
How to create the FTSE 100 in Ninjatrader with Yahoo data source
I presume you already created a Yahoo as data source if not, look around how to do this.
Here is how you import all the FTSE 100 tickers at ounce:
First open the Yahoo Page with the FTSE index on: FTSE Index Components
Scroll down and download the Spreadsheet
or click here
Open the spreadsheet and remove all column leave only the ticker column.
Save the list into a cvs text file.
Now start NT7 and go to: File->Utilities->Import Stock Symbols
Change Traded on to Liffe
Change the currency into pounds
Click the button <New> and Type the Name FTSE 100
You can change the session template but not necessary needed
Remove the Separator chars
And press the load button.
Select your file you just saved from the spread sheet ( set file type to any if you cant see it )
After clicking ok you should see the full FTSE 100 list.
Now look for the BT-A.L symbol. It will give an error because Ninja doesn't allow "-" in ticker symbols. And change it into BTA.L We'll come back to this later so that Yahoo will understand this.
Press Ok.
The symbols will be imported.
Click ok to finish.
Now we need to adjust the BT-A.L stock so Yahoo understands us on this stock.
Go to the Tools->Instrument Manager and search for your BTA.L stock
Press edit, and go to the Misc tab and scroll down to the Yahoo field and change the BTA.L into BT-A.L
Press Ok
Now some serious testing and easy usage:
Connect NT with the Yahoo data source: File->Connect-> your Yahoo connect name
Now go to: File->New->Market Analyzer
Right Mouse click in one of the fields of the market analyzer.
Select Add Instrument List-> FTSE 100
The full FTSE 100 list will appear in the Market Analyzer.
Open a chart File->New->Chart
Scroll down to out FTSE 100 list and select any stock you like and press New
Change in the right column under the Period section the Type to day
And press Ok
You're first UK chart is now on.
Now go to the top right corner of the chart where the close window X is and look a bit to the left there is an L.
Click on this L and select the first color there.
Now go to your Market Analyzer and pick the same color there too also on the right corner. We have now connected the two windows together for easy stock browsing.
Click in the market analyzer on the first stock and the chart should update and show that ticker. Use enter to quickly run through the list.
This is an NT7 indicator used to write timestamped OHLC and volume data from the open chart to a text file for analysis outside of NT (Excel, Matlab, R, etc). It gives you the option to use different characters for delimiting files, as well as the option to split Date and Time into two separate fields. Upcoming features include custom DateTime formats.
Feel free to help make it better!
Change Log:
30 Jan 2010. Ver 1.0 posted.
31 Jan 2010. Ver 1.1 posted. Cleans up the code and displays variables for planned future enhancements.
20 Feb 2010. Ver 2.0 posted. Split path and file name options and added filename default to instrument name/barstype/periodicity, which should make batch usage easier. MXASJ stopping development of this as an INDICATOR in favor of a STRATEGY called ExportData which will be posted seperately.
November 29th, 2020 08:01 PM mtaalamu RJay's bars are SO good, that I use them as the basis of ALL my trading decisions. I love, Love, LOVE! how "quiet" it ma
kes my charts.
Looking at range bars has completely weaned me from its time-based counterparts.
Thanks RJay!
November 13th, 2019 07:21 PM OpalDragon Great Bars from Great Guy
I still use other bars... Reversal Bars, Simple Minute Bars, ROE BARS from Trade The Plan and Volume Bars....
and these are a good classic if you want to really test something with just RANGE as a Variable.
June 11th, 2017 10:55 PM romus
February 17th, 2016 11:18 PM no3putts Thanks!
December 14th, 2014 01:56 AM Broman I know this upload is older, but thank you very much for building and sharing!