`barhelper` is a **demonstration helper package** that showcases how to build a KnitPkg package that **extends** another package (`@douglasrechia/bar`).
It provides:
- Simple crossover helpers like `CrossUp()` and `Cross()` for `ITimeSeries<double>`
- Indicator helpers like `NewTimeSeriesFromIndicator()` to convert indicator buffers into `ITimeSeries<double>`
This project is intended **only as an educational example** of how to structure, package, install dependencies, and compile **MQL5** code with KnitPkg. It is **not** meant to be a production-grade library for large-scale use.
2.**KnitPkg CLI**: The KnitPkg package manager for MetaTrader. If you don't have it, you can install it by following the instructions in the [main KnitPkg repository](https://github.com/knitpkg-dev/knitpkg-mt.git).
3.**KnitPkg homepage**: See [https://knitpkg.dev](https://knitpkg.dev) for an overview and [https://docs.knitpkg.dev](https://docs.knitpkg.dev) for documentation.
Then use the helper functions to work with `ITimeSeries<double>` instances (for example, crossover detection).
> Note: The exact header names and function signatures depend on the package headers. Use MetaEditor IntelliSense (after `kp autocomplete`) to browse the available APIs.
---
## Exploring the project locally (optional)
If you want to explore how a KnitPkg package with dependencies is structured, clone the repository and run the standard workflow.
### 1) Clone into MetaTrader `Scripts` folder (example)
2. Restart MetaTrader (so the Navigator refreshes).
3. Run the generated unit test script from the Navigator on any chart.
4. Check results in the MetaTrader console (Experts/Scripts tab, depending on your setup).
The compiled binary is placed under the project `bin/` directory (and appears in the Navigator under the corresponding compiled location after refresh).
---
## One-command download/build via the registry (optional)
You can also use `kp get` to query the registry for metadata and automatically download/build the latest stable version.
Example (run from your MetaTrader *Data Folder* root):