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
For true Point and figure charting and analysis NT 7 does not work because of a issue with drawing new bars on sessions. What I did is tweak the existing PointAndFigure chart code and replaced some logic so that it will no longer plot a new bar on session breaks (Sessions still exist).
What this means; longer term PnF charts are not only possible, but with my PnF suite might just be the best PnF setup out there. I will let you make your own decision on that opinion.
After downloading the code it must be copied to folder:
\My Documents\Ninja Trader 7\bin\Custom\Type
and because it is provided as a .cs file it must be compiled (by compiling any other indicator). Once compiled Ninja Trader must be closed and reopened before the new chart type, named “SodyPointAndFigure” will replace the old PnF.
Following up my last indicator, QuantumMechanicsSMA, I wanted to show how easy it it is to change the indicator from a SMA to a CMO. This version looks at the CMO probabilities.
Here is a indicator that uses probability and hypothesis testing to define if a indicator contains predictability. For example what is the mean and probability of a SMA cross four bars after the cross?
The code is built for SMA Cross Up or Down, but with a little tweaking can be applied to any trading rules. Tell me do you know the predictability of the indicators that you use trading?
This version fixes the original problem where the chart shifts as a user tries to drag or stretch a drawing object. It also uses a different method to enable his AutoScroll feature. This version uses a Middle Button click on the price scale to enable it.
I truly cannot imagine living without this indicator.
TIP: Put this on your 'Default' template. It will appear on every new chart !
UPDATE Feb 8 2015
Previous version would shift the chart when using the Magnifying Glass.
Sorry.
This is a set of Point and Figure Indicators that I developed with the anticipation of NT8 fixes of PnF. NOTE: These are coded for NT7 and will need tweaked for NT8.
I followed Jeremy du Plessis method for Point and Figure to the best of my ability. That said, there may be errors in the logic in some situations. Use at your own risk!!
Indicator List:
PnFCongestion - Heat-map of horizontal count showing congestion points.
PnFCount - Adds box counts above or bellow the XO bar.
PnFMaxMin - Shows breakout point, the price level the next XO will be drawn.
PnFXO - Simply tells you if you are in a X or O bar
PointAndFigureCandles - Draws real-time candles around the XO's
PnFTrend - Draws the 45 Degree trend lines
PnFPoles - Shows 50% retracement used for quick exits of long XO bar.
PnFHorizontalTarget - draws the Horizontal target for VU or W patterns
PnFVerticalTarget - draws the vertical target from important highs or lows
I hope you enjoy these indicators!
Cheers,
SodyTexas
Rev 2
Added:
PnFSignalsV2 - Basic lines showing your standard PnF breakout
PnFDistribution - Know bugs on the counts, but its still shows a lot. Shows a session distribution of PnF Boxes.
Major enhancements on the Horizontal and Vertical targets. Mainly added dataseries for the nearest target and anchor points. Anchor points are the point that voids the targets if not met.
I took a few minutes to recode the version that was uploaded by Randy Terbush in 2009. This one uses a tiny fraction of the resources needed by the original. Here is a link to the original posting.
The [COLOR=#0066cc]Local Order Manager [/COLOR]has been designed to replace the internal NinjaTrader order management functions. It is based upon Unmanaged Order Management function. The goal is to create complex and flexible features that can easily be re-used, freeing the programmer of the strategy to focus upon the intended strategy and not getting bogged down with coding and debugging.
Rev 2:
Added: [FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoShortLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]double[/FONT][FONT="] m_Limit,[/FONT][FONT="]int[/FONT] [COLOR=#0066cc]Limit Order[FONT="] m_PositionNumber) - To handle true , Rather than STOPLIMIT[/FONT][/COLOR]
[FONT="]Added: [/FONT][FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoShortLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]int[/FONT][FONT="] m_LimitTicks,[/FONT][FONT="]double[/FONT][FONT="] m_RefPrice,[/FONT][FONT="]int[/FONT] [COLOR=#000080]Limit Order[FONT="] m_PositionNumber) - To handle true , Rather than STOPLIMIT[/FONT][/COLOR]
Added: [FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoLongLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]double[/FONT][FONT="] m_Limit,[/FONT][FONT="]int[/FONT][FONT="] m_PositionNumber) - To handle true Limit Order, Rather than STOPLIMIT[/FONT]
[FONT="]Added: [/FONT][FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoLongLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]int[/FONT][FONT="] m_LimitTicks,[/FONT][FONT="]double[/FONT][FONT="] m_RefPrice,[/FONT][FONT="]int[/FONT][FONT="] m_PositionNumber) - To handle true Limit Order, Rather than STOPLIMIT[/FONT]
Rev 3:
Added: [FONT="]public [/FONT][FONT="]void[/FONT][FONT="] SetStatsBoxVisable([/FONT][FONT="]bool[/FONT][FONT="] m_Stats)[/FONT]
Added: [FONT="]GoShortStopLimit() Functions, depreciated functions that are misleading[/FONT]
Added: [FONT="]GoLongStopLimit() Functions, depreciated functions that are misleading[/FONT]
Rev 4: 4/1/2012
Added: Various Trailing Stop fixes
Fix: [FONT="]PartialFills improvements[/FONT]
Experimental: Timer functions for future features
Rev 5: 4/15/2012
Fix: [FONT="]Major Stability Improvements, Partial Fills almost flawless[/FONT]
Experimental: Timer functions for future features improved
Rev 6: 7/25/2012 (Beta Release)
Fix: Major Stability Improvements, Partial Fills almost flawless
Fix: Timer functions for Good Until, detects fast replay and autodisables
Added: Good Until by Time & #Bars
Added: Trailing Stop DataSeries Driven
Added: GoLimitBracket
Added: GetFillQuantity
Added: Rejected Order handling (started)
Improved: Entry/exit functions added object to contain rules/handling
Experimental: Timer functions for future features improved
Added: Version ID Current LOM:02b.01b.01a.01.01b.02.01.01a.01.0.0.2
Rev 7: 9/26/2013 (Beta Release)
Update done by contributor, not fully integrated but available. Fix: Fixed a bug in dataseries based SetTrailingStop() in which the the wrong variable is used for calculating the tick offset. Changed: Changed the behavior of the dataseries based SetTrailingStop() such that it will remain triggered after the price has moved beyond the trail trigger ticks and retrace back. The previous implementation is such that the trailing stop will be active only when the price remains beyond the trail trigger ticks. Improved: Commented out the warning logs for non-value dataseries of the indicator based Trailing Stop. It is not necessary for trailing stop indicator to return a value for every bar. For example, a price action swing trailing stop indicator returns an update of a stop loss value after it makes a swing. Furthermore, it is more efficient to update the stop loss value as and when it is required.
Rev 8: 11/24/2014
Update done by contributor, not fully integrated but available. General: Rolled up many improvements into the latest build Added: Added new user contribution "SetStatsBoxVisable(bool m_Stats, string m_DebugString)" to enable and disable Stats box with Debugging String
Added: Version ID Current LOM:02b.01b.01b.01.01b.02a.01.01b.01.0.0.2
July 3rd, 2018 09:13 PM Tangotx Does anyone know if this indicator (or equivalent) is available for NT8? Thanks!
November 14th, 2016 11:01 AM clepal Thank you for this....
April 25th, 2015 05:06 AM Broman Smart indicators from a smart dude. Awesome!
February 23rd, 2015 10:57 AM SodyTexas https://nexusfi.com/elite-circle/34569-working-point-figure-indicator-suite-12.html#post475745
There is a thread
February 16th, 2015 12:32 PM JohnSprowl Agree wholeheartedly with last writer; some discussion of intended use for each of these really good tools might be a ve
ry good thing to have; a reference guide or something like. Really like what you have done. I am just uncertain how be
st to to put them or at least some of them to best use.