The Old, Out-Of-Date Way of Getting Custom NinjaTrader® Indicators Into Quagensia N Edition that Still Has Some Relevance for Getting Custom TradeStation® EasyLanguage® Functions that Return Indicator Values Into Quagensia T Edition

Warning: The procedure below is the old, out-of date way of getting custom NinjaTrader® Indicators Into Quagensia N Edition.

It still has some relevance for getting custom TradeStation® EasyLanguage® functions that return indicator values into Quagensia T Edition, but all Quagensia N Edition users should now use the new automatic process for getting NinjaTrader indicators imported into Quagensia N Edition all at once in a batch process, which you can learn how to do by watching the video on the following help page:

How to Import (or Re-Import) Your Third-Party NinjaTrader® Indicators Into Quagensia N Edition By Applying a No-Code Strategy to a Chart in NinjaTrader®

If a custom NinjaTrader® indicator works correctly in the NinjaTrader® Strategy Builder (which is built into NinjaTrader®) and in strategies built with the NinjaTrader® Strategy Builder, then you should be able to get it into Quagensia N Edition and use it without code.

You should be able to get a custom NinjaTrader® indicator into Quagensia® N Edition and use it without code so long as you can plot it and use its values to make buy and sell decisions from a NinjaTrader® strategy you created in the NinjaTrader® Strategy Builder (which is built into NinjaTrader®).

To be able to use a custom NinjaTrader® indicator inside of Quagensia N Edition, it must pass the following three tests:

  1. You can see the indicator in the NinjaTrader® Strategy Builder, you can choose to plot it in a strategy, and can use its values to make buy & sell decisions in the strategy whose code it generated.
  2. The NinjaTrader® strategy that the NinjaTrader® Strategy Builder generates actually compiles. Note that just because the NinjaTrader® Strategy Builder lets you use an indicator to build a strategy doesn’t mean that the NinjaTrader® strategy it generates will compile.
  3. When you run a backtest of the NinjaTrader® strategy that the NinjaTrader® Strategy Builder generates, no runtime errors occur, you can see the indicator on the chart, and using the values of the indicator’s single-plot or multi-plot outputs to make buy & sell decisions actually works.

If your indicator passes the three tests above, you should be able to get your custom NinjaTrader® indicator into Quagensia N Edition and use it without code by following the instructions below.

How to Get Your Custom NinjaTrader® Indicator into Quagensia N Edition and Use it Without Code

The instructions below are long because they are detailed. But the process should take you no more than 15 minutes the second time you do it for a custom indicator and it literally requires no code.

Quagensia® N Edition has over 100 NinjaTrader® indicators built in. But if you cannot find a particular indicator or want to add a custom indicator to Quagensia N Edition, you can do it the easy way by copying one of the over 100 built-in Quagensia N Edition Functions that are based on the indicators built into NinjaTrader® and making small changes to match your indicator’s name, input parameters, and other attributes. No programming knowledge is needed to do this.

To do this without having to build a Quagensia N Edition Function from scratch, first find an indicator in Quagensia N Edition that is similar to your custom indicator by expanding the folders in the “Algo Explorer” on the left side of the application’s main window to “Algos from Quagensia > Functions > Expressions > Indicators”. In this folder you will find over 100 built-in Quagensia N Edition functions based on NinjaTrader® indicators organized into subfolders such as “Moving Averages”, “Oscillators”, etc.

If your custom indicator is a moving average, open the “Moving Averages” subfolder, click on the built-in NinjaTrader® moving average that is similar to your custom indicator, and in the context menu that appears select “Create New Function from Copy of This Function”.

If you don’t know which indicator in Quagensia N Edition is similar to your custom indicator, we suggest copying one of the following two indicators:

  1. If your custom indicator has only one plot, as is the case with most moving average indicators, copy the “Moving Average – Simple (SMA)” indicator from the “Moving Averages” subfolder of the “Indicators” folder.
  2. If your custom indicator has multiple plots, as is the case with the “Bollinger Bands®” indicator, copy the “Bollinger Bands®” indicator from the “Bands, Envelopes, Channels” subfolder of the “Indicators” folder.

Then, change the following things in the “Function Summary” section at the top of the workspace:

  1. Change the “Indicator Name in Code” field to the name of your indicator in code. For instance, this is “SMA” for the built-in Simple Moving Average indicator in NinjaTrader® because in the Simple Moving Average indicator’s code file, named “@SMA”, there is a line near the top of the file that says “public class SMA : Indicator”. Search for “public class” in your custom indicator file and it should be the word after “public class ” and before “ : Indicator”. This field is case-sensitive.
  2. Change the “Function Name” to whatever you want its display name to be in Quagensia N Edition, like “My Custom Moving Average Indicator”.

