Fib Retracement
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © syntaxgeek

//           _____            _____                   _____            _____                   _____                                          _____                   _____                   _____                   _____          
//          /\    \          |\    \                 /\    \          /\    \                 /\    \                ______                  /\    \                 /\    \                 /\    \                 /\    \         
//         /::\    \         |:\____\               /::\____\        /::\    \               /::\    \              |::|   |                /::\    \               /::\    \               /::\    \               /::\____\        
//        /::::\    \        |::|   |              /::::|   |        \:::\    \             /::::\    \             |::|   |               /::::\    \             /::::\    \             /::::\    \             /:::/    /        
//       /::::::\    \       |::|   |             /:::::|   |         \:::\    \           /::::::\    \            |::|   |              /::::::\    \           /::::::\    \           /::::::\    \           /:::/    /         
//      /:::/\:::\    \      |::|   |            /::::::|   |          \:::\    \         /:::/\:::\    \           |::|   |             /:::/\:::\    \         /:::/\:::\    \         /:::/\:::\    \         /:::/    /          
//     /:::/__\:::\    \     |::|   |           /:::/|::|   |           \:::\    \       /:::/__\:::\    \          |::|   |            /:::/  \:::\    \       /:::/__\:::\    \       /:::/__\:::\    \       /:::/____/           
//     \:::\   \:::\    \    |::|   |          /:::/ |::|   |           /::::\    \     /::::\   \:::\    \         |::|   |           /:::/    \:::\    \     /::::\   \:::\    \     /::::\   \:::\    \     /::::\    \           
//   ___\:::\   \:::\    \   |::|___|______   /:::/  |::|   | _____    /::::::\    \   /::::::\   \:::\    \        |::|   |          /:::/    / \:::\    \   /::::::\   \:::\    \   /::::::\   \:::\    \   /::::::\____\________  
//  /\   \:::\   \:::\    \  /::::::::\    \ /:::/   |::|   |/\    \  /:::/\:::\    \ /:::/\:::\   \:::\    \ ______|::|___|___ ____ /:::/    /   \:::\ ___\ /:::/\:::\   \:::\    \ /:::/\:::\   \:::\    \ /:::/\:::::::::::\    \ 
// /::\   \:::\   \:::\____\/::::::::::\____/:: /    |::|   /::\____\/:::/  \:::\____/:::/  \:::\   \:::\____|:::::::::::::::::|    /:::/____/  ___\:::|    /:::/__\:::\   \:::\____/:::/__\:::\   \:::\____/:::/  |:::::::::::\____\
// \:::\   \:::\   \::/    /:::/~~~~/~~     \::/    /|::|  /:::/    /:::/    \::/    \::/    \:::\  /:::/    |:::::::::::::::::|____\:::\    \ /\  /:::|____\:::\   \:::\   \::/    \:::\   \:::\   \::/    \::/   |::|~~~|~~~~~     
//  \:::\   \:::\   \/____/:::/    /         \/____/ |::| /:::/    /:::/    / \/____/ \/____/ \:::\/:::/    / ~~~~~~|::|~~~|~~~      \:::\    /::\ \::/    / \:::\   \:::\   \/____/ \:::\   \:::\   \/____/ \/____|::|   |          
//   \:::\   \:::\    \  /:::/    /                  |::|/:::/    /:::/    /                   \::::::/    /        |::|   |          \:::\   \:::\ \/____/   \:::\   \:::\    \      \:::\   \:::\    \           |::|   |          
//    \:::\   \:::\____\/:::/    /                   |::::::/    /:::/    /                     \::::/    /         |::|   |           \:::\   \:::\____\      \:::\   \:::\____\      \:::\   \:::\____\          |::|   |          
//     \:::\  /:::/    /\::/    /                    |:::::/    /\::/    /                      /:::/    /          |::|   |            \:::\  /:::/    /       \:::\   \::/    /       \:::\   \::/    /          |::|   |          
//      \:::\/:::/    /  \/____/                     |::::/    /  \/____/                      /:::/    /           |::|   |             \:::\/:::/    /         \:::\   \/____/         \:::\   \/____/           |::|   |          
//       \::::::/    /                               /:::/    /                               /:::/    /            |::|   |              \::::::/    /           \:::\    \              \:::\    \               |::|   |          
//        \::::/    /                               /:::/    /                               /:::/    /             |::|   |               \::::/    /             \:::\____\              \:::\____\              \::|   |          
//         \::/    /                                \::/    /                                \::/    /              |::|___|                \::/____/               \::/    /               \::/    /               \:|   |          
//          \/____/                                  \/____/                                  \/____/                ~~                                              \/____/                 \/____/                 \|___|          
                                                                                                                                                                                                                                  
