Backtester (PAC) allows users to set their own long/short entry rules from price action related concepts as well as external indicators. Entry rules can be built as sequences of conditions, matching conditions, or a mix of both. More details are provided in the section below.

Entry rules can be created separately for both long and short entries, and can be set using up to 6 different user set conditions. Each can enabled by toggling them on using the toggle input on the left of each condition, if the enabled conditions are valid, the strategy will open a corresponding market order.

Three types of distinct conditions are available, each described in the sections below.

Price Action Conditions

Conditions 1, 2, and 3 work the same way, and allow using conditions from market structures, volumetric order blocks, imbalances, and liquidity grabs.

The first dropdown includes options: Bullish and Bearish, and determines the origin of the selected condition in the second dropdown.

The second dropdown includes the list of price action related conditions, these include:

ConditionDescription
CHoCH or BOSTriggered on a change of character or break of structure
CHoCHTriggered on a change of character
BOSTriggered on a break of structure
Mitigated OBTriggered once price mitigates an order block
Within OBTriggered if price is within the area of an order block
Entered OBTriggered once price enters the area of an order block
Exit OBTriggered once price exits the area of an order block
Entered ImbalanceTriggered once price enters the area of an imbalance
Within ImbalanceTriggered if price is within the area of an imbalance
Mitigated ImbalanceTriggered once price mitigates an imbalance
Exit ImbalanceTriggered once price exits an imbalance
Liquidity GrabTriggered once a liquidity grab is detected

For example if the user wants to go Long when a new Bullish CHoCH the following settings would be used:

User can change the settings of each price action concept by scrolling down the settings, each concept has its own setting group. To learn more about each concept see:

Market Structures

Order Blocks

Imbalances

Liquidity Grabs

External Conditions

Users can use the output of external indicators on the chart as input to set entry conditions.

The second dropdown of external condition settings determines which conditional operator to use on both external outputs. These include:

  • Greater Than
  • Lower Than
  • Equal
  • Crossing Over
  • Crossing Under
  • Crossing

The third external condition works similarly but instead of comparing two external outputs the condition will compare an external output specified in the condition first dropdown with a user set value in the third dropdown using a conditional operator set on the second dropdown. This last condition is particularly useful for oscillators.

Here is an example of the third external condition being set for price crossing over a simple moving average.

Session Condition

Condition 6 is a session condition, with an active status if current time is within the specified session interval.

Session timezone is the same as the one of the chart symbol exchange (UTC for cryptocurrencies)

Using Conditions Together

More complex entry rules can be created by using multiple conditions together, this is done thanks to the Step dropdown setting on the right of each condition (below each condition for conditions 4 and 5).

The Step setting is directly related to the Step & Match algorithm and work in two ways:

  • When two or more conditions have the same step number, both conditions are evaluated. Used to test matching conditions.
  • When two or more conditions have different step numbers, each conditions will be evaluated in order, testing for the first step and switching to the next step once the previous one is true. When the final step is true the strategy will open a market order. Used to create sequence of conditions.

This operation is complementary, as you can create a sequence of conditions with one step consisting of two or more matching conditions as long as they have the same step number.

A user wanting to go long when a bullish break of structure occurs after price mitigated a bearish order block while price was above its 20 period moving average could do it as follows:

Invalidate Step

The “Invalidate” step allows to set a condition as an “invalidation condition”. When this condition is triggered while a sequence of conditions is incomplete, the sequence will restart at step 1.

If multiple steps are set as “Invalidate” any of the conditions being true will reset the sequence of conditions, as such not all of them are required to be true for the sequence of conditions to reset.

Example

Let’s take an example where we use 2 regular steps and one “Invalidate” step. The position will be opened when step 2 trigger after step 1 has been triggered.

1

Step 1

Step 1 condition trigger, we will now evaluate step 2 from now on.

2

Invalidation Step

Invalidation step condition trigger, we reset the sequence and evaluate step 1 just after.

Invalidation Behaviors

Invalidation behaviors allows adding more restrictions to a sequence of conditions, users can use two different invalidation behaviors described below:

Invalidate On Step 1

The “Invalidate On Step 1” behavior allows to reset an incomplete sequence of conditions when the condition on step 1 trigger. This prevents the first step condition from happening in between other steps of the condition sequence.

This behavior is useful when the first step of our sequence of conditions needs to never be repeated during the sequence.

Example

Let’s take an example where we use 3 regular steps.

1

Step 1

Step 1 condition trigger, we will now evaluate step 2 from now on.

2

Step 2

Step 2 condition trigger, we will now evaluate step 3 from now on.

3

Step 1 Trigger

Step 1 condition trigger, we start evaluating step 2 from now.

Invalidate On Any Repeated Step

The “Invalidate On Any Repeated Step” behavior allows to reset an incomplete sequence of conditions when a step is triggered such that it does not respect the set order of conditions.

This behavior is useful when we want a perfectly ordered sequence of conditions to complete, without any step repeating itself.

Example

Let’s take an example where we use 3 regular steps.

1

Step 1

Step 1 condition trigger, we will now evaluate step 2 from now on.

2

Step 2

Step 2 condition trigger, we will now evaluate step 3 from now on.

3

Step 1 or 2 Trigger

Step 1 or 2 conditions trigger, we start evaluating step 1 from now.

No Existing Positions Requirement

Users can enable the Don’t Allow Trades Until Closed setting in order to only open trade when no existing positions are open. This setting allows waiting for a position to be closed before one can be opened.

Enabling Don’t Allow Trades Until Closed for long positions will prevent opening shorts as long as a long position is opened.

If this same setting is not enabled for short conditions then shorts can effectively be closed by new long positions.