Excel Tradingjournal filled by Ninjatrader - NinjaTrader | futures io social day trading
futures io futures trading


Excel Tradingjournal filled by Ninjatrader
Updated: Views / Replies:1,278 / 7
Created: by fossil Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Excel Tradingjournal filled by Ninjatrader

  #1 (permalink)
Elite Member
Germany
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: IB and zen-Fire
Favorite Futures: NQ
 
Posts: 92 since Apr 2010
Thanks: 8 given, 38 received

Excel Tradingjournal filled by Ninjatrader

Iīve been searching for hours here but i canīt find an excel tradingjournal filled by Ninjatrader export. Maybe you know one please tell me.

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Bradenton, FL
 
Futures Experience: Advanced
Platform: tradestation
Favorite Futures: commodity futures
 
Posts: 7 since Aug 2013
Thanks: 3 given, 3 received

Trading Journal

Have you looked at TJS Elite. It has a NJ import.
trading-journal-spreadsheet.com
Tell him Larry sent you/

Reply With Quote
 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received



fossil View Post
Iīve been searching for hours here but i canīt find an excel tradingjournal filled by Ninjatrader export. Maybe you know one please tell me.

The most popular one on futures.io (formerly BMT) is this one:

https://futures.io/psychology-money-management/4884-trading-metrics-journals-record-keeping.html

Check end of thread, it's continually developed.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #4 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 313 since Sep 2013
Thanks: 96 given, 843 received


fossil View Post
Iīve been searching for hours here but i canīt find an excel tradingjournal filled by Ninjatrader export. Maybe you know one please tell me.

I have one based on Van Tharp's R-multiples, works great on live trading but horrible on market replay. It is based on this code here: Dionysus New Year Present – Ninja & Excel - NinjaTrader Support Forum

FYI, the reason it does not work in market replay is because excel hangs when to much data is sent to it via a Interop. The solution to this is to build a RTD server, a DDE link or scratch excel for the trade log. I am taking the path of scratching excel as a trade log and building a MySQL database that will act as a trade log. From MySQL I can export the data to excel or use programs suchs as R or Matlab to play with the numbers.

Either way, I hope this code below is a good starting point for ya.

 
Code
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;

