Using Quagensia Expression Functions

In the Quagensia® Desktop Application’s terminology, an expression is something that calculates a value or holds data, such as a calculation that returns a numeric value, a set of conditions that evaluates to true or false, a date, a piece of text, a color, or a list or array of 100 numbers.

A Quagensia Expression Function is a Quagensia Function that returns an expression. Since a Quagensia Expression Function is an expression itself, it can be used in the same locations that other expressions can be used.

Every edition of Quagensia comes with many Quagensia Expression Functions in the “Algos from Quagensia” folder of the Algo Explorer.

You can also create your own Quagensia Expression Functions or acquire them from a highly trusted source such as a co-worker and place them in your “My Algos” folder or a subfolder of the “My Algos” folder, then access them by clicking on a location where the Quagensia Expression Function is allowed. This allows you to greatly extend the capabilities of your installation of Quagensia with proprietary expressions that simply cannot be created with the expression functions that come with your installation of your edition of Quagensia and also allows you to create a single function that contains a complex set of multiple calculations that returns a single expression that you find yourself having to build from scratch frequently and prefer to add with a single expression instead of having to constantly copy and paste the complex calculations between algos and then update all places you have copied and pasted the multiple complex calculations whenever you decide on an improvement to the complex calculations.

Using a Quagensia Expression Function is no different than using a Quagensia expression that does not come from a Quagensia Expression Function, such as the expression that holds a decimal number that can be changed by changing the number in a text box, the expression that holds a color that can be changed with a color chooser window, or the expression that allows you do arithmetic on numerical expressions. You can add a Quagensia Expression Function to your Quagensia Strategy or Quagensia Function by clicking anywhere on the algo’s workspace where the specific Quagensia Expression Function is allowed, and then clicking the context menu item that adds the specific Quagensia Expression Function to your algo’s trading logic.

You can create Quagensia Expression Functions that perform actions and can be used in locations where either expressions or actions are expected. (Recommended for advanced users only)

Advanced users may occasionally want to create a Quagensia Expression Function, i.e. a function that returns an expression, and check the check box in the “Function Summary” section labeled “Can Be Used As An Action (Return Value Will Be Ignored When Used As An Action)” so that the Quagensia Function can be used both in a location where an expression is expected as well as in a location where an action is expected.

Quagensia Functions that do an action but can be used as an expression can be dangerous, because not all users will understand that something that they can place in a location where an expression is expected may also do something more than merely calculating a value or evaluating an expression like submit an order. For instance, if you create a Quagensia Function that submits an order and then returns a Boolean (true or false) value that indicates if the order was submitted successfully and share this function with another user who thinks that the only way that an order could be submitted is by placing an action in a location in “When Bar Updates” where calls to order submission functions are usually placed, they may use the function in a location thinking that it will merely do a calculation and return an expression instead of submitting an order.

For your safety and for the safety of all users of any Quagensia Function that can be used as either an expression or an action, users who click on a location that expects an expression will not see Quagensia Functions that are also marked as “Can Be Used As An Action (Return Value Will Be Ignored When Used As An Action)” in the location in the context menu that corresponds to the subfolder in the “My Algos” in which the function file was placed. Instead, the function will appear under the context menu item “Replace/Set Item >> More Expressions >> Actions That Return Values” to remind the user that all the expressions that they can add from that context menu folder may do actual work, such as submitting an order.

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.