RobMinty

DiddlyUtility

RobMinty Updated   
Library "DiddlyUtility"
TODO: add library description here

getStringTimeMinus1Minute(london_ssth, london_sstm)
  Parameters:
    london_ssth
    london_sstm

getLadderStepIncrement(_price)
  Parameters:
    _price

getLadderIndexForPrice(_price, _ladderRange)
  Parameters:
    _price
    _ladderRange

getLadderStartPriceRange(_price, _ladderRange)
  Parameters:
    _price
    _ladderRange

get_volume_string(_volume)
  Parameters:
    _volume

floorDown(number, decimals)
  Parameters:
    number
    decimals

countDigitsBeforeDecimal(n)
  Parameters:
    n

countDigitsAfterDecimal(n)
  Parameters:
    n

getChartTimePeriodAsSeconds(_chartPeriod)
  Parameters:
    _chartPeriod

debug(_txt)
  Parameters:
    _txt
Release Notes:
v2

Added:
CheckZoneRelativeStateToPrice(_lineType, _IsBroken, _lineExceptionLevel, _closePrice, _lineUpperPrice, _lineLowerPrice, _zoneIndex, _closedWithinZoneIndex, _nearestResistanceZoneAboveIndex, _nearestResistanceZoneAboveDistance, _nearestBuyersZoneAboveIndex, _nearestBuyersZoneAboveDistance, _nearestSupportZoneBelowIndex, _nearestSupportZoneBelowDistance, _nearestSellersZoneBelowIndex, _nearestSellersZoneBelowDistance)
  Parameters:
    _lineType (int)
    _IsBroken (bool)
    _lineExceptionLevel (int)
    _closePrice (float)
    _lineUpperPrice (float)
    _lineLowerPrice (float)
    _zoneIndex (int)
    _closedWithinZoneIndex (int)
    _nearestResistanceZoneAboveIndex (int)
    _nearestResistanceZoneAboveDistance (float)
    _nearestBuyersZoneAboveIndex (int)
    _nearestBuyersZoneAboveDistance (float)
    _nearestSupportZoneBelowIndex (int)
    _nearestSupportZoneBelowDistance (float)
    _nearestSellersZoneBelowIndex (int)
    _nearestSellersZoneBelowDistance (float)

completeZoneRelativeAnalysis(_closedWithinZoneIndex, _nearestResistanceZoneAboveIndex, _nearestResistanceZoneAboveDistance, _nearestBuyersZoneAboveIndex, _nearestBuyersZoneAboveDistance, _nearestSupportZoneBelowIndex, _nearestSupportZoneBelowDistance, _nearestSellersZoneBelowIndex, _nearestSellersZoneBelowDistance)
  Parameters:
    _closedWithinZoneIndex (int)
    _nearestResistanceZoneAboveIndex (int)
    _nearestResistanceZoneAboveDistance (float)
    _nearestBuyersZoneAboveIndex (int)
    _nearestBuyersZoneAboveDistance (float)
    _nearestSupportZoneBelowIndex (int)
    _nearestSupportZoneBelowDistance (float)
    _nearestSellersZoneBelowIndex (int)
    _nearestSellersZoneBelowDistance (float)

addLabel(_boxEnd, _yPos, _text, _toolTip, _textColor)
  Parameters:
    _boxEnd (int)
    _yPos (float)
    _text (string)
    _toolTip (string)
    _textColor (color)