//@version=5
indicator("Fib Retracement", overlay=true, precision=4)

//{ consts
var c_trendLineStyle = line.style_dashed
var c_levelsLineStyle = line.style_solid
var c_levelsLineThickness = 1
//}

//{ inputs
i_price1 = input.price(0, '#1 (price, bar)', group='Range', inline='price1', confirm=true)
i_time1 = input.time(0, '', group='Range', inline='price1', confirm=true)
i_price2 = input.price(0, '#2 (price, bar)', group='Range', inline='price2', confirm=true)
i_time2 = input.time(0, '', group='Range', inline='price2', confirm=true)

i_trendLineEnabled = input.bool(true, 'Trend line', inline='trendLine')
i_trendLineThickness = input.int(1, '', minval=1, maxval=5, step=1, inline='trendLine')
i_trendLineColor = input.color(color.new(color.gray, 50), '', inline='trendLine')
i_trendLineStyle = input.string('Dashed line', '', options=['Line', 'Dashed line', 'Dotted line'], inline='trendLine')
i_levelsLineThickness = input.int(1, 'Levels line', minval=1, maxval=5, step=1, inline='levelsLine')
i_levelsLineStyle = input.string('Line', '', options=['Line', 'Dashed line', 'Dotted line'], inline='levelsLine')