Then, scroll down to the “Input Parameters” section and change the input parameters to match your input parameters.

For instance, if you copied the “Moving Average – Simple (SMA)” indicator from the Quagensia N Edition built-in indicator functions, you will see that its first input parameter is a “Read-Only Time Series” of Decimal Numbers named “Input”. This very rarely needs to be changed and should almost always be the first input parameter in the “Input Parameters” section.

The second input parameter of the “Moving Average – Simple (SMA)” indicator is a Whole Number named “Period”. Change this to be your indicator’s first input parameter that isn’t the “Input” input parameter described above. Give it a default value like 14, and if this input parameter cannot be lower or higher than a certain number, fill in the input parameter’s “Minimum Value” and/or “Maximum Value” fields. Set the “Name” field to any name you want. For instance, even if the name of the input parameter in the code is “period”, this field can be set to “Number of Bars Back” if this looks better or is easier for you to remember.

Then add input parameters from the “Add Parameter” section to match the order of the input parameters in the indicator’s code and their data types, for instance “Whole Number” or “Decimal Number”.

To find the order of your custom indicator’s input parameters in its code, search for “public partial class Indicator :” in its code, then scroll down to the lines of code that look like “public <YourIndicatorNameInCode> <YourIndicatorNameInCode>”, where “<YourIndicatorNameInCode>” is the name of your custom indicator in code. There will likely be more than one of these. Use the one that has the largest number of input parameters after it. For instance, in the built-in Simple Moving Average indicator in NinjaTrader® described above, whose name in code is “SMA”, there are multiple lines of code that start with “public SMA SMA”, namely “public SMA SMA(int period)” and “public SMA SMA(ISeries<double> input, int period)”, so if this were your custom indicator, you would use the order of the input parameters in the longest of the two lines of code above to determine the order of your custom indicator’s input parameters, which would be the line of code “public SMA SMA(ISeries<double> input, int period)”, which shows that the first input parameter is the “Input” one that rarely needs to change as described above and a parameter named “period” is the second input parameter.

Determining what to select in the “Type” drop-down list of each input parameter in Quagensia N Edition is easy. Look at the line of code in your custom indicator that is described directly above (In our example it was “public SMA SMA(ISeries<double> input, int period)”) and use the rules described below to select the correct value in the “Type” drop-down list:

  1. Select “Whole Number” if the input parameter’s data type is “int” as it is for the “int period” input parameter in the line of code in the example above.
  2. Select “Decimal Number” if the input parameter’s data type in the code is “double”.
  3. Select “Boolean (True or False)” if the data type is “bool”.
  4. Select “Text” if the data type is “string”.
  5. If the data type in code is “DateTime” choose one of Quagensia N Edition’s Date and Time data types under “Advanced Data Types” > “Dates and Times” such as “Date (Without Time of Day)”, “Time of Day”, or “Date and Time”, depending on if the “DateTime” input parameter is meant to represent a date without a time component, a time of day without a date component, or an exact date and time.
  6. If the data type is “Color”, select “Color” under “Advanced Data Types”.
  7. If the data type is “long” or “Int64”, select “Whole Number (Huge)” under “Advanced Data Types > Advanced Numeric Types”.
  8. Quagensia N Edition supports many more data types than those mentioned above, but they are used relatively rarely in indicators. This includes highly advanced numeric data types, as well as many “List of Choices” data types that appear as drop-down lists in the NinjaTrader® user interface.
  9. If the data type is a custom “enumerated constant” that is not one of the large number of “List of Choices” data types in Quagensia, please follow the instructions at How to Get Your Custom NinjaTrader® Indicator into Quagensia N Edition and Use it Without Code if its Custom Input Parameter List in the Indicator Code Output is Different from the Input Parameter List of its Quagensia N Edition Function.

If your custom indicator has multiple plots like the “Bollinger Bands®” indicator, then in the “Bands, Envelopes, Channels” subfolder of the “Indicators” folder, you could copy the “Bollinger Bands®” indicator from this folder and follow the steps above (for the case of a moving average). Then set up your indicator’s plots in the “Internal Variables” section in the same way it appears in the “Bollinger Bands®” indicator. Namely, your Quagensia N Edition Function will need one internal variable of type “Read-Only Time Series” for each of the plots. The “Data Type of Individual Time Series Items” should be “Decimal Number”. The “Name” field can be anything you want, but the “Indicator Plot Name In Code” must be the name of the plot as it is in the indicator’s code and is case-sensitive.

