Library · Pine Script v6 · Library

Helpers

by theonetrade

Helpers is a Pine Script version 6 utility library that exports reusable functions for Average True Range (ATR) based price calculations.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code15
Settings0inputs
LicenceMIT
Last update9 days ago15 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new library, select all of the template text and paste. Press Save and give it a name.
  4. 4Publish or import itA library draws nothing. Publish it from the editor, then import its functions in your own scripts.

Source Code

15 lines of Pine Script v6 from skills/pynecore-practice/templates/library_template.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

library_template.pine
//@version=6
// Pine-first template for a library. Path: content/lib/<user>/<Name>/v<N>.pine, imported from a
// script as `import <user>/<Name>/<N> as alias`; pine2pyne writes scripts/lib/<user>/<Name>/v<N>.py
// and the script's `import lib.<user>.<Name>.v<N> as alias`. <user> is any folder name you choose
// for your own libraries (a `-` in it becomes `_` in the module path).
// @description Small price helpers
library("Helpers")

// @function Stop price a given number of ATRs below the price
export atrStop(float price, float atr, float mult) =>
    price - mult * atr

// @function Target price a given number of ATRs above the price
export atrTarget(float price, float atr, float mult) =>
    price + mult * atr

Overview

Helpers includes exported functions to calculate a stop price at a specified ATR multiple below a reference price and a target price at a specified ATR multiple above a reference price. As a standalone utility library, it draws no visual plots on the chart, contains no user input settings, and does not generate trading signals or execute orders on its own.

Details

Published by

theonetrade on GitHub

Draws

Library (no plots)

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

agent-skillsai-agentsalgorithmic-tradingclaude-codeclaude-skillscodecursorpinescriptpynecorepythontrading-toolkittradingview

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

261 stars

AIActivationFunctionsBipolarSigmoid is a Pine Script library that provides mathematical implementations of the bipolar sigmoid activation function and its derivatives for machine learning algorithms. It calculates bipolar sigmoid values bounded between -1 and

Library v5 AI / machine learning
Updated 5 years ago · None stated GitHub repository of AIActivationFunctionsBipolarSigmoid

KernelFunctions

by artificial-intelligence-edge
75 stars

KernelFunctions is a Pine Script v5 library that exports kernel weight functions for Nadaraya-Watson style estimation. It calculates a Rational Quadratic kernel, a Gaussian kernel based on a radial basis function, and a periodic kernel that models repeating be

Library v5
Updated 4 weeks ago · MIT GitHub repository of KernelFunctions

Ta

by nersent
29 stars

This Pine Script v5 library exports thin wrappers around built-in technical analysis functions. It covers moving averages, momentum measures such as RSI and CCI, volatility tools including ATR and standard deviation, range extremes, cross detection, and runnin

Library v5
Updated 1 year ago · Custom licence GitHub repository of Ta

Bands

by heyphat
27 stars

This library exports a Band type and functions that build a simple-moving-average basis with upper and lower envelopes from standard deviation. It classifies a source as above, below, or inside those envelopes, measures band width, and scales an imported z-sco

Library v6 Volatility & bandsMoving averages
Updated 3 months ago · AGPL-3.0 GitHub repository of Bands

Mylib

by ferranbt
21 stars

This script serves as a minimal utility library written in Pine Script v6. It provides an exported helper function that calculates the sum of two numeric arguments. As a reusable code library, it produces no visual plots, charts, or trading signals, and it con

Library v6
Updated 2 months ago · MPL-2.0 GitHub repository of Mylib

HLevel

by stupenkov
14 stars

HLevel is a Pine Script v5 utility library designed to manage horizontal price levels for cryptocurrency charts. It defines custom types for pivots and levels, along with methods to initialize, add, track, and expire price levels based on pivot high and pivot

Library v5
Updated 3 years ago · None stated GitHub repository of HLevel

More libraries

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers