> For the complete documentation index, see [llms.txt](https://help.hydravision.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.hydravision.ai/ea-configuration/ea-settings/pcl/pcl-injection-functions.md).

# PCL Injection Functions

Profit Closes Loss, one of the most important sections of configuration in the EA.

{% hint style="info" %}
We strongly recommend watching our videos on PCL in order to fully understand how these engines work in relation to the selected PCL strategy. Using these without complete understanding can result in confusion and incorrect configuration.
{% endhint %}

[Injection orders](/concepts/concepts/injection-positions.md) are opened as an external function to SmartEntry, and require a TRUE condition to exist. There are various types of Injection positions with each one serving its own purpose.

{% hint style="danger" %}
Injection orders add volume to a grid and can increase risk if not used correctly. Please test thoroughly and understand before using on a live account.
{% endhint %}

{% hint style="info" %}
Inject on Grid Close, New Position on PCL Close and Backfill are licence features. If your setfile turns one on and your licence does not include it, the EA does not accept the configuration: it enters a graceful stop with a message listing the features your licence does not include (in the Strategy Tester the EA is removed from the chart).
{% endhint %}

{% hint style="info" %}
During a graceful stop, Inject on Grid Close and New Position on PCL Close do not open positions, because they add new exposure instead of completing the grid. Ordinary grid positions and Backfill still run so open grids can complete.
{% endhint %}

#### Injection order

{% hint style="info" %}
An Injection order is placed AFTER the grid closes and is dynamically sized at that price point as though the Anchor position was still open. The intention of an Injection order is to artificially create a Hunter position if PCL was unable to do so organically.
{% endhint %}

<details>

<summary>Inject on Grid Close</summary>

`Boolean`

Default: false

Only available with the Hunter PCL strategy (the setting is hidden for the other strategies)

</details>

<details>

<summary>Max Vol factor (of start) for PCL Injection</summary>

`Double`

Default: 5

Only place the Injection position if the volume will be equal to or less than this value x Starting Volume.

Do not make this multiplier too large. If the injection order does not go into a trailing stop loss, the grid will continue to extend from this point which can result in larger positions being placed.

This factor is also used by the Hunter strategy whether Injection is on or off: when a Hunter grid is down to 3 positions and the Frontier volume is above this value x Starting Volume, the grid is closed with Whole PCL instead of being curated to a Hunter. That is why the setting is shown for Hunter even with Injection off.

</details>

#### New Position on PCL Close

In low density grids, we can open a new dynamically sized position when a PCL transaction executes. This helps in keeping the grid active instead of waiting for a new SmartEntry position.

<details>

<summary>New Position on PCL Close</summary>

`Boolean`

Default: false

Enable New Position on PCL Close. Only available when the Grid Strategy is Dynamic (the setting is hidden otherwise).

</details>

#### Backfill

Backfill can only be used on Dynamic grids, and should be thoroughly understood before using.

A backfill order will fill in the empty gaps in a low density grid on retrace. So consider the market moves fast after a news event leaving a 60 pip gap in the grid. As the market retraces below the Frontier position, Backfill will enter a new injected position Minimum Step Size below/above the Frontier position.

There are some rules for Backfill, which keep the grid balanced and stop it overtrading. A Backfill order is only placed when all of these hold:

* The grid has **more positions in loss than in profit** (or has exactly 2 positions). Once the positions in profit catch up with those in loss, Backfill stops adding.
* The grid has at least **Min order count for backfill** positions and fewer than **Max order count for backfill**.
* Price is back inside the grid (below the Anchor on a buy grid, above it on a sell grid), with at least one Minimum Step Size to the nearest position on each side, so a Backfill order never lands on top of an existing position.

<details>

<summary>Backfill on Delayed/Dynamic</summary>

`Boolean`

Default: false

Set to true to enable

</details>

<details>

<summary>Min order count for backfill</summary>

`Integer`

Default: 2

Minimum number of grid orders to activate Backfill

</details>

<details>

<summary>Max order count for backfill</summary>

`Integer`

Default: 3

Maximum number of orders to activate Backfill. A new Backfill order is only placed while the grid has fewer open positions than this value.

</details>

<details>

<summary>Backfill on Signal Only</summary>

`Boolean`

Default: false

Only enter a new backfill order on Signal (uses the same system as re-entry positions)

</details>

<details>

<summary>Safety SL on Backfill</summary>

`Boolean`

Default: false

When enabled, a Stop Loss will be placed on the Frontier position of the grid after a Backfill has been placed, protecting against any sudden grid extensions. The Stop Loss is only placed once the Frontier volume is more than 4 x Starting Volume and the market has moved more than one step back past the Frontier position.

</details>
