PINE LIBRARY

Lex_3CR_Functions_Library2

Telah dikemas kini
Library "Lex_3CR_Functions_Library2"
This is a source code for a technical analysis library in Pine Script language,
designed to identify and mark Bullish and Bearish Three Candle Reversal (3CR) chart patterns.
The library provides three functions to be used in a trading algorithm.
The first function, Bull_3crMarker, adds a dashed line and label to a Bullish 3CR chart pattern, indicating the 3CR point.
The second function, Bear_3crMarker, adds a dashed line and label to a Bearish 3CR chart pattern.
The third function, Bull_3CRlogicals, checks for a Bullish 3CR pattern where the first candle's low is greater than the second candle's low and the second candle's low is less than the third candle's low.
If found, creates a line at the breakout point and a label at the fail point,
if specified. All functions take parameters such as the chart pattern's characteristics and output colors, labels, and markers.

Bull_3crMarker(bulllinearray, barnum, breakpoint, failpointB, failpoint, linecolorbull, bulllabelarray, labelcolor, textcolor, labelon)
  Bull_3crMarker Adds a 3CR marker to a Bullish 3CR chart pattern
description Adds a dashed line and label to a 3CR up chart pattern, indicating the 3CR (3 Candle Reversal) point.
  Parameters:
    bulllinearray (line[])
    barnum (int)
    breakpoint (float)
    failpointB (float[])
    failpoint (float)
    linecolorbull (color)
    bulllabelarray (label[])
    labelcolor (color)
    textcolor (color)
    labelon (bool)

Bear_3crMarker(bearlinearray, barnum, breakpoint, failpointB, failpoint, linecolorbear, bearlabelarray, labelcolor, textcolor, labelon)
  Bear_3crMarker Adds a 3CR marker to a Bearish 3CR chart pattern
description Adds a dashed line and label to a 3CR down chart pattern, indicating the 3CR (3 Candle Reversal) point.
  Parameters:
    bearlinearray (line[])
    barnum (int)
    breakpoint (float)
    failpointB (float[])
    failpoint (float)
    linecolorbear (color)
    bearlabelarray (label[])
    labelcolor (color)
    textcolor (color)
    labelon (bool)

Bull_3CRlogicals(low1, low2, low3, bulllinearray, bulllabelarray, failpointB, linecolorbull, labelcolor, textcolor, labelon)
  Checks for a bullish three candle reversal pattern and creates a line and label at the breakout point if found
description Checks for a bullish three candle reversal pattern where the first candle's low is greater than the second candle's low and the second candle's low is less than the third candle's low. If found, creates a line at the breakout point and a label at the fail point, if specified.
  Parameters:
    low1 (float)
    low2 (float)
    low3 (float)
    bulllinearray (line[])
    bulllabelarray (label[])
    failpointB (float[])
    linecolorbull (color)
    labelcolor (color)
    textcolor (color)
    labelon (bool)

Bear_3CRlogicals(high1, high2, high3, bearlinearray, bearlabelarray, failpointB, linecolorbear, labelcolor, textcolor, labelon)
  Checks for a Bearish 3CR pattern and draws a bearish marker on the chart at the appropriate location
description This function checks for a Bearish 3CR (Three-Candle Reversal) pattern, which is defined as the second candle having a higher high than the first and third candles, and the third candle having a lower high than the first candle. If the pattern is detected, a bearish marker is drawn on the chart at the appropriate location, and an optional label can be added to the marker.
  Parameters:
    high1 (float)
    high2 (float)
    high3 (float)
    bearlinearray (line[])
    bearlabelarray (label[])
    failpointB (float[])
    linecolorbear (color)
    labelcolor (color)
    textcolor (color)
    labelon (bool)

bullLineDelete(i, bulllinearray, failarray, bulllabelarray, labelon)
  Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line
description Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line.
  Parameters:
    i (int)
    bulllinearray (line[])
    failarray (float[])
    bulllabelarray (label[])
    labelon (bool)

bearLineDelete(i, bearlinearray, failarray, bearlabelarray, labelon)
  Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line
description Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line.
  Parameters:
    i (int)
    bearlinearray (line[])
    failarray (float[])
    bearlabelarray (label[])
    labelon (bool)

bulloffsetdelete(i, bulllinearray, failarray, bulllabelarray, labelon)
  Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line
description Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line.
  Parameters:
    i (int)
    bulllinearray (line[])
    failarray (float[])
    bulllabelarray (label[])
    labelon (bool)

bearoffsetdelete(i, bearlinearray, failarray, bearlabelarray, labelon)
  Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line
description Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line.
  Parameters:
    i (int)
    bearlinearray (line[])
    failarray (float[])
    bearlabelarray (label[])
    labelon (bool)

