> For the complete documentation index, see [llms.txt](https://hyperstackz.gitbook.io/hyperstackz-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyperstackz.gitbook.io/hyperstackz-docs/strategy-mechanics/dynamic-dca.md).

# Dynamic DCA

{% hint style="info" %}
HyperStackz v1 is an autonomous execution engine that combines **PWAP-based accumulation** with a **Trailing Take-Profit (TTP)** system.\
Together, they create a continuous cycle that accumulates assets at lower prices and captures yield on upward moves — all directly on **Hyperliquid** through your authorized agent wallet.
{% endhint %}

***

### Core Engine Structure

Each strategy operates as a repeating cycle built on two core layers:

1. **PWAP (Percentile Weighted Average Pricing)** – smart accumulation logic
2. **TTP (Trailing Take-Profit)** – dynamic profit capture and cycle reset

These systems work in tandem to maintain continuous market engagement without manual input.

{% hint style="info" %}
Every HyperStackz strategy is powered by just two parameters:\
**Strike Price** – your accumulation target\
**TTP %** – your trailing profit trigger
{% endhint %}

***

### 1. PWAP Execution Logic

PWAP replaces static DCA spacing with a **percentage-weighted ladder** built around the user-defined Strike Price.\
Rather than buying at fixed intervals, the engine allocates more capital as price moves deeper into the strike zone.

**How it works**

* When a user sets a Strike Price, the system builds a price ladder (for example –5%, –10%, –15%).
* Each level receives a heavier allocation weight as price drops.
* Orders are placed directly on the Hyperliquid order book.
* As the market moves down, fills occur proportionally — lowering the weighted average entry.

This creates an **adaptive accumulation curve** that automatically scales into weakness.

{% hint style="success" %}
PWAP ensures better average entries by buying more aggressively when the market dips,\
and less when prices remain near current levels.
{% endhint %}

***

### 2. Trailing Take-Profit (TTP) Logic

Once accumulation is complete, the TTP module activates to manage exits.\
Instead of fixed take-profit targets, TTP follows market momentum to secure yield efficiently.

**How it works**

* When the average entry price is established, the TTP line initializes a trailing offset above that price.
* As the market rises, the trail follows upward by the configured TTP %.
* When momentum slows and price reverses through the trailing line, the position closes automatically.
* Profits are realized, and the cycle resets.

{% hint style="info" %}
TTP captures yield during upward volatility while avoiding premature exits.\
The trail adapts to market movement — securing profits when momentum fades.
{% endhint %}

***

### 3. PWAP + TTP Synergy

Combining both systems forms the complete **HyperStackz Cycle**:

1. **Market Drops:** PWAP executes tiered entries toward the Strike Price.
2. **Average Entry:** Weighted fills establish a lower cost basis.
3. **Market Recovers:** TTP trail activates and follows price upward.
4. **Profit Lock:** Once the trail triggers, profits are realized.
5. **Cycle Reset:** The engine reloads and waits for the next entry opportunity.

This loop repeats indefinitely, maintaining active yield generation without manual management.

{% hint style="success" %}
PWAP builds the position.\
TTP extracts the yield.\
HyperStackz automates both — cycle after cycle.
{% endhint %}

***

### 4. Strategy Controls

Each live strategy exposes key user-defined parameters:

| Parameter          | Description                                                           |
| ------------------ | --------------------------------------------------------------------- |
| **Strike Price**   | Defines the base of the PWAP structure and where accumulation begins. |
| **TTP %**          | Sets the trailing distance used for dynamic profit capture.           |
| **Deposit Amount** | Determines total capital allocated to the current cycle.              |
| **Loop Toggle**    | Enables continuous re-entry after each completed cycle.               |
| **Auto-Compound**  | Reinvests realized yield into future cycles for growth.               |

{% hint style="warning" %}
Confirm Strike Price and TTP % before launching.\
Once live, the agent executes real trades on the Hyperliquid order book.
{% endhint %}

***

### 5. Example Cycle

| Step | Market Move             | Engine Action                | Result                                       |
| ---- | ----------------------- | ---------------------------- | -------------------------------------------- |
| 1    | Price = $50             | User Strike = $45            | PWAP creates entries at –5 % to –15 % levels |
| 2    | Price drops to $43      | Weighted orders fill         | Average entry ≈ $44.2                        |
| 3    | Price rebounds to $46   | TTP trail (+1.7 %) activates | Profit tracking begins                       |
| 4    | Price reverses to $45.8 | TTP triggered                | Position sells and profit realized           |
| 5    | Cycle resets            | Strike + PWAP reload         | Ready for next loop                          |

***

### 6. Yield Source

In v1, yield is earned from **market efficiency**, not staking or farming.\
Every completed cycle produces realized yield by:

* Buying efficiently through PWAP weighting
* Selling dynamically via TTP trailing
* Compounding gains through continuous cycling

{% hint style="info" %}
HyperStackz v1 generates sustainable yield from precision execution —\
not from external liquidity pools or token emissions.
{% endhint %}

***

### Summary

HyperStackz v1 automates structured accumulation and yield capture through two interconnected systems:

* **PWAP** – Adaptive accumulation toward your Strike Price
* **TTP** – Trailing exit logic that secures profits and resets automatically

This design enables continuous, transparent, and fully self-custodied execution directly on Hyperliquid.

{% hint style="success" %}
One strategy. Two parameters. Infinite cycles.\
That’s the HyperStackz engine.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hyperstackz.gitbook.io/hyperstackz-docs/strategy-mechanics/dynamic-dca.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
