A collection of NinjaTrader 8 scripts, coding examples and practical guides by Edge. Each script has its own guide explaining what it does, how to use it, and its limitations.
Tools to keep on your charts or in your Market Analyzer.
| Script | Kind | Purpose | Code | Guide |
|---|---|---|---|---|
| HTPLwBLTimer | Indicator | Show a price line, bar countdown and data-timestamp lag on a chart. | Code | Guide |
| HTFFNews | Indicator | Filter a weekly news calendar and show event lines and labels on a chart. | Code | Guide |
| HTOBSRecordingExample | Indicator | Resume OBS for the selected instrument across accounts; pause after all matching positions are flat. Needs HTOBSMisc. | Code | Guide |
| HTOBSMisc | Add-on | Required OBS helper for HTOBSRecordingExample. | Code | Guide |
| HTLagMA | Market Analyzer column | Show how late each instrument's market data is, and count up when it stops. | Code | Guide |
| HTNCMA | Market Analyzer column | Show percent and point change from the prior close, with settable colors for dark or light grids. | Code | Guide |
| HTColorNamesPrototype | Add-on | Pick colors by name under each color setting in the newer NinjaTrader color palette. | Code | Guide |
Small scripts that show how to do one thing in NinjaScript, to read and copy into your own code.
| Script | Kind | Purpose | Code | Guide |
|---|---|---|---|---|
| HTPriceMarkerExample | Indicator | Draw custom price markers on the chart's right-hand price scale. | Code | Guide |
| HTTextBoxBindDemo | Indicator | Connect an editable chart text box to an indicator property. | Code | Guide |
| HTRenderTextExample | Indicator | Draw a line and compare two ways of rendering text on a chart. | Code | Guide |
Sample strategies that read every value an HT product exposes, so you can use those values in your own strategies. They place no orders. Each one needs its HT product installed; without it, the file stops every NinjaScript from compiling, so remove the sample if you remove the product.
| Script | Kind | Purpose | Code | Guide |
|---|---|---|---|---|
| HTPriceTimesPlusReadValues | Strategy | Read and print every level Price Times Plus exposes. | Code | Guide |
| HTVPSessionsReadValues | Strategy | Read and print every level VP Sessions exposes. | Code | Guide |
| HTVwapPlusReadValues | Strategy | Read and print every level VWAP Plus exposes. | Code | Guide |
| HTSupplyDemandMTFReadValues | Strategy | Read and print the newest supply and demand zones Supply Demand MTF exposes. | Code | Guide |
| HTTrendsMTFReadValues | Strategy | Read and print the swings and nearest trend lines Trends MTF exposes. | Code | Guide |
| HTSwingsMTFReadValues | Strategy | Read and print the newest swing high and low Swings MTF exposes. | Code | Guide |
| HTVPOrderFlowReadValues | Strategy | Read and print the POC, VWAP, value area and midpoint VP Order Flow exposes for every bar. | Code | Guide |
| HTCumDeltaReadValues | Strategy | Read and print the delta, volume, buys, sells and running totals Cumulative Delta exposes for every bar. | Code | Guide |
| Guide | Purpose |
|---|---|
| Clock synchronization | Check Windows time settings before interpreting timestamp-lag readings. |
Files are grouped by NinjaTrader category: Indicators, Strategies,
MarketAnalyzerColumns, and AddOns. Each script's guide and pictures sit
beside it and share its name, so they sort together.
Scripts that need one of the HT products from htech.net
sit in an HTProducts folder inside their category, such as
Strategies/HTProducts.
-
Open NinjaTrader and its NinjaScript Editor.
-
Copy the script's
.csfile into the matching folder underDocuments\NinjaTrader 8\bin\Custom, using NinjaTrader's Documents location:Script category Destination under Custom Indicator IndicatorsStrategy StrategiesMarket Analyzer column MarketAnalyzerColumnsAdd-on/helper AddOns -
With the editor open, NinjaTrader compiles the new file on its own. If nothing happens, press F5 in the editor.
Copy the .cs file only, not its guide, pictures or the collection folder.
Follow its guide for setup.
Start with a script's guide for installation, usage, and the forum post it came from, where there is one. Code comments explain the implementation.
By Edge358 · htech.net · YouTube · This collection
Free for personal use. Do not resell or republish without credit.