Detecting NT version for new vendor API

Is there a way to determine which NinjaTrader version is running?

The context is that the new user email vendor API only works for NinjaTrader 8.1.5.0 or later. So as vendors, do we need to implement a check like this to support both?

if (NTversion < 8150) {
    VendorLicense("Vendor", "Product", "www.vendor.com", "support@vendor.com", null);
} else {
    VendorLicense(productNumber, null);
}

How are vendors supposed to support both APIs since not all customers will have the latest NT version? Assuming here that using the new API will not run or maybe even crash older versions when using the free trial.

1 Like

You should be able to use NinjaTrader.Core.Globals.ProductVersion. If that doesn’t work for some reason you can use reflection to get the assembly version of NinjaTrader.Core.dll. It should have the same version as the installed version.

1 Like

Can’t find it now, but I found the answer to this in the old forum a while back.

This is what I use to get the version which is based on what I found in that forum post.

		private string ninjaTraderVersion = Application.ResourceAssembly.FullName.Split(',')[1].Trim().Split('=')[1];
2 Likes