buidZoneUI(_time, _top, _bottom, _zoneMethod, _zoneType1, _exceptionLevel1, _zoneType1DisplayLabel, _zoneType2, _exceptionLevel2, _zoneType2DisplayLabel, _boxEnd, _border_style, _text, _toolTip, _textColor, _zoneColourBull1, _zoneColourBull2, _zoneColourBull3, _zoneColourBull4, _zoneColourBear1, _zoneColourBear2, _zoneColourBear3, _zoneColourBear4, _zoneLineColourBull1, _zoneLineColourBull2, _zoneLineColourBull3, _zoneLineColourBull4, _zoneLineColourBear1, _zoneLineColourBear2, _zoneLineColourBear3, _zoneLineColourBear4, _borderWidthActive)
  Parameters:
    _time (int)
    _top (float)
    _bottom (float)
    _zoneMethod (int)
    _zoneType1 (int)
    _exceptionLevel1 (int)
    _zoneType1DisplayLabel (bool)
    _zoneType2 (int)
    _exceptionLevel2 (int)
    _zoneType2DisplayLabel (bool)
    _boxEnd (int)
    _border_style (string)
    _text (string)
    _toolTip (string)
    _textColor (color)
    _zoneColourBull1 (color)
    _zoneColourBull2 (color)
    _zoneColourBull3 (color)
    _zoneColourBull4 (color)
    _zoneColourBear1 (color)
    _zoneColourBear2 (color)
    _zoneColourBear3 (color)
    _zoneColourBear4 (color)
    _zoneLineColourBull1 (color)
    _zoneLineColourBull2 (color)
    _zoneLineColourBull3 (color)
    _zoneLineColourBull4 (color)
    _zoneLineColourBear1 (color)
    _zoneLineColourBear2 (color)
    _zoneLineColourBear3 (color)
    _zoneLineColourBear4 (color)
    _borderWidthActive (int)

setZoneColour(_uiBox, _zoneMethod, _zoneType1, _isBroken, _type1ExceptionLevel, _zoneType2, _type2ExceptionLevel, _isTrapZone, _zoneTrapBullColour, _zoneTrapBearColour, _zoneColourBull1, _zoneColourBull2, _zoneColourBull3, _zoneColourBull4, _zoneColourBear1, _zoneColourBear2, _zoneColourBear3, _zoneColourBear4)
  Parameters:
    _uiBox (box)
    _zoneMethod (int)
    _zoneType1 (int)
    _isBroken (bool)
    _type1ExceptionLevel (int)
    _zoneType2 (int)
    _type2ExceptionLevel (int)
    _isTrapZone (bool)
    _zoneTrapBullColour (color)
    _zoneTrapBearColour (color)
    _zoneColourBull1 (color)
    _zoneColourBull2 (color)
    _zoneColourBull3 (color)
    _zoneColourBull4 (color)
    _zoneColourBear1 (color)
    _zoneColourBear2 (color)
    _zoneColourBear3 (color)
    _zoneColourBear4 (color)

amendBrokenLevelUI(_uiBox, _zoneMethod, _zoneType1, _type1ExceptionLevel, _zoneType2, _type2ExceptionLevel, _boxEnd, _border_style, _isTrapZone, _zoneTrapBullColour, _zoneTrapBearColour, _zoneColourBull1, _zoneColourBull2, _zoneColourBull3, _zoneColourBull4, _zoneColourBear1, _zoneColourBear2, _zoneColourBear3, _zoneColourBear4, _borderWidth)
  Parameters:
    _uiBox (box)
    _zoneMethod (int)
    _zoneType1 (int)
    _type1ExceptionLevel (int)
    _zoneType2 (int)
    _type2ExceptionLevel (int)
    _boxEnd (int)
    _border_style (string)
    _isTrapZone (bool)
    _zoneTrapBullColour (color)
    _zoneTrapBearColour (color)
    _zoneColourBull1 (color)
    _zoneColourBull2 (color)
    _zoneColourBull3 (color)
    _zoneColourBull4 (color)
    _zoneColourBear1 (color)
    _zoneColourBear2 (color)
    _zoneColourBear3 (color)
    _zoneColourBear4 (color)
    _borderWidth (int)

manageZoneInformation(_label, _textElement, _text)
  Parameters:
    _label (label)
    _textElement (int)
    _text (string)

getZoneName(_zoneType)
  Parameters:
    _zoneType (int)

getZoneSetupType(_setupType)
  Parameters:
    _setupType (int)

getCurrentDayOfWeek()

isInUSstockOpenMarket()

isInUSstockPostMarket()

isInUSstockPreMarket()

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

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.

Want to use this library?

Copy the following line and paste it in your script.