Indicator · Pine Script v6 · On the chart

Tik 2 USD

by keiru517

Tik 2 USD is an overlay indicator that plots a grid of fixed price level lines and entry/exit offset lines across a user-defined price range.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code85
Settings3inputs
LicenceNone statedfile: MPL-2.0
Last update1 year ago7 May 2025

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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

85 lines of Pine Script v6 from Tik 2 USD.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Tik 2 USD.txt
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

//@version=6
indicator("Tik 2 USD", overlay = true)
start_ratio = input(1.3, "Start point")
end_ratio = input(1.4, "End point")
show_enty = input(true, "Show entry and exit")

step = 0.1
entry = 0.00060

for i = start_ratio to end_ratio by step
    line.new(x1=bar_index - 1000, y1=i, x2=bar_index + 5, y2=i, extend=extend.right, color=color.red, width=1)
    if show_enty
        line.new(x1=bar_index - 1000, y1=i + entry, x2=bar_index + 5, y2=i + entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
        line.new(x1=bar_index - 1000, y1=i - entry, x2=bar_index + 5, y2=i - entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
    
    if i + step / 4 < end_ratio
        line.new(x1=bar_index - 1000, y1=i + step / 4, x2=bar_index + 5, y2=i + step / 4, extend=extend.right, color=color.aqua, width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5, x2=bar_index + 5, y2=i + step / 4 / 5, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 2, x2=bar_index + 5, y2=i + step / 4 / 5 * 2, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 3, x2=bar_index + 5, y2=i + step / 4 / 5 * 3, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 4, x2=bar_index + 5, y2=i + step / 4 / 5 * 4, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)

        if show_enty
            line.new(x1=bar_index - 1000, y1=i + step / 4 + entry, x2=bar_index + 5, y2=i + step / 4 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 - entry, x2=bar_index + 5, y2=i + step / 4 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 2 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 2 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 2 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 2 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 3 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 3 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 3 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 3 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 4 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 4 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 4 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 4 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)

    if i + step / 2 < end_ratio
        line.new(x1=bar_index - 1000, y1=i + step / 2, x2=bar_index + 5, y2=i + step / 2, extend=extend.right, color=color.yellow, width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 6, x2=bar_index + 5, y2=i + step / 4 / 5 * 6, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 7, x2=bar_index + 5, y2=i + step / 4 / 5 * 7, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 8, x2=bar_index + 5, y2=i + step / 4 / 5 * 8, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 9, x2=bar_index + 5, y2=i + step / 4 / 5 * 9, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)

        if show_enty
            line.new(x1=bar_index - 1000, y1=i + step / 2 + entry, x2=bar_index + 5, y2=i + step / 2 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 2 - entry, x2=bar_index + 5, y2=i + step / 2 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 6 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 6 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 6 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 6 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 7 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 7 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 7 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 7 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 8 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 8 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 8 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 8 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 9 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 9 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 9 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 9 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)

    if i + step / 4 * 3 < end_ratio
        line.new(x1=bar_index - 1000, y1=i + step / 4 * 3, x2=bar_index + 5, y2=i + step / 4 * 3, extend=extend.right, color=color.aqua, width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 11, x2=bar_index + 5, y2=i + step / 4 / 5 * 11, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 12, x2=bar_index + 5, y2=i + step / 4 / 5 * 12, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 13, x2=bar_index + 5, y2=i + step / 4 / 5 * 13, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 14, x2=bar_index + 5, y2=i + step / 4 / 5 * 14, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 16, x2=bar_index + 5, y2=i + step / 4 / 5 * 16, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 17, x2=bar_index + 5, y2=i + step / 4 / 5 * 17, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 18, x2=bar_index + 5, y2=i + step / 4 / 5 * 18, extend=extend.right, color=color.green, style = line.style_dashed , width=1)
        line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 19, x2=bar_index + 5, y2=i + step / 4 / 5 * 19, extend=extend.right, color=color.aqua, style = line.style_dashed , width=1)
        
        if show_enty    
            line.new(x1=bar_index - 1000, y1=i + step / 4 * 3 + entry, x2=bar_index + 5, y2=i + step / 4 * 3 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 * 3 - entry, x2=bar_index + 5, y2=i + step / 4 * 3 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dotted, width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 11 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 11 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 11 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 11 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 12 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 12 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 12 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 12 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 13 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 13 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 13 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 13 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 14 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 14 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 14 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 14 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 15 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 15 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 15 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 15 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 16 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 16 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 16 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 16 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 17 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 17 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 17 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 17 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 18 + entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 18 + entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)
            line.new(x1=bar_index - 1000, y1=i + step / 4 / 5 * 18 - entry, x2=bar_index + 5, y2=i + step / 4 / 5 * 18 - entry, extend=extend.right, color=color.fuchsia, style = line.style_dashed , width=1)

Overview

Tik 2 USD uses a loop between specified start and end ratios to draw main target levels along with intermediate subdivided ratio lines. Users can toggle the display of entry and exit offset lines around each calculated level. Inputs allow configuration of the start point, end point, and visibility of offset boundaries. The script draws all level lines directly on the price chart.

Details

Published by

keiru517 on GitHub

Draws

On the price chart

Markets

Forex

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.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Start pointfloat1.3start_ratio
End pointfloat1.4end_ratio
Show entry and exitbooltrueshow_enty
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

947 stars

Moving Average Channel plots separate simple moving averages for upper and lower bands on the price chart. It fills the space between bands with semi-transparent color and colors bars green above the upper band, red below the lower band, or gray in between. Us

Indicator v4 Moving averagesSupport & resistance
Updated 12 days ago · GPL-3.0 GitHub repository of Moving Average Channel

ICT Equal Highs and Lows

by ArunKBhaskar
575 stars

This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 2 months ago · MIT GitHub repository of Volume Profile and Indicator by DGT

BZ-tracker

by Allen1212
303 stars

The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of BZ-tracker

Function - Linear Regression

by ricardosantos79
261 stars

This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function - Linear Regression

More Support & resistance scripts

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