RifleLib

Provides a collection of helper functions in support of the Rifle Shooter Indicators.
toStrRnd(val, digits)
Parameters:
val (float)
digits (int)
_isValidTimeRange(startTimeInput, endTimeInput)
Parameters:
startTimeInput (string)
endTimeInput (string)
_normalize(_src, _min, _max)
Parameters:
_src (float)
_min (float)
_max (float)
arrayToSeries(arrayInput)
arrayToSeries Return an array from the provided series.
Parameters:
arrayInput (array<float>)
f_parabolicFiltering(_activeCount, long, shooterRsi, shooterRsiLongThreshold, shooterRsiShortThreshold, fiveMinuteRsi, fiveMinRsiLongThreshold, fiveMinRsiShortThreshold, shooterRsiRoc, shooterRsiRocLongThreshold, shooterRsiRocShortThreshold, quickChangeLookbackBars, quckChangeThreshold, curBarChangeThreshold, changeFromPrevBarThreshold, maxBarsToholdParabolicMoveActive, generateLabels)
f_parabolicFiltering Return true when price action indicates a parabolic active movement based on the provided inputs and thresholds.
Parameters:
_activeCount (int)
long (bool)
shooterRsi (float)
shooterRsiLongThreshold (float)
shooterRsiShortThreshold (float)
fiveMinuteRsi (float)
fiveMinRsiLongThreshold (float)
fiveMinRsiShortThreshold (float)
shooterRsiRoc (float)
shooterRsiRocLongThreshold (float)
shooterRsiRocShortThreshold (float)
quickChangeLookbackBars (int)
quckChangeThreshold (int)
curBarChangeThreshold (int)
changeFromPrevBarThreshold (int)
maxBarsToholdParabolicMoveActive (int)
generateLabels (bool)
rsiValid(rsi, buyThreshold, sellThreshold)
rsiValid Returns true if the provided RSI value is withing the associated threshold. For the unused threshold set it to na
Parameters:
rsi (float)
buyThreshold (float)
sellThreshold (float)
squezePro(source, length)
squezePro Returns the squeeze pro momentum color of current source series input
Parameters:
source (float)
length (int)
f_momentumOscilator(source, length, transperency)
f_momentumOscilator Returns the squeeze pro momentum value and bar color states of the series input
Parameters:
source (float)
length (int)
transperency (int)
f_getLookbackExtreme(lowSeries, highSeries, lbBars, long)
f_getLookbackExtreme Return the highest high or lowest low over the look back window
Parameters:
lowSeries (float)
highSeries (float)
lbBars (int)
long (bool)
f_getInitialMoveTarget(lbExtreme, priveMoveOffset, long)
f_getInitialMoveTarget Return the point delta required to achieve an initial rifle move (X points over Y lookback)
Parameters:
lbExtreme (float)
priveMoveOffset (int)
long (bool)
isSymbolSupported(sym)
isSymbolSupported Return true if provided symbol is one of the supported DOW Rifle Indicator symbols
Parameters:
sym (string)
getBasePrice(price)
getBasePrice Returns integer portion of provided float
Parameters:
price (float)
getLastTwoDigitsOfPrice(price)
getBasePrice Returns last two integer numerals of provided float value
Parameters:
price (float)
getNextLevelDown(price, lowestLevel, middleLevel, highestLevel)
getNextLevelDown Returns the next level above the provided price value
Parameters:
price (float)
lowestLevel (float)
middleLevel (float)
highestLevel (float)
getNextLevelUp(price, lowestLevel, middleLevel, highestLevel)
getNextLevelUp Returns the next level below the provided price value
Parameters:
price (float)
lowestLevel (float)
middleLevel (float)
highestLevel (float)
isALevel(price, lowestLevel, middleLevel, highestLevel)
isALevel Returns true if the provided price is onve of the specified levels
Parameters:
price (float)
lowestLevel (float)
middleLevel (float)
highestLevel (float)
getClosestLevel(price, lowestLevel, middleLevel, highestLevel)
getClosestLevel Returns the level closest to the price value provided
Parameters:
price (float)
lowestLevel (float)
middleLevel (float)
highestLevel (float)
f_fillSetupTableCell(_table, _col, _row, _text, _bgcolor, _txtcolor, _text_size)
f_fillSetupTableCell Helper function to fill a setup table celll
Parameters:
_table (table)
_col (int)
_row (int)
_text (string)
_bgcolor (color)
_txtcolor (color)
_text_size (string)
f_fillSetupTableRow(_table, _row, _col0Str, _col1Str, _col2Str, _bgcolor, _textColor, _textSize)
f_fillSetupTableRow Helper function to fill a setup table row
Parameters:
_table (table)
_row (int)
_col0Str (string)
_col1Str (string)
_col2Str (string)
_bgcolor (color)
_textColor (color)
_textSize (string)
f_addBlankRow(_table, _row)
f_addBlankRow Helper function to fill a setup table row with empty values
Parameters:
_table (table)
_row (int)
f_updateVersionTable(versionTable, versionStr, versionDateStr)
f_updateVersionTable Helper function to fill the version table with provided values
Parameters:
versionTable (table)
versionStr (string)
versionDateStr (string)
f_updateSetupTable(_table, parabolicMoveActive, initialMoveTargetOffset, initialMoveAchieved, shooterRsi, shooterRsiValid, rsiRocEnterThreshold, shooterRsiRoc, fiveMinuteRsi, fiveMinuteRsiValid, requireValid5MinuteRsiForEntry, stallLevelOffset, stallLevelExceeded, stallTargetOffset, recoverStallLevelValid, curBarChangeValid, volumeRoc, volumeRocThreshold, enableVolumeRocForTrigger, tradeActive, entryPrice, curCloseOffset, curSymCashDelta, djiCashDelta, showDjiDelta, longIndicator, fontSize)
f_updateSetupTable Manages writing current data to the setup table
Parameters:
_table (table)
parabolicMoveActive (bool)
initialMoveTargetOffset (float)
initialMoveAchieved (bool)
shooterRsi (float)
shooterRsiValid (bool)
rsiRocEnterThreshold (float)
shooterRsiRoc (float)
fiveMinuteRsi (float)
fiveMinuteRsiValid (bool)
requireValid5MinuteRsiForEntry (bool)
stallLevelOffset (float)
stallLevelExceeded (bool)
stallTargetOffset (float)
recoverStallLevelValid (bool)
curBarChangeValid (bool)
volumeRoc (float)
volumeRocThreshold (float)
enableVolumeRocForTrigger (bool)
tradeActive (bool)
entryPrice (float)
curCloseOffset (float)
curSymCashDelta (float)
djiCashDelta (float)
showDjiDelta (bool)
longIndicator (bool)
fontSize (string)
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.
Penafian
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.