Documentation

Applications

Last updated on 16. 4. 2020 by Mark Fric

Strategy templates

One of the main advantages of StrategQuant X is ability to generate strategies with your own custom “format”.

StrategyQuant generates strategies using strategy templates – they are strategies that use special placeholder blocks in certain parts (we call these Random placeholders) and StrategyQuant then randomly generates blocks that fill these placeholders.

 

Strategy templates and placeholders

Look at the screenshot below, it shows a Signal rule of a standard SQ X strategy template:

SQ Strategy Template example

You can see that signals for log & short entry & exit are not defined in the strategy yet – this is because they will be generated randomly by StrategyQuant.

Instead, there are random placeholders:

  • RandomCondition(RandomConditionLong) – this means that SQ will generate random condition(s) in this place. Each random condition has a unique identification, for example RandomConditionLong.
  • NegatedCondition(RandomConditionLong) – is a special placeholder that tells SQ X to negate whatever condition it generated for the random condition named RandomConditionLong and put it here.
    So as a result there will be a randomly generated condition for the Long entry signal, and matching negated condition for Short entry signal – and the same for exit signals.

For example, after the generation it will look like this:

SIGNAL – LongEntrySignal:

CCI(14)[1] > 0 and RSI(20)[1] > 50

SIGNAL – ShortEntrySignal:

CCI(14)[1] < 0 and RSI(20)[1] < 50

 

Note that conditions for Short entry have opposite comparison operators – < (Is Lower) instead of > (Is Greater), which means they are negations of the Long conditions.

 

How exactly are the conditions for RandomCondition placeholder generated?

By default they are generated from the selection of building blocks you have in your Full settings -> Building blocks:

SQ Building blocks settings

StrategyQuant X will use your selection of building blocks and other configuration settings (how many conditions it should generate, the Period and Shift ranges, etc.) to generate the conditions it will put in place of RandomCondition.

 

To learn more about strategy template check the following articles on our blog:

 

 

 

Was this article helpful? The article was useful The article was not useful

Subscribe
Notify of
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
tmantrader
23. 1. 2022 7:26 pm

Question: if the condition is CCI(14)[1] > 0 AND RSI(20)[1] > 50 , why isn’t the negation of the condition CCI(14)[1] <= 0 OR RSI(20)[1] <= 50 ?

tomas262
Admin
Reply to  tmantrader
25. 1. 2022 5:03 pm

Hi, that is correct short negation in case of RSI / CCI. Let us know if any questions

Emmanuel
14. 4. 2022 9:47 am

excellent !!!