i_fib1Enabled    = input.bool(true, '', group='Levels', inline='fib1')
i_fib1Multiplier = input.float(0, '', group='Levels', inline='fib1')
i_fib1Color      = input.color(color.gray, '', group='Levels', inline='fib1')
i_fib3Enabled    = input.bool(true, '', group='Levels', inline='fib2')
i_fib3Multiplier = input.float(0.382, '', group='Levels', inline='fib2')
i_fib3Color      = input.color(color.orange, '', group='Levels', inline='fib2')
i_fib5Enabled    = input.bool(true, '', group='Levels', inline='fib3')
i_fib5Multiplier = input.float(0.618, '', group='Levels', inline='fib3')
i_fib5Color      = input.color(color.teal, '', group='Levels', inline='fib3')
i_fib7Enabled    = input.bool(true, '', group='Levels', inline='fib4')
i_fib7Multiplier = input.float(1, '', group='Levels', inline='fib4')
i_fib7Color      = input.color(color.gray, '', group='Levels', inline='fib4')
i_fib9Enabled    = input.bool(true, '', group='Levels', inline='fib5')
i_fib9Multiplier = input.float(2.618, '', group='Levels', inline='fib5')
i_fib9Color      = input.color(color.red, '', group='Levels', inline='fib5')
i_fib11Enabled    = input.bool(false, '', group='Levels', inline='fib6')
i_fib11Multiplier = input.float(4.236, '', group='Levels', inline='fib6')
i_fib11Color      = input.color(color.rgb(251, 64, 164), '', group='Levels', inline='fib6')
i_fib13Enabled    = input.bool(false, '', group='Levels', inline='fib7')
i_fib13Multiplier = input.float(0, '', group='Levels', inline='fib7')
i_fib13Color      = input.color(color.red, '', group='Levels', inline='fib7')
i_fib15Enabled    = input.bool(false, '', group='Levels', inline='fib8')
i_fib15Multiplier = input.float(0, '', group='Levels', inline='fib8')
i_fib15Color      = input.color(color.red, '', group='Levels', inline='fib8')
i_fib17Enabled    = input.bool(false, '', group='Levels', inline='fib9')
i_fib17Multiplier = input.float(0, '', group='Levels', inline='fib9')
i_fib17Color      = input.color(color.red, '', group='Levels', inline='fib9')
i_fib19Enabled    = input.bool(false, '', group='Levels', inline='fib10')
i_fib19Multiplier = input.float(0, '', group='Levels', inline='fib10')
i_fib19Color      = input.color(color.red, '', group='Levels', inline='fib10')
i_fib21Enabled    = input.bool(false, '', group='Levels', inline='fib11')
i_fib21Multiplier = input.float(0, '', group='Levels', inline='fib11')
i_fib21Color      = input.color(color.red, '', group='Levels', inline='fib11')
i_fib23Enabled    = input.bool(false, '', group='Levels', inline='fib12')
i_fib23Multiplier = input.float(0, '', group='Levels', inline='fib12')
i_fib23Color      = input.color(color.red, '', group='Levels', inline='fib12')
i_fib2Enabled    = input.bool(true, '', group='Levels', inline='fib1')
i_fib2Multiplier = input.float(0.236, '', group='Levels', inline='fib1')
i_fib2Color      = input.color(color.red, '', group='Levels', inline='fib1')
i_fib4Enabled    = input.bool(true, '', group='Levels', inline='fib2')
i_fib4Multiplier = input.float(0.5, '', group='Levels', inline='fib2')
i_fib4Color      = input.color(color.green, '', group='Levels', inline='fib2')
i_fib6Enabled    = input.bool(true, '', group='Levels', inline='fib3')
i_fib6Multiplier = input.float(0.786, '', group='Levels', inline='fib3')
i_fib6Color      = input.color(color.rgb(95, 209, 250), '', group='Levels', inline='fib3')
i_fib8Enabled    = input.bool(true, '', group='Levels', inline='fib4')
i_fib8Multiplier = input.float(1.618, '', group='Levels', inline='fib4')
i_fib8Color      = input.color(color.blue, '', group='Levels', inline='fib4')
i_fib10Enabled    = input.bool(false, '', group='Levels', inline='fib5')
i_fib10Multiplier = input.float(3.618, '', group='Levels', inline='fib5')
i_fib10Color      = input.color(color.purple, '', group='Levels', inline='fib5')
i_fib12Enabled    = input.bool(false, '', group='Levels', inline='fib6')
i_fib12Multiplier = input.float(0, '', group='Levels', inline='fib6')
i_fib12Color      = input.color(color.red, '', group='Levels', inline='fib6')
i_fib14Enabled    = input.bool(false, '', group='Levels', inline='fib7')
i_fib14Multiplier = input.float(0, '', group='Levels', inline='fib7')
i_fib14Color      = input.color(color.red, '', group='Levels', inline='fib7')
i_fib16Enabled    = input.bool(false, '', group='Levels', inline='fib8')
i_fib16Multiplier = input.float(0, '', group='Levels', inline='fib8')
i_fib16Color      = input.color(color.red, '', group='Levels', inline='fib8')
i_fib18Enabled    = input.bool(false, '', group='Levels', inline='fib9')
i_fib18Multiplier = input.float(0, '', group='Levels', inline='fib9')
i_fib18Color      = input.color(color.red, '', group='Levels', inline='fib9')
i_fib20Enabled    = input.bool(false, '', group='Levels', inline='fib10')
i_fib20Multiplier = input.float(0, '', group='Levels', inline='fib10')
i_fib20Color      = input.color(color.red, '', group='Levels', inline='fib10')
i_fib22Enabled    = input.bool(false, '', group='Levels', inline='fib11')
i_fib22Multiplier = input.float(0, '', group='Levels', inline='fib11')
i_fib22Color      = input.color(color.red, '', group='Levels', inline='fib11')
i_fib24Enabled    = input.bool(false, '', group='Levels', inline='fib12')
i_fib24Multiplier = input.float(0, '', group='Levels', inline='fib12')
i_fib24Color      = input.color(color.red, '', group='Levels', inline='fib12')

