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.
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:
Condition | Description |
---|---|
CHoCH or BOS | Triggered on a change of character or break of structure |
CHoCH | Triggered on a change of character |
BOS | Triggered on a break of structure |
OB Mitigated | Triggered once price mitigates an order block |
OB Within | Triggered if price is within the area of an order block |
OB Entered | Triggered once price enters the area of an order block |
OB Exited | Triggered once price exits the area of an order block |
Imbalance Entered | Triggered once price enters the area of an imbalance |
Imbalance Within | Triggered if price is within the area of an imbalance |
Imbalance Mitigated | Triggered once price mitigates an imbalance |
Imbalance Exited | Triggered once price exits an imbalance |
Liquidity Grab | Triggered once a liquidity grab is detected |
Trendline Break | Triggered once a trendline is broken. Note that a bullish trendlinereffers to an uptrending trendline, while Bearish reffers to a downtrending trendline. |
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:
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:
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.
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)
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:
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:
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.
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.
Step 1
Step 1 condition trigger, we will now evaluate step 2 from now on.
Invalidation Step
Invalidation step condition trigger, we reset the sequence and evaluate step 1 just after.
Invalidation behaviors allows adding more restrictions to a sequence of conditions, users can use two different invalidation behaviors described below:
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.
Let’s take an example where we use 3 regular steps.
Step 1
Step 1 condition trigger, we will now evaluate step 2 from now on.
Step 2
Step 2 condition trigger, we will now evaluate step 3 from now on.
Step 1 Trigger
Step 1 condition trigger, we start evaluating step 2 from now.
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.
Let’s take an example where we use 3 regular steps.
Step 1
Step 1 condition trigger, we will now evaluate step 2 from now on.
Step 2
Step 2 condition trigger, we will now evaluate step 3 from now on.
Step 1 or 2 Trigger
Step 1 or 2 conditions trigger, we start evaluating step 1 from now.
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.