Financial Plus
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © faiyaz7283
//@version=5

indicator(title="Financial Plus", shorttitle="Fin-Plus", overlay=true)

// ::Imports:: {

import faiyaz7283/tools/9 as tools
import faiyaz7283/printer/6 as prnt
import faiyaz7283/multidata/7 as mltd

// }

// ::Inputs:: {


var section01 = 'POSITION, SIZE & COLORS'
//---------------------:

var displayLoc = input.string(defval = position.top_right, title = 'Display Location', options = [position.top_left, 
  position.top_center, position.top_right, position.middle_left, position.middle_center, position.middle_right, 
  position.bottom_left, position.bottom_center, position.bottom_right], group = section01)

var cellPad = input.int(defval=2, title='Cell Spacing', minval=0, maxval=5, group=section01)

var orientation = input.string(defval = 'horizontal', title = 'Orientation',  options = ['horizontal', 'vertical'], 
  group = section01) == 'vertical' ? false : true 

var theme = input.string(defval='gray', title = 'Color Theme', options = ['gray', 'blue', 'green', 'orange', 'pink', 
  'purple', 'red', 'white', 'yellow'], inline='theme', group = section01)

var themeTip = 'Select this option to apply a pre-selected color theme. Deselect it to choose custom colors from the options below.'
var useTheme = input.bool(defval=true, title = 'Use Theme Colors', tooltip=themeTip, inline='theme', group=section01)

