The Elite Circle - MySQL & Ninjatrader Total PNL
futures io


Categories Help    

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


Entries
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


Category The Elite Circle 
 
Suggest other entries I might like
Details: MySQL & Ninjatrader Total PNL
Category: The Elite Circle 


March 24th, 2015
Size: 6.22 KB
Downloaded: 210 times
 


 
Category
 



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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.