i_labelHasValue = input.bool(true, 'Show Price?', group='Labels')
i_labelHasPercent = input.bool(true, 'Show Percentage?', group='Labels')
i_labelLocation = input.string('Right', 'Location', group='Labels', options=['Left', 'Center', 'Right'])
i_reverseEnabled = input.bool(false, 'Reverse', group='Labels')

i_fib1Note       = input.string('', 'Note 1', group='Labels', inline='fibL1')
i_fib3Note       = input.string('', 'Note 3', group='Labels', inline='fibL2')
i_fib5Note       = input.string('', 'Note 5', group='Labels', inline='fibL3')
i_fib7Note       = input.string('', 'Note 7', group='Labels', inline='fibL4')
i_fib9Note       = input.string('', 'Note 9', group='Labels', inline='fibL5')
i_fib11Note       = input.string('', 'Note 11', group='Labels', inline='fibL6')
i_fib13Note       = input.string('', 'Note 13', group='Labels', inline='fibL7')
i_fib15Note       = input.string('', 'Note 15', group='Labels', inline='fibL8')
i_fib17Note       = input.string('', 'Note 17', group='Labels', inline='fibL9')
i_fib19Note       = input.string('', 'Note 19', group='Labels', inline='fibL10')
i_fib21Note       = input.string('', 'Note 21', group='Labels', inline='fibL11')
i_fib23Note       = input.string('', 'Note 23', group='Labels', inline='fibL12')
i_fib2Note       = input.string('', 'Note 2', group='Labels', inline='fibL1')
i_fib4Note       = input.string('', 'Note 4', group='Labels', inline='fibL2')
i_fib6Note       = input.string('', 'Note 6', group='Labels', inline='fibL3')
i_fib8Note       = input.string('', 'Note 8', group='Labels', inline='fibL4')
i_fib10Note       = input.string('', 'Note 10', group='Labels', inline='fibL5')
i_fib12Note       = input.string('', 'Note 12', group='Labels', inline='fibL6')
i_fib14Note       = input.string('', 'Note 14', group='Labels', inline='fibL7')
i_fib16Note       = input.string('', 'Note 16', group='Labels', inline='fibL8')
i_fib18Note       = input.string('', 'Note 18', group='Labels', inline='fibL9')
i_fib20Note       = input.string('', 'Note 20', group='Labels', inline='fibL10')
i_fib22Note       = input.string('', 'Note 22', group='Labels', inline='fibL11')
i_fib24Note       = input.string('', 'Note 24', group='Labels', inline='fibL12')
//}

//{ funcs
f_lineStyle(_styleSetting) =>
    switch _styleSetting
        'Line' => line.style_solid
        'Dashed line' => line.style_dashed
        'Dotted line' => line.style_dotted

f_highest(_a, _b) => _a > _b ? _a : _b

f_lowest(_a, _b) => _a > _b ? _b : _a

f_range(_a, _b) => 
    v_high = f_highest(_a, _b)
    v_low = f_lowest(_a, _b)
    v_high - v_low

f_rangeMid(_price1, _price2) =>
    v_priceHigh = f_highest(_price1, _price2)
    v_priceHigh - (f_range(_price1, _price2) / 2)

f_fib(n) => i_reverseEnabled ? (i_price2) - ((i_price2 - i_price1) * -n) + (i_price1 - i_price2) : i_price2 - ((i_price2 - i_price1) * n)

f_fibLine(value, color) =>
    var line1 = line.new(0, value, bar_index, value, color=color, style=c_levelsLineStyle, width=c_levelsLineThickness)
    line.set_x2(line1, 0)
    line.set_xloc(line1, i_time2, i_time1, xloc.bar_time)
    line1
    
f_fibLabelText(note, value, multiplier) =>
    var fibText = ''

    if note != ''
        fibText := note
    if i_labelHasValue
        fibText := fibText + (fibText != '' ? " " : "") + str.tostring(value, format.mintick)
    if i_labelHasPercent
        fibText := fibText + (fibText != '' ? " (" : "") + str.tostring(multiplier * 100) + "%" + (fibText != '' ? ")" : "")

    fibText

