PINE LIBRARY
Updated

LiliALHUNTERSystem_v2

148
๐Ÿ“š **Library: LiliALHUNTERSystem_v2**

This library provides a powerful target management system for Pine Script developers.
It includes advanced calculators for EMA, RMA, and Supertrend, and introduces a central `createTargets()` function to dynamically render target lines and labels based on long/short trade logic.

๐Ÿ› ๏ธ **Main Features:**
โ€“ Dynamic horizontal & vertical target lines
โ€“ Dual target configuration (Target 1 & Target 2)
โ€“ Directional logic via `isLong1`, `isLong2`
โ€“ Integrated Supertrend validation
โ€“ Visual dashboard and label display
โ€“ Works seamlessly with custom indicators

๐ŸŽฏ **Purpose:**
The `LiliALHUNTERSystem_v2` Library enables Pine coders to manage and visualize targets consistently across all trading strategies and indicators. It simplifies target logic while maintaining visual clarity and modular usage.

โš ๏ธ **Disclaimer:**
This script is intended for educational and analytical purposes only. It does not constitute financial advice.


Library "LiliALHUNTERSystem_v2"

ema_calc(len, source)
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒlen (simple int)
โ€ƒโ€ƒโ€ƒโ€ƒsource (float)

rma_calc(len, source)
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒlen (simple int)
โ€ƒโ€ƒโ€ƒโ€ƒsource (float)

supertrend_calc(length, factor)
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒlength (simple int)
โ€ƒโ€ƒโ€ƒโ€ƒfactor (float)

createTargets(config, state, source1A, source1B, source2A, source2B)
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒconfig (TargetConfig)
โ€ƒโ€ƒโ€ƒโ€ƒstate (TargetState)
โ€ƒโ€ƒโ€ƒโ€ƒsource1A (float)
โ€ƒโ€ƒโ€ƒโ€ƒsource1B (float)
โ€ƒโ€ƒโ€ƒโ€ƒsource2A (float)
โ€ƒโ€ƒโ€ƒโ€ƒsource2B (float)

showDashboard(state, dashLoc, textSize)
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒstate (TargetState)
โ€ƒโ€ƒโ€ƒโ€ƒdashLoc (string)
โ€ƒโ€ƒโ€ƒโ€ƒtextSize (string)

TargetConfig
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒenableTarget1 (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒenableTarget2 (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒisLong1 (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒisLong2 (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Condition (series string)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Condition (series string)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Color (series color)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Color (series color)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Style (series string)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Style (series string)
โ€ƒโ€ƒโ€ƒโ€ƒdistTarget1 (series float)
โ€ƒโ€ƒโ€ƒโ€ƒdistTarget2 (series float)
โ€ƒโ€ƒโ€ƒโ€ƒdistOptions1 (series string)
โ€ƒโ€ƒโ€ƒโ€ƒdistOptions2 (series string)
โ€ƒโ€ƒโ€ƒโ€ƒshowLabels (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒshowDash (series bool)

TargetState
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒtarget1LineV (series line)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1LineH (series line)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2LineV (series line)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2LineH (series line)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Lbl (series label)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Lbl (series label)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Active (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Active (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒtarget1Value (series float)
โ€ƒโ€ƒโ€ƒโ€ƒtarget2Value (series float)
โ€ƒโ€ƒโ€ƒโ€ƒcountTargets1 (series int)
โ€ƒโ€ƒโ€ƒโ€ƒcountTgReached1 (series int)
โ€ƒโ€ƒโ€ƒโ€ƒcountTargets2 (series int)
โ€ƒโ€ƒโ€ƒโ€ƒcountTgReached2 (series int)
Release Notes
v2 v2 Performance improvements
Release Notes
v3 - Improved description clarity to comply with TradingView publishing guidelines. No changes to core functionality.


LiliALHUNTERSystem_v2 Library

Description:
LiliALHUNTERSystem_v2 is a Pine Script library that enables automatic creation and management of visual targets for any custom trading indicator or strategy.
It helps Pine Script developers easily add target lines, labels, and tracking features to their scripts without having to code them from scratch.

Main Features:
โœ… Automatic horizontal and vertical target lines (Target 1 and Target 2)
โœ… Configurable distances, colors, and styles
โœ… Supertrend filter to confirm target activation
โœ… Built-in EMA and RMA calculations
โœ… Visual dashboard with real-time target status
โœ… Easy integration with your custom entry/exit conditions

Typical Use Cases:
โ€ข Displaying take-profit targets after a buy/sell signal
โ€ข Visualizing milestones during trends
โ€ข Tracking how often targets are reached
โ€ข Enhancing custom strategies with clear target management

Who Should Use It:
This library is designed for Pine Script developers who want to improve their scripts with advanced target visualization and consistent tracking across strategies.

Important Note:
This library does not generate buy/sell signals on its own. It only provides target management tools to be used alongside your existing trading logic.

Disclaimer:
For educational and informational purposes only. Not financial advice.

Technical Reference:

Functions:

ema_calc(len, source)

rma_calc(len, source)

supertrend_calc(length, factor)

createTargets(config, state, source1A, source1B, source2A, source2B)

showDashboard(state, dashLoc, textSize)

Structures:

TargetConfig:

enableTarget1, enableTarget2, isLong1, isLong2, target conditions, colors, styles, distances, labels, dashboard options.

TargetState:

target lines, labels, activation flags, hit counts, current values.

โœจ How to Use:
Import the library in your script and call createTargets() to display targets dynamically. Use showDashboard() to render the visual dashboard on your chart.
Release Notes
v4 ๐Ÿ“š LiliALHUNTERSystem_v2 Library

Description:
LiliALHUNTERSystem_v2 is a Pine Script library that enables automatic creation and management of visual targets for any custom trading indicator or strategy.
It helps Pine Script developers easily add target lines, labels, and tracking features to their scripts without having to code them from scratch.

Main Features:
โœ… Automatic horizontal and vertical target lines (Target 1 and Target 2)
โœ… Configurable distances, colors, and styles
โœ… Supertrend filter to confirm target activation
โœ… Built-in EMA and RMA calculations
โœ… Visual dashboard with real-time target status
โœ… Easy integration with your custom entry/exit conditions

Typical Use Cases:
โ€ข Displaying take-profit targets after a buy/sell signal
โ€ข Visualizing milestones during trends
โ€ข Tracking how often targets are reached
โ€ข Enhancing custom strategies with clear target management

Who Should Use It:
This library is designed for Pine Script developers who want to improve their scripts with advanced target visualization and consistent tracking across strategies.

Important Note:
This library does not generate buy/sell signals on its own. It only provides target management tools to be used alongside your existing trading logic.

Disclaimer:
For educational and informational purposes only. Not financial advice.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.