BullEntry_setter(i, bulllinearray, failpointB, entrystopB, entryB, entryboolB)
  Checks if the specified value is greater than the break point of any bullish line in an array, and removes that line if true
description Checks if the s pecified value is greater than the break point of any bullish line in an array, and removes that line if true.
  Parameters:
    i (int)
    bulllinearray (line[])
    failpointB (float[])
    entrystopB (float[])
    entryB (float[])
    entryboolB (bool[])

Bull3CRchecker(close1, bulllinearray, FailpointB, rsiB, bulllabelarray, labelt, bullcolored, directionarray, rsi, secondbullline, entrystopB, entryB, entryboolB)
  Parameters:
    close1 (float)
    bulllinearray (line[])
    FailpointB (float[])
    rsiB (float[])
    bulllabelarray (label[])
    labelt (bool)
    bullcolored (color)
    directionarray (label[])
    rsi (float)
    secondbullline (line[])
    entrystopB (float[])
    entryB (float[])
    entryboolB (bool[])

Bear3CRchecker(close1, bearlinearray, FailpointB, bearlabelarray, labelt, bearcolored, directionarray, rsi, secondbearline, rsiB)
  Checks if the specified value is less than the break point of any bearish line in an array, and removes that line if true
description Checks if the specified value is less than the break point of any bearish line in an array, and removes that line if true.
  Parameters:
    close1 (float)
    bearlinearray (line[])
    FailpointB (float[])
    bearlabelarray (label[])
    labelt (bool)
    bearcolored (color)
    directionarray (label[])
    rsi (float)
    secondbearline (line[])
    rsiB (float[])

Bulloffsetcheck(FailpointB, bulllabelarray, linearray, labelt, offset)
  Checks the offset of bullish lines and deletes them if they are beyond a certain offset from the current bar index
description Checks the offset of bullish lines and deletes them if they are beyond a certain offset from the current bar index
  Parameters:
    FailpointB (float[])
    bulllabelarray (label[])
    linearray (line[])
    labelt (bool)
    offset (int)

Bearoffsetcheck(FailpointB, bearlabelarray, linearray, labelt, offset)
  Checks the offset of bearish lines and deletes them if they are beyond a certain offset from the current bar index
description Checks the offset of bearish lines and deletes them if they are beyond a certain offset from the current bar index
  Parameters:
    FailpointB (float[])
    bearlabelarray (label[])
    linearray (line[])
    labelt (bool)
    offset (int)

Bullfailchecker(close1, FailpointB, bulllabelarray, linearray, labelt)
  Checks if the current price has crossed above a bullish fail point and deletes the corresponding line and label
description Checks if the current price has crossed above a bullish fail point and deletes the corresponding line and label
  Parameters:
    close1 (float)
    FailpointB (float[])
    bulllabelarray (label[])
    linearray (line[])
    labelt (bool)

Bearfailchecker(close1, FailpointB, bearlabelarray, linearray, labelt)
  Checks for bearish lines that have failed to trigger and removes them from the chart
description This function checks for bearish lines that have failed to trigger (i.e., where the current price is above the fail point) and removes them from the chart along with any associated label.
  Parameters:
    close1 (float)
    FailpointB (float[])
    bearlabelarray (label[])
    linearray (line[])
    labelt (bool)

rsibullchecker(rsiinput, rsiBull, secondbullline)
  Checks for bullish RSI lines that have failed to trigger and removes them from the chart
description This function checks for bullish RSI lines that have failed to trigger (i.e., where the current RSI value is below the line's trigger level) and removes them from the chart along with any associated line.
  Parameters:
    rsiinput (float)
    rsiBull (float[])
    secondbullline (line[])

rsibearchecker(rsiinput, rsiBear, secondbearline)
  Checks for bearish RSI lines that have failed to trigger and removes them from the chart
description This function checks for bearish RSI lines that have failed to trigger (i.e., where the current RSI value is above the line's trigger level) and removes them from the chart along with any associated line.
  Parameters:
    rsiinput (float)
    rsiBear (float[])
    secondbearline (line[])
Nota Keluaran
v2

Updated:
Bull3CRchecker(close1, bulllinearray, FailpointB, rsiB, bulllabelarray, labelt, bullcolored, directionarray, rsi, secondbullline)
  Parameters:
    close1 (float)
    bulllinearray (line[])
    FailpointB (float[])
    rsiB (float[])
    bulllabelarray (label[])
    labelt (bool)
    bullcolored (color)
    directionarray (label[])
    rsi (float)
    secondbullline (line[])
techindicator

Perpustakaan Pine

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai satu perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman.

Penafian