f_fibLabel(value, txt, color, textColor) => 
    v_time = i_time1 > i_time2 ? i_time1 : i_time2
    v_labelStyle = label.style_label_left

    if i_labelLocation == 'Left'
        v_time := i_time1 > i_time2 ? i_time2 : i_time1
        v_labelStyle := label.style_label_right
    
    if i_labelLocation == 'Center'
        v_time := i_time1 + ((i_time2 - i_time1) / 2)
        v_labelStyle := label.style_label_center

    label.new(v_time, value, txt, textcolor=textColor, color=color, style=v_labelStyle, yloc=yloc.price, xloc=xloc.bar_time)
//}

//{ vars
c_trendLineStyle := f_lineStyle(i_trendLineStyle)
c_levelsLineStyle := f_lineStyle(i_levelsLineStyle)
c_levelsLineThickness := i_levelsLineThickness

var v_highPrice = f_highest(i_price1, i_price2)
var v_priceRange = f_range(i_price1, i_price2)
var v_fib1Value = f_fib(i_fib1Multiplier)
var v_fib2Value = f_fib(i_fib2Multiplier)
var v_fib3Value = f_fib(i_fib3Multiplier)
var v_fib4Value = f_fib(i_fib4Multiplier)
var v_fib5Value = f_fib(i_fib5Multiplier)
var v_fib6Value = f_fib(i_fib6Multiplier)
var v_fib7Value = f_fib(i_fib7Multiplier)
var v_fib8Value = f_fib(i_fib8Multiplier)
var v_fib9Value = f_fib(i_fib9Multiplier)
var v_fib10Value = f_fib(i_fib10Multiplier)
var v_fib11Value = f_fib(i_fib11Multiplier)
var v_fib12Value = f_fib(i_fib12Multiplier)
var v_fib13Value = f_fib(i_fib13Multiplier)
var v_fib14Value = f_fib(i_fib14Multiplier)
var v_fib15Value = f_fib(i_fib15Multiplier)
var v_fib16Value = f_fib(i_fib16Multiplier)
var v_fib17Value = f_fib(i_fib17Multiplier)
var v_fib18Value = f_fib(i_fib18Multiplier)
var v_fib19Value = f_fib(i_fib19Multiplier)
var v_fib20Value = f_fib(i_fib20Multiplier)
var v_fib21Value = f_fib(i_fib21Multiplier)
var v_fib22Value = f_fib(i_fib22Multiplier)
var v_fib23Value = f_fib(i_fib23Multiplier)
var v_fib24Value = f_fib(i_fib24Multiplier)
//}

//{ plots
if i_trendLineEnabled
    var trendLine = line.new(0, i_price1, bar_index, i_price2, color=i_trendLineColor, style=c_trendLineStyle, width=i_trendLineThickness)
    line.set_x2(trendLine, 0)
    line.set_xloc(trendLine, i_time1, i_time2, xloc.bar_time)

