Skip to content

How To Use an Indicator's Past Value in a Condition

QuantMage offers a variety of momentum indicators for flexible strategies. While comparing current prices or exponential moving averages (EMAs) to simple moving averages is common, what if you want to gauge how an EMA itself has evolved over time? QuantMage now allows you to do just that, further enhancing its expressiveness.

To utilize this functionality, hover over an indicator in a condition. A tooltip will appear, allowing you to specify how many days ago you want to reference:

Right-click to open a popup where you can set the desired number of days ago:

Practical Example

For example, you can now compare SPY’s current 200-day EMA against its EMA from 25 days ago and either enter SPY or escape to cash accordingly: It shows a better risk-adjusted return in comparison to the benchmark, SPY buy-and-hold. Dive into the spell yourself here. As always, remember this is for informational purposes and not investment advice.

QuantMage empowers you to craft sophisticated investment strategies with ease. Happy investing!