Two random groups for the StrategyQuant X AlgoWizard and Builder: 4 long and 4 mirrored short trend conditions (close above or below an EMA, EMA and HMA rising or falling, DI+ above or below DI-), with random periods. Bind a random condition placeholder of a template to a group, and the Builder draws only from these trend filters.
Trend Filters Random Groups
Two random groups for the StrategyQuant X AlgoWizard and Builder: 4 long and 4 mirrored short trend conditions (close above or below an EMA, EMA and HMA rising or falling, DI+ above or below DI-), with random periods. Bind a random condition placeholder of a template to a group, and the Builder draws only from these trend filters.
Included groups and conditions
Group | Condition | Block
Trend Filters Long | Close above EMA | MABarClosesAbove
Trend Filters Long | EMA rising | MARising
Trend Filters Long | HMA rising | HMARising
Trend Filters Long | DI+ above DI- | DIPlusHigher
Trend Filters Short | Close below EMA | MABarClosesBelow
Trend Filters Short | EMA falling | MAFalling
Trend Filters Short | HMA falling | HMAFalling
Trend Filters Short | DI+ below DI- | DIPlusLower
How to use
1. Install the package (Marketplace in StrategyQuant X); the XML and a README land in extend/Sources.
2. AlgoWizard > Customize > Random block groups: import the XML.
3. In your template, open a RandomCondition placeholder and select "Trend Filters Long" in its Random group field; for the short side select "Trend Filters Short" or add a NegatedCondition placeholder.
Tested
Tested in StrategyQuant X 145.3205: the groups import correctly.
Requirements
StrategyQuant X 145.3205 or newer.
Important notes
• Periods are random: EMA and HMA 20 to 200 in steps of 10, DI 7 to 50. The moving-average method (EMA), the price (close), the chart and the shift (1) are fixed. Edit the group in AlgoWizard to change the ranges.
• A random placeholder draws one condition from its group. To trade both directions, either bind the short placeholder to "Trend Filters Short" or add a NegatedCondition placeholder next to the long one; the second way mirrors the drawn long condition exactly, the first way draws the short condition independently.
• When you bind a group in a template, StrategyQuant X stores a copy of the group in that template; the Builder reads the group from the template, not from your group file.
• The XML is imported through AlgoWizard; a group with the same id or name may be replaced or duplicated, check the Random block groups list after the import.
• These are building blocks for templates, not strategies.
Free1 download
Files
RandomGroups-TrendFilters.sqm2 KBLocked
Download unlocks after purchase or with an active tier.