var v_fib1Line = i_fib1Enabled ? f_fibLine(v_fib1Value, i_fib1Color) : na
var v_fib2Line = i_fib2Enabled ? f_fibLine(v_fib2Value, i_fib2Color) : na
var v_fib3Line = i_fib3Enabled ? f_fibLine(v_fib3Value, i_fib3Color) : na
var v_fib4Line = i_fib4Enabled ? f_fibLine(v_fib4Value, i_fib4Color) : na
var v_fib5Line = i_fib5Enabled ? f_fibLine(v_fib5Value, i_fib5Color) : na
var v_fib6Line = i_fib6Enabled ? f_fibLine(v_fib6Value, i_fib6Color) : na
var v_fib7Line = i_fib7Enabled ? f_fibLine(v_fib7Value, i_fib7Color) : na
var v_fib8Line = i_fib8Enabled ? f_fibLine(v_fib8Value, i_fib8Color) : na
var v_fib9Line = i_fib9Enabled ? f_fibLine(v_fib9Value, i_fib9Color) : na
var v_fib10Line = i_fib10Enabled ? f_fibLine(v_fib10Value, i_fib10Color) : na
var v_fib11Line = i_fib11Enabled ? f_fibLine(v_fib11Value, i_fib11Color) : na
var v_fib12Line = i_fib12Enabled ? f_fibLine(v_fib12Value, i_fib12Color) : na
var v_fib13Line = i_fib13Enabled ? f_fibLine(v_fib13Value, i_fib13Color) : na
var v_fib14Line = i_fib14Enabled ? f_fibLine(v_fib14Value, i_fib14Color) : na
var v_fib15Line = i_fib15Enabled ? f_fibLine(v_fib15Value, i_fib15Color) : na
var v_fib16Line = i_fib16Enabled ? f_fibLine(v_fib16Value, i_fib16Color) : na
var v_fib17Line = i_fib17Enabled ? f_fibLine(v_fib17Value, i_fib17Color) : na
var v_fib18Line = i_fib18Enabled ? f_fibLine(v_fib18Value, i_fib18Color) : na
var v_fib19Line = i_fib19Enabled ? f_fibLine(v_fib19Value, i_fib19Color) : na
var v_fib20Line = i_fib20Enabled ? f_fibLine(v_fib20Value, i_fib20Color) : na
var v_fib21Line = i_fib21Enabled ? f_fibLine(v_fib21Value, i_fib21Color) : na
var v_fib22Line = i_fib22Enabled ? f_fibLine(v_fib22Value, i_fib22Color) : na
var v_fib23Line = i_fib23Enabled ? f_fibLine(v_fib23Value, i_fib23Color) : na
var v_fib24Line = i_fib24Enabled ? f_fibLine(v_fib24Value, i_fib24Color) : na

var v_fib1Text = f_fibLabelText(i_fib1Note, v_fib1Value, i_fib1Multiplier)
var v_fib2Text = f_fibLabelText(i_fib2Note, v_fib2Value, i_fib2Multiplier)
var v_fib3Text = f_fibLabelText(i_fib3Note, v_fib3Value, i_fib3Multiplier)
var v_fib4Text = f_fibLabelText(i_fib4Note, v_fib4Value, i_fib4Multiplier)
var v_fib5Text = f_fibLabelText(i_fib5Note, v_fib5Value, i_fib5Multiplier)
var v_fib6Text = f_fibLabelText(i_fib6Note, v_fib6Value, i_fib6Multiplier)
var v_fib7Text = f_fibLabelText(i_fib7Note, v_fib7Value, i_fib7Multiplier)
var v_fib8Text = f_fibLabelText(i_fib8Note, v_fib8Value, i_fib8Multiplier)
var v_fib9Text = f_fibLabelText(i_fib9Note, v_fib9Value, i_fib9Multiplier)
var v_fib10Text = f_fibLabelText(i_fib10Note, v_fib10Value, i_fib10Multiplier)
var v_fib11Text = f_fibLabelText(i_fib11Note, v_fib11Value, i_fib11Multiplier)
var v_fib12Text = f_fibLabelText(i_fib12Note, v_fib12Value, i_fib12Multiplier)
var v_fib13Text = f_fibLabelText(i_fib13Note, v_fib13Value, i_fib13Multiplier)
var v_fib14Text = f_fibLabelText(i_fib14Note, v_fib14Value, i_fib14Multiplier)
var v_fib15Text = f_fibLabelText(i_fib15Note, v_fib15Value, i_fib15Multiplier)
var v_fib16Text = f_fibLabelText(i_fib16Note, v_fib16Value, i_fib16Multiplier)
var v_fib17Text = f_fibLabelText(i_fib17Note, v_fib17Value, i_fib17Multiplier)
var v_fib18Text = f_fibLabelText(i_fib18Note, v_fib18Value, i_fib18Multiplier)
var v_fib19Text = f_fibLabelText(i_fib19Note, v_fib19Value, i_fib19Multiplier)
var v_fib20Text = f_fibLabelText(i_fib20Note, v_fib20Value, i_fib20Multiplier)
var v_fib21Text = f_fibLabelText(i_fib21Note, v_fib21Value, i_fib21Multiplier)
var v_fib22Text = f_fibLabelText(i_fib22Note, v_fib22Value, i_fib22Multiplier)
var v_fib23Text = f_fibLabelText(i_fib23Note, v_fib23Value, i_fib23Multiplier)
var v_fib24Text = f_fibLabelText(i_fib24Note, v_fib24Value, i_fib24Multiplier)