Then, save your custom indicator to your “My Algos” folder or a subfolder of this folder and that’s it. 

To use your custom indicator in a Quagensia N Edition Strategy, click on a location on your Quagensia Strategy’s algo workspace where indicators are allowed and add your custom indicator to that location from the context menu that appears. Your custom indicator will be in the context menu subfolder “Replace Item > My Algos”. Select it and it will be added to your workspace.

That’s it!

Once you get your custom NinjaTrader® indicator into Quagensia N Edition as just described, you can use it in all of the powerful ways that you can use the over 100 built-in indicators, including using it with all of the advanced features mentioned in the Quagensia N Edition feature list and in advanced Quagensia N Edition Strategies such as those built into Quagensia N Edition and described in the video The Advanced Point-&-Click Strategies for NinjaTrader® Built into Quagensia N Edition.

Bonus tip: You can even build and plot a custom editable time series (which is similar to an indicator) from scratch from within a Quagensia N Edition strategy as was done in the 1-minute 2-second Fibonacci-Weighted Moving Averages (Uses 1-Dimensional Array and Editable Time Series) portion of the larger video called The Advanced Point-&-Click Strategies for NinjaTrader® Built into Quagensia N Edition and is demonstrated in the Quagensia N Edition Strategies on Quagensia N Edition’s Building an Indicator From Scratch in a Strategy category page.

Submit your high-quality Quagensia tutorials for consideration for free inclusion on our website.

If you publish high-quality Quagensia tutorials on a social media platform like YouTube, please consider submitting them to us. We may promote them for free by linking to them from relevant pages on our website.

To submit your Quagensia tutorials for consideration for free inclusion on our website, use the How to Submit Your Quagensia-Enhanced Content page. We are available by phone or email to help you create, publish, and promote Quagensia-enhanced content. You can also get questions answered in our Content Creator Support Center and in the official Quagensia® Discord community’s content-creators channel.

Thanks for Sharing!

Ready to get started?

Download the Quagensia no-code strategy builder free trial and build your trading strategies now.

Under a dollar a day.

Priced to be an easy decision for most traders.

Join Us on Discord

Build point-&-click strategies for NinjaTrader® and TradeStation® using Quagensia®. Collaborate with other traders to get and give help, build and backtest strategies together, and grow your skills.

Subscribe to our Newsletter

We'll send you product updates and company news from Quagensia as well as curated lists of Quagensia-enhanced content.

Welcome
Content Creators

Quagensia enables content creators to make interactive content. We invite you to create Quagensia-enhanced content and share it on YouTube and other social media channels. You may submit your high-quality Quagensia-enhanced content for consideration for free inclusion on our website.

Screenshots

For larger and additional screenshots, see large Quagensia N Edition screenshots (for NinjaTrader®) and large Quagensia T Edition screenshots (for TradeStation®).

For additional screenshots, see the list of Strategies Built into Quagensia N Edition (for NinjaTrader®) and Strategies Built into Quagensia T Edition (for TradeStation®). Select a built-in strategy that interests you and scroll down for the screenshot. Then scroll up to the top of the page and click the “Overview” link to watch the video on how to use that built-in strategy.

This is a screenshot of the point-and-click trading strategy you will build in Quagensia N Edition (for NinjaTrader®) if you follow along with the video titled Create NinjaTrader® Strategies Using Point-&-Click with Quagensia N Edition – Full Tutorial.

This is a screenshot of the point-and-click trading strategy you will build in Quagensia N Edition (for NinjaTrader®) if you follow along with the video titled "Introduction to Quagensia N Edition".

Click the gear icon that appears when you place your mouse pointer over the location to which you would like to add trading logic. A context menu will appear with filtered options to choose from.

Click the gear icon that appears when you place your mouse pointer over the location to which you would like to add trading logic. A context menu will appear with filtered options to choose from.

Thanks for Sharing!

Ready to get started?

Download the Quagensia no-code strategy builder free trial and build your trading strategies now.

Under a dollar a day.

Priced to be an easy decision for most traders.

Join Us on Discord

Build point-&-click strategies for NinjaTrader® and TradeStation® using Quagensia®. Collaborate with other traders to get and give help, build and backtest strategies together, and grow your skills.

Subscribe to our Newsletter

We'll send you product updates and company news from Quagensia as well as curated lists of Quagensia-enhanced content.

Welcome
Content Creators

Quagensia enables content creators to make interactive content. We invite you to create Quagensia-enhanced content and share it on YouTube and other social media channels. You may submit your high-quality Quagensia-enhanced content for consideration for free inclusion on our website.