//Make sure to references the following dlls 
using Excel = Microsoft.Office.Interop.Excel; 
using System.IO;
#endregion		


		
		//Spreadseet
		private string excelFile = @"C:\Users\asoderstrom\Documents\Dropbox\NT7 Trade Log\TradeLogKinkoGC1.xlsm"; 
		private string excelSheetName = "Trade Log";
		private bool workSheetFound = false;
		private bool excelOpen=false;
		private string fullFileName;
		private string simpleFileName;
		Excel.Application excelApp;
		Excel._Workbook excelWorkBook;
		Excel._Worksheet excelSheet;
		Excel.Range excelRange;
		private int temp;
		
		//Export to spreadsheet
		private string xlLongShort;
		private string xlSymbol;
		private DateTime xlEntryTime;
		private int xlEntryQty;
		private double xlEntryPrice;
		private DateTime xlExitTime;
		private int xlExitQty;
		private double xlExitPrice;
		private double xlComission = 6.00;
		private double xlPnL;
		private double xlRmultiple;
		private double xlDollarRisk;

		Excel.Range AcctString;
		
        #endregion

        	
		
		#region updateExcel
		private void UpdateExcel()
		{
			excelRange = excelSheet.get_Range("A6","V6");
			excelRange.Rows.EntireRow.Insert(Excel.XlInsertShiftDirection.xlShiftDown,false);
		
			excelSheet.Cells[6,1] = xlLongShort;
			excelSheet.Cells[6,2] = Instrument.MasterInstrument.Name;
			excelSheet.Cells[6,3] = xlEntryTime.ToString();
			excelSheet.Cells[6,4] = "=FLOOR(C6,1)";
			excelSheet.Cells[6,5] = xlEntryQty;
			excelSheet.Cells[6,6] = xlEntryPrice;
			excelSheet.Cells[6,7] = xlExitTime.ToString();
			excelSheet.Cells[6,8] = "=FLOOR(G6,1)";
			excelSheet.Cells[6,9] = xlExitQty;
			excelSheet.Cells[6,10] = xlExitPrice;
			excelSheet.Cells[6,11] = "=(G6-C6)*24";
			excelSheet.Cells[6,12] = "=I6*Comm";
			excelSheet.Cells[6,13] = xlPnL;
			excelSheet.Cells[6,14] = xlDollarRisk;
			excelSheet.Cells[6,15] = "=X6*Q7";
			excelSheet.Cells[6,16] = "=M6/O6";
			excelSheet.Cells[6,17] = "=Q7+M6";
			excelSheet.Cells[6,18] = "=(Q6-Q7)/Q7";
			excelSheet.Cells[6,19] = "=(Q6-bEquity)/bEquity";
			excelSheet.Cells[6,20] = "=MAX(Q6:bEquity)";
			excelSheet.Cells[6,21] = "=(Q6-T6)/T6";
			excelSheet.Cells[6,22] = "=IF(M6>=0,IF(V7<>0,V7+1,1),0)";
			excelSheet.Cells[6,23] = "=IF(M6<0,IF(W7<>0,W7+1,1),0)";
			excelSheet.Cells[6,24] = EquityAtRisk;
			AcctString = (Microsoft.Office.Interop.Excel.Range)excelSheet.Cells[1,11];
			EquityAtRisk = (double)AcctString.Value2;
			DrawTextFixed("hi","Ear: " + EquityAtRisk,TextPosition.BottomRight);
		}
		#endregion
		
		#region On Bar Update
        protected override void OnBarUpdate()
        {
			//Excel
			if (excelOpen == false) SetUpSpreadsheet();
			
			}
		#endregion
		
		#region On Execution
		protected override void OnExecution(IExecution execution)
		{
			//Long Trades ***************************************************************************************
			if (enterLong != null && enterLong.Token == execution.Order.Token)
			{
				if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
					{
					}
				if (execution.Order.OrderState != OrderState.PartFilled)
					{
						myEntryBar = CurrentBar;
						myBarsSinceEntry = 1;
						PLong = true;
						FToB = true;
						if(Close[0] < RiskL[0])
						{
							exitLong = ExitLong("S2C","B2O");
						}
						else
						{
							exitLongStop = ExitLongStop(0, true, execution.Order.Quantity, RiskL[0], "ATR-L", "B2O");
						}
					
						intRisk = (execution.Order.AvgFillPrice - MinCloud[0]);
						xlLongShort = "Long";
						xlEntryTime = execution.Order.Time;
						xlEntryQty = execution.Order.Quantity;
						xlEntryPrice = execution.Order.AvgFillPrice;
						enterLong = null;
					}
			}
			
			if ((exitLongStop != null && exitLongStop == execution.Order))
			{
				if (execution.Order.OrderState == OrderState.Filled && execution.Order.OrderState != OrderState.PartFilled)
				{
					PLong = false;
					xlExitTime =  execution.Order.Time;
					xlExitQty = execution.Order.Quantity;
					xlExitPrice = execution.Order.AvgFillPrice;
					xlPnL = Math.Round((((xlExitPrice - xlEntryPrice)*xlExitQty)*Instrument.MasterInstrument.PointValue),2);
					xlDollarRisk = Math.Round(((intRisk)*Instrument.MasterInstrument.PointValue),2);
					xlRmultiple = xlPnL/xlDollarRisk;
					UpdateExcel();
					exitLongStop = null;
				}
				
				if(execution.Order.OrderState == OrderState.Rejected)
				{
					exitLongStop = null;
				}
				
				
			}
			
			if(exitLong != null && exitLong == execution.Order)
			{
				if (execution.Order.OrderState == OrderState.Filled && execution.Order.OrderState != OrderState.PartFilled)
				{
					PLong = false;
					xlExitTime =  execution.Order.Time;
					xlExitQty = execution.Order.Quantity;
					xlExitPrice = execution.Order.AvgFillPrice;
					xlPnL = Math.Round((((xlExitPrice - xlEntryPrice)*xlExitQty)*Instrument.MasterInstrument.PointValue),2);
					xlDollarRisk = Math.Round(((intRisk)*Instrument.MasterInstrument.PointValue),2);
					xlRmultiple = xlPnL/xlDollarRisk;
					UpdateExcel();
					exitLong = null;
					exitLongStop = null;
				}
			}
			
			//Short Trades ***************************************************************************************
			
			if (enterShort != null && enterShort.Token == execution.Order.Token)
			{
				if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
					{
					}
				if (execution.Order.OrderState != OrderState.PartFilled)
					{
						myEntryBar = CurrentBar;
						myBarsSinceEntry = 1;
						PShort = true;
						intRisk = (MaxCloud[0] - execution.Order.AvgFillPrice);
						FToB = true;
						if(Close[0] > RiskS[0])
						{
							exitShort = ExitShort("B2C","S2O");
						}
						else
						{
						exitShortStop = ExitShortStop(0, true, execution.Order.Quantity, RiskS[0], "ATR-S", "S2O");
						}
						//Spreadsheet
						xlLongShort = "Short";
						xlEntryTime = execution.Order.Time;
						xlEntryQty = execution.Order.Quantity;
						xlEntryPrice = execution.Order.AvgFillPrice;
						enterShort = null;
					}
			}
			// Reset our stop order and target orders' IOrder objects after our position is closed.
			if ((exitShortStop != null && exitShortStop == execution.Order))
			{
				if (execution.Order.OrderState == OrderState.Filled && execution.Order.OrderState != OrderState.PartFilled)
				{
					PShort = false;
					//Spreadsheet
					xlExitTime =  execution.Order.Time;
					xlExitQty = execution.Order.Quantity;
					xlExitPrice = execution.Order.AvgFillPrice;
					xlPnL = Math.Round((((xlEntryPrice - xlExitPrice)*xlExitQty)*Instrument.MasterInstrument.PointValue),2);
					xlDollarRisk = Math.Round(((intRisk)*Instrument.MasterInstrument.PointValue),2);
					xlRmultiple = xlPnL/xlDollarRisk;
					UpdateExcel();
					exitShortStop = null;
				}
				if(execution.Order.OrderState == OrderState.Rejected)
				{
					exitShortStop = null;
				}
				if(execution.Order.OrderState == OrderState.Rejected)
				{
					exitShortStop = null;
				}
			}
			
			if(exitShort != null && exitShort == execution.Order)
			{
				if (execution.Order.OrderState == OrderState.Filled && execution.Order.OrderState != OrderState.PartFilled)
				{
					PShort = false;
					//Spreadsheet
					xlExitTime =  execution.Order.Time;
					xlExitQty = execution.Order.Quantity;
					xlExitPrice = execution.Order.AvgFillPrice;
					xlPnL = Math.Round((((xlEntryPrice - xlExitPrice)*xlExitQty)*Instrument.MasterInstrument.PointValue),2);
					xlDollarRisk = Math.Round(((intRisk)*Instrument.MasterInstrument.PointValue),2);
					xlRmultiple = xlPnL/xlDollarRisk;
					UpdateExcel();
					exitShort = null;
					exitShortStop = null;
					
				}
			}
			
			
		}
		
		#endregion
		
		#region SetUpSpreadsheet
		private void SetUpSpreadsheet()
		{
			OpenWorkbook(excelFile);
			excelSheet = (Excel._Worksheet)FindSheet(excelWorkBook, excelSheetName);
			if (excelSheet == null) 
			{
				Alert("openError", NinjaTrader.Cbi.Priority.High, "Error opening spreadsheet - check indicator parameters",
				"Alert1.wav", 10, Color.Black, Color.Yellow);
			}
			try
			{
				
				excelApp.Visible = true;
				excelApp.UserControl = true;
				excelOpen = true;					
			}
				catch
			{
				Alert("Exception formatting Excel", NinjaTrader.Cbi.Priority.High, "Error opening spreadsheet - check indicator parameters",
				"Alert1.wav", 10, Color.Black, Color.Yellow);
			}			

		}
		
		// Return the worksheet with the given name.
		private Excel.Worksheet FindSheet(Excel._Workbook excelWorkBook, string excelSheetName)
		{    
			foreach (Excel.Worksheet excelSheet in excelWorkBook.Sheets)    
			{        
				if (excelSheet.Name == excelSheetName) return excelSheet;   
			}    
			return null;
		}
		
		// Open the workbook
		private void OpenWorkbook(string FileName)
		{

		    try
            {
                excelApp = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
            }
            catch
            {
                excelApp = new Microsoft.Office.Interop.Excel.Application();
            }
			simpleFileName = Path.GetFileName(excelFile);
            try
            {
               excelWorkBook = excelApp.Workbooks.get_Item(simpleFileName);
            }
            catch
            {
                excelWorkBook = (Excel._Workbook) (excelApp.Workbooks.Open(excelFile,
					false, true, Type.Missing,Type.Missing, Type.Missing, Type.Missing,Type.Missing,
					Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing,Type.Missing));
            }
		}
		#endregion

    }
}
I removed my Entry Rules and exit rules, but keep the parts about sending trades to excel.. Keep in mind this is based on Iorder execution rules.