var v_fib1Label = i_fib1Enabled ? f_fibLabel(v_fib1Value, v_fib1Text, color.new(color.red, 100), i_fib1Color) : na
var v_fib2Label = i_fib2Enabled ? f_fibLabel(v_fib2Value, v_fib2Text, color.new(color.red, 100), i_fib2Color) : na
var v_fib3Label = i_fib3Enabled ? f_fibLabel(v_fib3Value, v_fib3Text, color.new(color.red, 100), i_fib3Color) : na
var v_fib4Label = i_fib4Enabled ? f_fibLabel(v_fib4Value, v_fib4Text, color.new(color.red, 100), i_fib4Color) : na
var v_fib5Label = i_fib5Enabled ? f_fibLabel(v_fib5Value, v_fib5Text, color.new(color.red, 100), i_fib5Color) : na
var v_fib6Label = i_fib6Enabled ? f_fibLabel(v_fib6Value, v_fib6Text, color.new(color.red, 100), i_fib6Color) : na
var v_fib7Label = i_fib7Enabled ? f_fibLabel(v_fib7Value, v_fib7Text, color.new(color.red, 100), i_fib7Color) : na
var v_fib8Label = i_fib8Enabled ? f_fibLabel(v_fib8Value, v_fib8Text, color.new(color.red, 100), i_fib8Color) : na
var v_fib9Label = i_fib9Enabled ? f_fibLabel(v_fib9Value, v_fib9Text, color.new(color.red, 100), i_fib9Color) : na
var v_fib10Label = i_fib10Enabled ? f_fibLabel(v_fib10Value, v_fib10Text, color.new(color.red, 100), i_fib10Color) : na
var v_fib11Label = i_fib11Enabled ? f_fibLabel(v_fib11Value, v_fib11Text, color.new(color.red, 100), i_fib11Color) : na
var v_fib12Label = i_fib12Enabled ? f_fibLabel(v_fib12Value, v_fib12Text, color.new(color.red, 100), i_fib12Color) : na
var v_fib13Label = i_fib13Enabled ? f_fibLabel(v_fib13Value, v_fib13Text, color.new(color.red, 100), i_fib13Color) : na
var v_fib14Label = i_fib14Enabled ? f_fibLabel(v_fib14Value, v_fib14Text, color.new(color.red, 100), i_fib14Color) : na
var v_fib15Label = i_fib15Enabled ? f_fibLabel(v_fib15Value, v_fib15Text, color.new(color.red, 100), i_fib15Color) : na
var v_fib16Label = i_fib16Enabled ? f_fibLabel(v_fib16Value, v_fib16Text, color.new(color.red, 100), i_fib16Color) : na
var v_fib17Label = i_fib17Enabled ? f_fibLabel(v_fib17Value, v_fib17Text, color.new(color.red, 100), i_fib17Color) : na
var v_fib18Label = i_fib18Enabled ? f_fibLabel(v_fib18Value, v_fib18Text, color.new(color.red, 100), i_fib18Color) : na
var v_fib19Label = i_fib19Enabled ? f_fibLabel(v_fib19Value, v_fib19Text, color.new(color.red, 100), i_fib19Color) : na
var v_fib20Label = i_fib20Enabled ? f_fibLabel(v_fib20Value, v_fib20Text, color.new(color.red, 100), i_fib20Color) : na
var v_fib21Label = i_fib21Enabled ? f_fibLabel(v_fib21Value, v_fib21Text, color.new(color.red, 100), i_fib21Color) : na
var v_fib22Label = i_fib22Enabled ? f_fibLabel(v_fib22Value, v_fib22Text, color.new(color.red, 100), i_fib22Color) : na
var v_fib23Label = i_fib23Enabled ? f_fibLabel(v_fib23Value, v_fib23Text, color.new(color.red, 100), i_fib23Color) : na
var v_fib24Label = i_fib24Enabled ? f_fibLabel(v_fib24Value, v_fib24Text, color.new(color.red, 100), i_fib24Color) : na
//}