A Detailed Explanation of a Trading Strategy in NexusTrade
Austin Starks · Originally published
This April 2024 email summarizes how NexusTrade represents a strategy: a condition decides whether a rule is true, and an action defines the resulting trade. The full original article is linked below. Here is a current worked continuation you can inspect locally: the technical-indicator guide shows an inactive RSI rule with its entry, trade size and exit.
People might get an error in the chat and not understand how to fix it. This comes from a lack of comprehensive understanding of how NexusTrade works under the hood.
So today, I thought to explain how it all works. You can read this detailed article here if you want to know more. I'm also to send you a short summary, so stay-tuned!
Archived April 2024 offer: the email advertised a $4.99 first month of the Starter Pack with NEWUSER15 at checkout. The pricing link remains available for checking the terms offered today.
Archived April 2024 discount offerA portfolio in NexusTrade
As you probably already know, NexusTrade allows you to create portfolios of trading strategies. A portfolio contains contain positions, cash, and strategies. A strategy is a rule for entering/exiting market based on conditions.
What is a condition?
For a simple arithmetic example, suppose a selected price is $100 and its selected moving average is $105. “Price is less than moving average” is true because $100 < $105. Add a second condition, “30 days have passed since the last buy”: an And rule requires both to be true; an Or rule requires either. The action is a separate choice, such as the asset, buy or sell direction and size. This example evaluates logic; it is not an observed trade or a measured strategy.
Conditions are boolean statements. They evaluate to either "true" or "false". The simplest condition is always true or always false, but that's not very useful for trading and investing. We need a way to create increasingly complicated conditions to express any arbitrary piece of boolean logic. We can do this using a syntax tree.
If the syntax tree evaluates to true, we execute the strategy's action. Sounds complicated. Read this article for a detailed explanation.
The Simplest Condition: the BaseCondition
A BaseCondition compares two indicators using comparators. An indicator is litterally any number. It can be the number 7, SPY's price, or NVIDIA's 30 day average revenue. Comparators are inequalities, such as less than, greater than, or equal to.
Building Better Business Logic: the Compound Condition and Compound Indicator
Just like how a compound sentence combines two independent clauses, a compound condition combines two or more conditions together. They can be evaluated as “And” and “Or”. They allow us to express increasingly complicated trading rules.
We also have compound indicators, which are typically mathematical operators, which allow us to express even more logic than what should be possible for a no-code trading platform.
With everything combined, we can express even the most complicated trading ideas imaginable.
I want to learn more!
I've written an entire Medium article on this topic! This article is suitable for everybody to get a better understanding of what's going on under the hood.
To continue, inspect the current guide’s inactive draft, then ask Aurora to show the resolved condition and action before requesting a test. A generated rule and a completed test are different outputs: read the actual orders and result before deciding whether the idea meets your criteria.
Archived April 2024: NEWUSER15 offer
No comments yet.