var headerBgColor = input.color(defval=#d5d9e0, title = 'Header:\tBG', inline = 'hdrCl', group = section01)

var headerColor = input.color(defval=#000000, title = 'Text', inline = 'hdrCl', group = section01)

var headerSize = input.string(defval='hide', title = 'Size', options = ['hide', size.auto, size.tiny, size.small, 
  size.normal, size.large, size.huge], inline = 'hdrCl', group = section01)

var headerAlign = input.string(defval=text.align_center, title = 'Align', 
  options = [text.align_left, text.align_center, text.align_right], inline = 'hdrCl', group = section01)

var titleBgColor = input.color(defval=#bfff7b, title = 'Title:\tBG', inline = 'ttlCl', group = section01)

var titleColor = input.color(defval=#000000, title = 'Text', inline = 'ttlCl', group = section01)

var titleSize = input.string(defval=size.normal, title = 'Size', options = ['hide', size.auto, size.tiny, size.small, 
  size.normal, size.large, size.huge], inline = 'ttlCl', group = section01)

var titleAlign = input.string(defval=text.align_center, title = 'Align', 
  options = [text.align_left, text.align_center, text.align_right], inline = 'ttlCl', group = section01)

var keyBgColor = input.color(defval=#2a2e39, title = 'Key:\tBG', inline = 'keyCl', group = section01)

var keyColor = input.color(defval=#bfff7b, title = 'Text', inline = 'keyCl', group = section01)

var keySize = input.string(defval=size.normal, title = 'Size', options = [size.auto, size.tiny, size.small, 
  size.normal, size.large, size.huge], inline = 'keyCl', group = section01)

var keyAlign = input.string(defval=text.align_left, title = 'Align', 
  options = [text.align_left, text.align_center, text.align_right], inline = 'keyCl', group = section01)

var textBgColor = input.color(defval=#ece8cd, title = 'Value:\tBG', inline = 'txtCl', group = section01)

var textColor = input.color(defval=#000000, title = 'Text', inline = 'txtCl', group = section01)

var textSize = input.string(defval=size.normal, title = 'Size', options = [size.auto, size.tiny, size.small, 
  size.normal, size.large, size.huge], inline = 'txtCl', group = section01)

var textAlign = input.string(defval=text.align_right, title = 'Align', 
  options = [text.align_left, text.align_center, text.align_right], inline = 'txtCl', group = section01)


var section02 = 'DATA DISPLAY'
//----------------------------:

var showStatistics = input.bool(defval = true, title = 'Statistics', inline='dk', group = section02)
var showIncomeStatements = input.bool(defval = true, title = 'Income Statements', inline='dk', group = section02)
var showBalanceSheets = input.bool(defval = true, title = 'Balance Sheets', inline='dk', group = section02)
var showCashFlow = input.bool(defval = true, title = 'Cash Flow', inline='dk', group = section02)

var prdTip1 = 'NOTE: Not all periods are available for all metrics.\n\n'
var prdTip2 = prdTip1 + 'FQ - quarterly\nFY - yearly\nFH - Semiannual\n-TTM - trailing twelve months'
var period = input.string(defval='FY', title='Period', options=['FQ', 'FY', 'FH', 'TTM'], tooltip=prdTip2, 
  inline='period', group=section02)


var section03 = 'STATISTICS'
//----------------------------:

var statistic_id_01 = input.string(defval='ACCRUALS_RATIO', title='01. Financial ID', options=['ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_01', group=section03)

var statistic_id_02 = input.string(defval='---', title='02. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_02', group=section03)

var statistic_id_03 = input.string(defval='---', title='03. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_03', group=section03)

var statistic_id_04 = input.string(defval='---', title='04. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_04', group=section03)

var statistic_id_05 = input.string(defval='---', title='05. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_05', group=section03)

var statistic_id_06 = input.string(defval='---', title='06. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_06', group=section03)

var statistic_id_07 = input.string(defval='---', title='07. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_07', group=section03)

var statistic_id_08 = input.string(defval='---', title='08. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_08', group=section03)

var statistic_id_09 = input.string(defval='---', title='09. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_09', group=section03)

var statistic_id_10 = input.string(defval='---', title='10. Financial ID', options=['---', 'ACCRUALS_RATIO', 'ALTMAN_Z_SCORE', 'ASSET_TURNOVER', 'BENEISH_M_SCORE', 'BUYBACK_YIELD', 'CASH_CONVERSION_CYCLE', 'CASH_TO_DEBT', 'COGS_TO_REVENUE', 'CURRENT_RATIO', 'DAY_SALES_OUT', 'DAYS_INVENT', 'DAYS_PAY', 'DEBT_TO_ASSET', 'DEBT_TO_EBITDA', 'DEBT_TO_EQUITY', 'DEBT_TO_REVENUE', 'DIVIDEND_PAYOUT_RATIO', 'DIVIDENDS_YIELD', 'DPS_COMMON_STOCK_PRIM_ISSUE', 'EARNINGS_ESTIMATE', 'EARNINGS_PER_SHARE_BASIC_ONE_YEAR_GROWTH', 'EARNINGS_PER_SHARE_DILUTED_ONE_YEAR_GROWTH', 'EBITDA_MARGIN', 'EARNINGS_YIELD', 'EFFECTIVE_INTEREST_RATE_ON_DEBT', 'ENTERPRISE_VALUE_EBITDA', 'ENTERPRISE_VALUE', 'EQUITY_TO_ASSET', 'EV_EBIT', 'EV_REVENUE', 'FLOAT_SHARES_OUTSTANDING', 'FREE_CASH_FLOW_MARGIN', 'FULMER_H_FACTOR', 'GOODWILL_TO_ASSET', 'GRAHAM_NUMBERS', 'GROSS_MARGIN', 'GROSS_PROFIT_TO_ASSET', 'INTERST_COVER', 'INVENT_TO_REVENUE', 'INVENT_TURNOVER', 'KZ_INDEX', 'LONG_TERM_DEBT_TO_ASSETS', 'MARKET_CAP', 'NCAVPS_RATIO', 'NET_INCOME_PER_EMPLOYEE', 'NET_MARGIN', 'NUMBER_OF_EMPLOYEES', 'OPERATING_EARNINGS_YIELD', 'OPERATING_MARGIN', 'PEG_RATIO', 'PIOTROSKI_F_SCORE', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_FORWARD', 'PRICE_EARNINGS_RATIO', 'PRICE_SALES_FORWARD', 'PRICE_TO_FREE_CASH_FLOW', 'PRICE_TO_TANGIBLE_BOOK', 'QUALITY_RATIO', 'QUICK_RATIO', 'RESEARCH_AND_DEVELOP_TO_REVENUE', 'RETURN_ON_ASSETS', 'RETURN_ON_EQUITY_ADJUST_TO_BOOK', 'RETURN_ON_EQUITY', 'RETURN_ON_INVESTED_CAPITAL', 'RETURN_ON_TANG_ASSETS', 'RETURN_ON_TANG_EQUITY', 'REVENUE_ONE_YEAR_GROWTH', 'REVENUE_PER_EMPLOYEE', 'SALES_ESTIMATES', 'SHARE_BUYBACK_RATIO', 'SLOAN_RATIO', 'SPRINGATE_SCORE', 'SUSTAINABLE_GROWTH_RATE', 'TANGIBLE_COMMON_EQUITY_RATIO', 'TOBIN_Q_RATIO', 'TOTAL_SHARES_OUTSTANDING', 'ZMIJEWSKI_SCORE'], 
  inline='st_10', group=section03)


var section04 = 'INCOME STATEMENTS'
//----------------------------:

var income_statement_id_01 = input.string(defval='AFTER_TAX_OTHER_INCOME', title='01. Financial ID', options=['AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_01', group=section04)

var income_statement_id_02 = input.string(defval='---', title='02. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_02', group=section04)

var income_statement_id_03 = input.string(defval='---', title='03. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_03', group=section04)

var income_statement_id_04 = input.string(defval='---', title='04. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_04', group=section04)

var income_statement_id_05 = input.string(defval='---', title='05. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_05', group=section04)

var income_statement_id_06 = input.string(defval='---', title='06. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_06', group=section04)

var income_statement_id_07 = input.string(defval='---', title='07. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_07', group=section04)

var income_statement_id_08 = input.string(defval='---', title='08. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_08', group=section04)

var income_statement_id_09 = input.string(defval='---', title='09. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_09', group=section04)

var income_statement_id_10 = input.string(defval='---', title='10. Financial ID', options=['---', 'AFTER_TAX_OTHER_INCOME', 'BASIC_SHARES_OUTSTANDING', 'COST_OF_GOODS_EXCL_DEP_AMORT', 'COST_OF_GOODS', 'DEP_AMORT_EXP_INCOME_S', 'DILUTED_NET_INCOME', 'DILUTED_SHARES_OUTSTANDING', 'DILUTION_ADJUSTMENT', 'DISCONTINUED_OPERATIONS', 'EARNINGS_PER_SHARE_BASIC', 'EARNINGS_PER_SHARE_DILUTED', 'EBIT', 'EBITDA', 'EQUITY_IN_EARNINGS', 'GROSS_PROFIT', 'INCOME_TAX', 'INTEREST_CAPITALIZED', 'INTEREST_EXPENSE_ON_DEBT', 'MINORITY_INTEREST_EXP', 'NET_INCOME_BEF_DISC_OPE', 'NET_INCOME', 'NON_OPER_INCOME', 'NON_OPER_INTEREST_EXP', 'NON_OPER_INTEREST_INCOME', 'OPER_INCOME', 'OPERATING_EXPENSES', 'OTHER_INCOME', 'OTHER_OPER_EXPENSE_TOTAL', 'PREFERRED_DIVIDENDS', 'PRETAX_EQUITY_IN_EARNINGS', 'PRETAX_INCOME', 'RESEARCH_AND_DEV', 'SELL_GEN_ADMIN_EXP_OTHER', 'SELL_GEN_ADMIN_EXP_TOTAL', 'TOTAL_NON_OPER_INCOME', 'TOTAL_OPER_EXPENSE', 'TOTAL_REVENUE', 'UNUSUAL_EXPENSE_INC'], 
  inline='is_10', group=section04)


var section05 = 'BALANCE SHEET'
//----------------------------:

var balance_sheet_id_01 = input.string(defval='ACCOUNTS_PAYABLE', title='01. Financial ID', options=['ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_01', group=section05)

var balance_sheet_id_02 = input.string(defval='---', title='02. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_02', group=section05)

var balance_sheet_id_03 = input.string(defval='---', title='03. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_03', group=section05)

var balance_sheet_id_04 = input.string(defval='---', title='04. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_04', group=section05)

var balance_sheet_id_05 = input.string(defval='---', title='05. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_05', group=section05)

var balance_sheet_id_06 = input.string(defval='---', title='06. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_06', group=section05)

var balance_sheet_id_07 = input.string(defval='---', title='07. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_07', group=section05)

var balance_sheet_id_08 = input.string(defval='---', title='08. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_08', group=section05)

var balance_sheet_id_09 = input.string(defval='---', title='09. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_09', group=section05)

var balance_sheet_id_10 = input.string(defval='---', title='10. Financial ID', options=['---', 'ACCOUNTS_PAYABLE', 'ACCOUNTS_RECEIVABLES_NET', 'ACCRUED_PAYROLL', 'ACCUM_DEPREC_TOTAL', 'ADDITIONAL_PAID_IN_CAPITAL', 'BOOK_TANGIBLE_PER_SHARE', 'BOOK_VALUE_PER_SHARE', 'CAPITAL_LEASE_OBLIGATIONS', 'CAPITAL_OPERATING_LEASE_OBLIGATIONS', 'CASH_N_EQUIVALENTS', 'CASH_N_SHORT_TERM_INVEST', 'COMMON_EQUITY_TOTAL', 'COMMON_STOCK_PAR', 'CURRENT_PORT_DEBT_CAPITAL_LEASES', 'DEFERRED_INCOME_CURRENT', 'DEFERRED_INCOME_NON_CURRENT', 'DEFERRED_TAX_ASSESTS', 'DEFERRED_TAX_LIABILITIES', 'DIVIDENDS_PAYABLE', 'GOODWILL', 'INCOME_TAX_PAYABLE', 'INTANGIBLES_NET', 'INVENTORY_FINISHED_GOODS', 'INVENTORY_PROGRESS_PAYMENTS', 'INVENTORY_RAW_MATERIALS', 'INVENTORY_WORK_IN_PROGRESS', 'INVESTMENTS_IN_UNCONCSOLIDATE', 'LONG_TERM_DEBT_EXCL_CAPITAL_LEASE', 'LONG_TERM_DEBT', 'LONG_TERM_INVESTMENTS', 'LONG_TERM_NOTE_RECEIVABLE', 'LONG_TERM_OTHER_ASSETS_TOTAL', 'MINORITY_INTEREST', 'NOTES_PAYABLE_SHORT_TERM_DEBT', 'OPERATING_LEASE_LIABILITIES', 'OTHER_COMMON_EQUITY', 'OTHER_CURRENT_ASSETS_TOTAL', 'OTHER_CURRENT_LIABILITIES', 'OTHER_INTANGIBLES_NET', 'OTHER_INVESTMENTS', 'OTHER_LIABILITIES_TOTAL', 'OTHER_RECEIVABLES', 'OTHER_SHORT_TERM_DEBT', 'PAID_IN_CAPITAL', 'PPE_TOTAL_GROSS', 'PPE_TOTAL_NET', 'PREFERRED_STOCK_CARRYING_VALUE', 'PREPAID_EXPENSES', 'PROVISION_F_RISKS', 'RETAINED_EARNINGS', 'SHORT_TERM_DEBT_EXCL_CURRENT_PORT', 'SHORT_TERM_DEBT', 'SHORT_TERM_INVEST', 'SHRHLDRS_EQUITY', 'TOTAL_ASSETS', 'TOTAL_CURRENT_ASSETS', 'TOTAL_CURRENT_LIABILITIES', 'TOTAL_DEBT', 'TOTAL_EQUITY', 'TOTAL_INVENTORY', 'TOTAL_LIABILITIES', 'TOTAL_LIABILITIES_SHRHLDRS_EQUITY', 'TOTAL_NON_CURRENT_ASSETS', 'TOTAL_NON_CURRENT_LIABILITIES', 'TOTAL_RECEIVABLES_NET', 'TREASURY_STOCK_COMMON'], 
  inline='bs_10', group=section05)



var section06 = 'CASH FLOW'
//----------------------------:

var cash_flow_id_01 = input.string(defval='AMORTIZATION', title='01. Financial ID', options=['AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_01', group=section06)

var cash_flow_id_02 = input.string(defval='---', title='02. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_02', group=section06)

var cash_flow_id_03 = input.string(defval='---', title='03. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_03', group=section06)

var cash_flow_id_04 = input.string(defval='---', title='04. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_04', group=section06)

var cash_flow_id_05 = input.string(defval='---', title='05. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_05', group=section06)

var cash_flow_id_06 = input.string(defval='---', title='06. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_06', group=section06)

var cash_flow_id_07 = input.string(defval='---', title='07. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_07', group=section06)

var cash_flow_id_08 = input.string(defval='---', title='08. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_08', group=section06)

var cash_flow_id_09 = input.string(defval='---', title='09. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_09', group=section06)

var cash_flow_id_10 = input.string(defval='---', title='10. Financial ID', options=['---', 'AMORTIZATION', 'CAPITAL_EXPENDITURES_FIXED_ASSETS', 'CAPITAL_EXPENDITURES', 'CAPITAL_EXPENDITURES_OTHER_ASSETS', 'CASH_F_FINANCING_ACTIVITIES', 'CASH_F_INVESTING_ACTIVITIES', 'CASH_F_OPERATING_ACTIVITIES', 'CASH_FLOW_DEFERRED_TAXES', 'CASH_FLOW_DEPRECATION_N_AMORTIZATION', 'CHANGE_IN_ACCOUNTS_PAYABLE', 'CHANGE_IN_ACCOUNTS_RECEIVABLE', 'CHANGE_IN_ACCRUED_EXPENSES', 'CHANGE_IN_INVENTORIES', 'CHANGE_IN_OTHER_ASSETS', 'CHANGE_IN_TAXES_PAYABLE', 'CHANGES_IN_WORKING_CAPITAL', 'COMMON_DIVIDENDS_CASH_FLOW', 'DEPRECIATION_DEPLETION', 'FREE_CASH_FLOW', 'FUNDS_F_OPERATIONS', 'ISSUANCE_OF_DEBT_NET', 'ISSUANCE_OF_LONG_TERM_DEBT', 'ISSUANCE_OF_OTHER_DEBT', 'ISSUANCE_OF_SHORT_TERM_DEBT', 'ISSUANCE_OF_STOCK_NET', 'NET_INCOME_STARTING_LINE', 'NON_CASH_ITEMS', 'OTHER_FINANCING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_FINANCING_CASH_FLOW_SOURCES', 'OTHER_FINANCING_CASH_FLOW_USES', 'OTHER_INVESTING_CASH_FLOW_ITEMS_TOTAL', 'OTHER_INVESTING_CASH_FLOW_SOURCES', 'OTHER_INVESTING_CASH_FLOW_USES', 'PREFERRED_DIVIDENDS_CASH_FLOW', 'PURCHASE_OF_BUSINESS', 'PURCHASE_OF_INVESTMENTS', 'PURCHASE_OF_STOCK', 'PURCHASE_SALE_BUSINESS', 'PURCHASE_SALE_INVESTMENTS', 'REDUCTION_OF_LONG_TERM_DEBT', 'SALE_OF_STOCK', 'SALES_OF_BUSINESS', 'SALES_OF_INVESTMENTS', 'SUPPLYING_OF_LONG_TERM_DEBT', 'TOTAL_CASH_DIVIDENDS_PAID'], 
  inline='cf_10', group=section06)


// ::Functions:: {

// 'MARKET_CAP', 'EARNINGS_YIELD', 'PRICE_BOOK_RATIO', 'PRICE_EARNINGS_RATIO'

getPeriod() =>
    switch period
        'FQ' => 'Quaterly'
        'FY' => 'Yearly'
        'FH' => 'Semiannual'
        'TTM' => 'Trailing 12 Months'

getFinKv(financial_id, period, stats=false) =>
    _fID = switch financial_id
        'MARKET_CAP' => 'TOTAL_SHARES_OUTSTANDING'
        'EARNINGS_YIELD' => 'EARNINGS_PER_SHARE'
        'PRICE_BOOK_RATIO' => 'BOOK_VALUE_PER_SHARE'
        'PRICE_EARNINGS_RATIO' => 'EARNINGS_PER_SHARE'
        => financial_id

    data = request.financial(syminfo.tickerid, _fID, period, ignore_invalid_symbol=true, currency=syminfo.currency)

    data := switch financial_id
        'MARKET_CAP' => data * close
        'EARNINGS_YIELD' => (data / close) * 100
        'PRICE_BOOK_RATIO' => close / data
        'PRICE_EARNINGS_RATIO' => close / data
        => data

    format = na(data) ? '-' : (data != 0 ? tools.numCompact(data) : na)
    if stats and not na(data)
        format := switch financial_id
            'ACCRUALS_RATIO' => tools.numCompact(data)
            'ENTERPRISE_VALUE' => tools.numCompact(data)
            'FLOAT_SHARES_OUTSTANDING' => tools.numCompact(data)
            'MARKET_CAP' => tools.numCompact(data)
            'NET_INCOME_PER_EMPLOYEE' => tools.numCompact(data)
            'NUMBER_OF_EMPLOYEES' => tools.numCompact(data)
            'REVENUE_PER_EMPLOYEE' => tools.numCompact(data)
            'SALES_ESTIMATES' => tools.numCompact(data)
            'TOTAL_SHARES_OUTSTANDING' => tools.numCompact(data)
            => '{0,number,#.###}'

    mltd.kv(str.replace_all(financial_id, '_', ' '), data, format=format)

// }

if barstate.islast
    tbs = prnt.tableStyle.new(borderWidth=cellPad)

    // Initialize the printer
    header = headerSize != 'hide' ? 'Financial Plus' + (titleSize == 'hide' ? str.format(' - {0}',getPeriod()) : na) : na
    printer = prnt.printer(header=header, tableStyle=tbs, stack=orientation, loc=displayLoc, 
      theme=(useTheme ? theme : na), gutterStyle=prnt.gutterStyle.new(true))
    printer.tableStyle.frameColor := na

    // Styles
    printer.headerStyle.textHalign := headerAlign
    printer.headerStyle.textSize := headerSize
    printer.titleStyle.textHalign := titleAlign
    printer.titleStyle.textSize := titleSize
    printer.keyCellStyle.textHalign := keyAlign
    printer.keyCellStyle.textSize := keySize
    printer.cellStyle.textHalign := textAlign
    printer.cellStyle.textSize := textSize

    if not useTheme
        printer.headerStyle.bgColor := headerBgColor
        printer.headerStyle.textColor := headerColor
        printer.titleStyle.bgColor := titleBgColor
        printer.titleStyle.textColor := titleColor
        printer.cellStyle.bgColor := textBgColor
        printer.cellStyle.textColor := textColor
        printer.keyCellStyle.bgColor := keyBgColor
        printer.keyCellStyle.textColor := keyColor

    // ::Data:: {
    statistics = array.new<mltd.kv>()
    incomeStatements = array.new<mltd.kv>()
    balanceSheet = array.new<mltd.kv>()
    cashFlow = array.new<mltd.kv>()

    // Statistics
    if tools._bool(showStatistics)
        statistics.push(getFinKv(statistic_id_01, period, true))

        if statistic_id_02 != '---'
            statistics.push(getFinKv(statistic_id_02, period, true))

        if statistic_id_03 != '---'
            statistics.push(getFinKv(statistic_id_03, period, true))

        if statistic_id_04 != '---'
            statistics.push(getFinKv(statistic_id_04, period, true))

        if statistic_id_05 != '---'
            statistics.push(getFinKv(statistic_id_05, period, true))

        if statistic_id_06 != '---'
            statistics.push(getFinKv(statistic_id_06, period, true))

        if statistic_id_07 != '---'
            statistics.push(getFinKv(statistic_id_07, period, true))

        if statistic_id_08 != '---'
            statistics.push(getFinKv(statistic_id_08, period, true))

        if statistic_id_09 != '---'
            statistics.push(getFinKv(statistic_id_09, period, true))

        if statistic_id_10 != '---'
            statistics.push(getFinKv(statistic_id_10, period, true))

        if statistics.size() > 0
            d2dStatistics = mltd.data2d(statistics)
            printer.print(d2dStatistics, title=(titleSize != 'hide' ? getPeriod() + ' Statistics' : na))

    // Income Statements
    if tools._bool(showIncomeStatements)
        incomeStatements.push(getFinKv(income_statement_id_01, period))

        if income_statement_id_02 != '---'
            incomeStatements.push(getFinKv(income_statement_id_02, period))

        if income_statement_id_03 != '---'
            incomeStatements.push(getFinKv(income_statement_id_03, period))

        if income_statement_id_04 != '---'
            incomeStatements.push(getFinKv(income_statement_id_04, period))

        if income_statement_id_05 != '---'
            incomeStatements.push(getFinKv(income_statement_id_05, period))

        if income_statement_id_06 != '---'
            incomeStatements.push(getFinKv(income_statement_id_06, period))

        if income_statement_id_07 != '---'
            incomeStatements.push(getFinKv(income_statement_id_07, period))

        if income_statement_id_08 != '---'
            incomeStatements.push(getFinKv(income_statement_id_08, period))

        if income_statement_id_09 != '---'
            incomeStatements.push(getFinKv(income_statement_id_09, period))

        if income_statement_id_10 != '---'
            incomeStatements.push(getFinKv(income_statement_id_10, period))

        if incomeStatements.size() > 0
            d2dIncomeStatements = mltd.data2d(incomeStatements)
            printer.print(d2dIncomeStatements, title=(titleSize != 'hide' ? getPeriod() + ' Income Statements' : na))

    // Balance Sheet
    if tools._bool(showBalanceSheets)
        balanceSheet.push(getFinKv(balance_sheet_id_01, period))

        if balance_sheet_id_02 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_02, period))

        if balance_sheet_id_03 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_03, period))

        if balance_sheet_id_04 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_04, period))

        if balance_sheet_id_05 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_05, period))

        if balance_sheet_id_06 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_06, period))

        if balance_sheet_id_07 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_07, period))

        if balance_sheet_id_08 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_08, period))

        if balance_sheet_id_09 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_09, period))

        if balance_sheet_id_10 != '---'
            balanceSheet.push(getFinKv(balance_sheet_id_10, period))

        if balanceSheet.size() > 0
            d2dBalanceSheet = mltd.data2d(balanceSheet)
            printer.print(d2dBalanceSheet, title=(titleSize != 'hide' ? getPeriod() + ' Balance Sheet' : na))

    // Cash Flow
    if tools._bool(showCashFlow)
        cashFlow.push(getFinKv(cash_flow_id_01, period))

        if cash_flow_id_02 != '---'
            cashFlow.push(getFinKv(cash_flow_id_02, period))

        if cash_flow_id_03 != '---'
            cashFlow.push(getFinKv(cash_flow_id_03, period))

        if cash_flow_id_04 != '---'
            cashFlow.push(getFinKv(cash_flow_id_04, period))

        if cash_flow_id_05 != '---'
            cashFlow.push(getFinKv(cash_flow_id_05, period))

        if cash_flow_id_06 != '---'
            cashFlow.push(getFinKv(cash_flow_id_06, period))

        if cash_flow_id_07 != '---'
            cashFlow.push(getFinKv(cash_flow_id_07, period))

        if cash_flow_id_08 != '---'
            cashFlow.push(getFinKv(cash_flow_id_08, period))

        if cash_flow_id_09 != '---'
            cashFlow.push(getFinKv(cash_flow_id_09, period))

        if cash_flow_id_10 != '---'
            cashFlow.push(getFinKv(cash_flow_id_10, period))
        
        if cashFlow.size() > 0
            d2dCashFlow = mltd.data2d(cashFlow)
            printer.print(d2dCashFlow, title=(titleSize != 'hide' ? getPeriod() + ' Cash Flow' : na))