Also, I am sorry about removing a lot of the code, but I really can't share too much. However, if you are experienced in building trade systems than there is plenty information here to get you started building a log that exports to excel.

If you have any questions feel free to ask.

Cheers,

Sody

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Reply With Quote
The following user says Thank You to SodyTexas for this post:
 
  #5 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 313 since Sep 2013
Thanks: 96 given, 843 received

If there is a lot of interest in this, I can build a generic on based on MA crosses. Let me know.

Sody

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Reply With Quote
The following user says Thank You to SodyTexas for this post:
 
  #6 (permalink)
Elite Member
Germany
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: IB and zen-Fire
Favorite Futures: NQ
 
Posts: 92 since Apr 2010
Thanks: 8 given, 38 received

Cool but


Big Mike View Post
The most popular one on futures.io (formerly BMT) is this one:

https://futures.io/psychology-money-management/4884-trading-metrics-journals-record-keeping.html

Check end of thread, it's continually developed.

Mike

Hey Mike thanks

it is a great thread but way to complicated for me. I need somethig easy and stupid you knwo.

Cheers
Axel

Reply With Quote
The following user says Thank You to fossil for this post:
 
  #7 (permalink)
Elite Member
Germany
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: IB and zen-Fire
Favorite Futures: NQ
 
Posts: 92 since Apr 2010
Thanks: 8 given, 38 received

Iīll try it and let you know


SodyTexas View Post
If there is a lot of interest in this, I can build a generic on based on MA crosses. Let me know.

Sody

Thanks!

Reply With Quote
 
  #8 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 803 given, 1,367 received


SodyTexas View Post
If there is a lot of interest in this, I can build a generic on based on MA crosses. Let me know.

Sody

Great idea

Thanks

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
The following user says Thank You to DavidHP for this post:

Reply



futures io > > > > Excel Tradingjournal filled by Ninjatrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I chart the CFTC COT Excel data in NinjaTrader? JohnPS NinjaTrader 8 September 2nd, 2014 11:06 AM
Target not getting filled bougie Commodities Futures Trading 4 December 11th, 2011 09:59 AM
Get the name of the order filled? skan EasyLanguage Programming 12 September 16th, 2011 06:32 PM
Order Filled RM99 Trading Journals 7 September 4th, 2011 05:18 PM
esatinos Tradingjournal esatino Trading Journals 1 February 21st, 2011 03:38 AM


All times are GMT -4. The time now is 06:50 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-16 in 0.14 seconds with 35 queries on phoenix via your IP 54.145.16.43