Scenario Close Price [Skiploss]
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Skiploss

//@version=5
indicator("Scenario Close Price [Skiploss]", shorttitle = "SCP v0.77", overlay = true)

// Input basic info
string  no_of_entry   = input.string("ONE", "NOE", options = ["ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN"], tooltip = "Number of your entry", group = 'Basic Info')
float   contract_size = input.float(100, "Contract Size", options = [10, 100, 1000, 10000, 100000], tooltip = "You can find details on MetaTrader, Ctrader, or your broker.", group = 'Basic Info')

// Input scenario close price
string input_bias   = input.string("LONG", "BIAS", options = ["LONG", "SHORT"], tooltip = "Bias Long or Short position", group = 'Scenario Price')
float input_price_scenario  = input.price(0, "Close Price", tooltip = "Please select the scenario price.", confirm = true, group = 'Scenario Price')

// Input entry and sizing
float input_price_entry_i   = input.price(0, "Entry", tooltip = "Please select the 1st entry.", confirm = true, group = '1st Entry')
float input_price_sizing_i  = input.float(0.01, "Lots size", minval = 0.01, group = '1st Entry')

float input_price_entry_ii  = input.price(0, "Entry", tooltip = "Please select the 2nd entry.", confirm = true, group = '2nd Entry')
float input_price_sizing_ii  = input.float(0.01, "Lots size", minval = 0.01, group = '2nd Entry')

float input_price_entry_iii = input.price(0, "Entry", tooltip = "Please select the 3rd entry.", confirm = true, group = '3rd Entry')
float input_price_sizing_iii  = input.float(0.01, "Lots size", minval = 0.01, group = '3rd Entry')

float input_price_entry_iv  = input.price(0, "Entry", tooltip = "Please select the 4th entry.", confirm = true, group = '4th Entry')
float input_price_sizing_iv  = input.float(0.01, "Lots size", minval = 0.01, group = '4th Entry')

float input_price_entry_v   = input.price(0, "Entry", tooltip = "Please select the 5th entry.", confirm = true, group = '5th Entry')
float input_price_sizing_v  = input.float(0.01, "Lots size", minval = 0.01, group = '5th Entry')

float input_price_entry_vi  = input.price(0, "Entry", tooltip = "Please select the 6th entry.", confirm = true, group = '6th Entry')
float input_price_sizing_vi  = input.float(0.01, "Lots size", minval = 0.01, group = '6th Entry')

float input_price_entry_vii = input.price(0, "Entry", tooltip = "Please select the 7th entry.", confirm = true, group = '7th Entry')
float input_price_sizing_vii  = input.float(0.01, "Lots size", minval = 0.01, group = '7th Entry')

// Style Setting
color_price_entry = input(#8ebbff, 'Price Entry', group = 'Style Settings')
color_price_scenario = input(#ffff00, 'Scenario Price', group = 'Style Settings')
color_text = input(#93959f, 'Texts', group = 'Style Settings')
dashboard_location  =   input.session("Top Right",  "Dashboard Location",   options = ["Top Right","Bottom Right","Top Left","Bottom Left", "Middle Right","Bottom Center"], group = 'Style Settings')
dashboard_text_size =   input.session(     'Normal',      "Dashboard Size",   options = ["Tiny","Small","Normal","Large"], group = 'Style Settings')

// Plot line entry
if no_of_entry == "ONE"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

if no_of_entry == "TWO"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

if no_of_entry == "THREE"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

    line_price_entry_iii    = line.new(bar_index - 5 , input_price_entry_iii, bar_index + 20 , input_price_entry_iii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iii[1])
    label_price_entry_iii   = label.new(bar_index + 27,  input_price_entry_iii, text =  "Entry III (" + str.tostring(input_price_entry_iii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iii[1])

if no_of_entry == "FOUR"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

    line_price_entry_iii    = line.new(bar_index - 5 , input_price_entry_iii, bar_index + 20 , input_price_entry_iii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iii[1])
    label_price_entry_iii   = label.new(bar_index + 27,  input_price_entry_iii, text =  "Entry III (" + str.tostring(input_price_entry_iii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iii[1])

    line_price_entry_iv    = line.new(bar_index - 5 , input_price_entry_iv, bar_index + 20 , input_price_entry_iv, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iv[1])
    label_price_entry_iv   = label.new(bar_index + 27,  input_price_entry_iv, text =  "Entry IV (" + str.tostring(input_price_entry_iv, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iv[1])

if no_of_entry == "FIVE"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

    line_price_entry_iii    = line.new(bar_index - 5 , input_price_entry_iii, bar_index + 20 , input_price_entry_iii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iii[1])
    label_price_entry_iii   = label.new(bar_index + 27,  input_price_entry_iii, text =  "Entry III (" + str.tostring(input_price_entry_iii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iii[1])

    line_price_entry_iv    = line.new(bar_index - 5 , input_price_entry_iv, bar_index + 20 , input_price_entry_iv, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iv[1])
    label_price_entry_iv   = label.new(bar_index + 27,  input_price_entry_iv, text =  "Entry IV (" + str.tostring(input_price_entry_iv, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iv[1])

    line_price_entry_v    = line.new(bar_index - 5 , input_price_entry_v, bar_index + 20 , input_price_entry_v, color = color_price_entry, width = 1)
    line.delete(line_price_entry_v[1])
    label_price_entry_v   = label.new(bar_index + 27,  input_price_entry_v, text =  "Entry V (" + str.tostring(input_price_entry_v, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_v[1])

if no_of_entry == "SIX"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

    line_price_entry_iii    = line.new(bar_index - 5 , input_price_entry_iii, bar_index + 20 , input_price_entry_iii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iii[1])
    label_price_entry_iii   = label.new(bar_index + 27,  input_price_entry_iii, text =  "Entry III (" + str.tostring(input_price_entry_iii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iii[1])

    line_price_entry_iv    = line.new(bar_index - 5 , input_price_entry_iv, bar_index + 20 , input_price_entry_iv, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iv[1])
    label_price_entry_iv   = label.new(bar_index + 27,  input_price_entry_iv, text =  "Entry IV (" + str.tostring(input_price_entry_iv, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iv[1])

    line_price_entry_v    = line.new(bar_index - 5 , input_price_entry_v, bar_index + 20 , input_price_entry_v, color = color_price_entry, width = 1)
    line.delete(line_price_entry_v[1])
    label_price_entry_v   = label.new(bar_index + 27,  input_price_entry_v, text =  "Entry V (" + str.tostring(input_price_entry_v, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_v[1])

    line_price_entry_vi    = line.new(bar_index - 5 , input_price_entry_vi, bar_index + 20 , input_price_entry_vi, color = color_price_entry, width = 1)
    line.delete(line_price_entry_vi[1])
    label_price_entry_vi   = label.new(bar_index + 27,  input_price_entry_vi, text =  "Entry VI (" + str.tostring(input_price_entry_vi, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_vi[1])

if no_of_entry == "SEVEN"

    line_price_entry_i    = line.new(bar_index - 5 , input_price_entry_i, bar_index + 20 , input_price_entry_i, color = color_price_entry, width = 1)
    line.delete(line_price_entry_i[1])
    label_price_entry_i   = label.new(bar_index + 27,  input_price_entry_i, text =  "Entry I (" + str.tostring(input_price_entry_i, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_i[1])

    line_price_entry_ii    = line.new(bar_index - 5 , input_price_entry_ii, bar_index + 20 , input_price_entry_ii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_ii[1])
    label_price_entry_ii   = label.new(bar_index + 27,  input_price_entry_ii, text =  "Entry II (" + str.tostring(input_price_entry_ii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_ii[1])

    line_price_entry_iii    = line.new(bar_index - 5 , input_price_entry_iii, bar_index + 20 , input_price_entry_iii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iii[1])
    label_price_entry_iii   = label.new(bar_index + 27,  input_price_entry_iii, text =  "Entry III (" + str.tostring(input_price_entry_iii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iii[1])

    line_price_entry_iv    = line.new(bar_index - 5 , input_price_entry_iv, bar_index + 20 , input_price_entry_iv, color = color_price_entry, width = 1)
    line.delete(line_price_entry_iv[1])
    label_price_entry_iv   = label.new(bar_index + 27,  input_price_entry_iv, text =  "Entry IV (" + str.tostring(input_price_entry_iv, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_iv[1])

    line_price_entry_v    = line.new(bar_index - 5 , input_price_entry_v, bar_index + 20 , input_price_entry_v, color = color_price_entry, width = 1)
    line.delete(line_price_entry_v[1])
    label_price_entry_v   = label.new(bar_index + 27,  input_price_entry_v, text =  "Entry V (" + str.tostring(input_price_entry_v, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_v[1])

    line_price_entry_vi    = line.new(bar_index - 5 , input_price_entry_vi, bar_index + 20 , input_price_entry_vi, color = color_price_entry, width = 1)
    line.delete(line_price_entry_vi[1])
    label_price_entry_vi   = label.new(bar_index + 27,  input_price_entry_vi, text =  "Entry VI (" + str.tostring(input_price_entry_vi, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_vi[1])

    line_price_entry_vii    = line.new(bar_index - 5 , input_price_entry_vii, bar_index + 20 , input_price_entry_vii, color = color_price_entry, width = 1)
    line.delete(line_price_entry_vii[1])
    label_price_entry_vii   = label.new(bar_index + 27,  input_price_entry_vii, text =  "Entry VII (" + str.tostring(input_price_entry_vii, format.mintick) + ")", style = label.style_none, textcolor = color_price_entry)
    label.delete(label_price_entry_vii[1])

// Plot scenario close price

line_price_scenario    = line.new(bar_index - 5 , input_price_scenario, bar_index + 20 , input_price_scenario, color = color_price_scenario, width = 1)
line.delete(line_price_scenario[1])
label_price_scenario   = label.new(bar_index + 27,  input_price_scenario, text =  "Scenario Close (" + str.tostring(input_price_scenario, format.mintick) + ")", style = label.style_none, textcolor = color_price_scenario)
label.delete(label_price_scenario[1])

// Round values
float price_scenario = math.round_to_mintick(input_price_scenario)
float price_entry_i = math.round_to_mintick(input_price_entry_i)
float price_entry_ii = math.round_to_mintick(input_price_entry_ii)
float price_entry_iii = math.round_to_mintick(input_price_entry_iii)
float price_entry_iv = math.round_to_mintick(input_price_entry_iv)
float price_entry_v = math.round_to_mintick(input_price_entry_v)
float price_entry_vi = math.round_to_mintick(input_price_entry_vi)
float price_entry_vii = math.round_to_mintick(input_price_entry_vii)

// Dashboard Start
var table_position  =   dashboard_location  == 'Top Left' ? position.top_left :
  dashboard_location == 'Bottom Left'   ? position.bottom_left :
  dashboard_location == 'Middle Right'  ? position.middle_right :
  dashboard_location == 'Bottom Center' ? position.bottom_center :
  dashboard_location == 'Top Right'     ? position.top_right : position.bottom_right

var table_text_size  = dashboard_text_size == 'Tiny' ? size.tiny :
  dashboard_text_size == 'Small' ? size.small :
  dashboard_text_size == 'Normal' ? size.normal : size.large

var table_one = table.new(table_position, 7, 5, frame_color = color.new(color_price_entry,80), frame_width = 1)
if barstate.islast
    // 1st Row
    table.cell(table_one, 0, 0, str.replace_all(syminfo.tickerid, syminfo.prefix + ":", ''), text_color = color_price_scenario, text_size=table_text_size, bgcolor = na)
    table.cell(table_one, 1, 0,  " " + str.tostring(close, format.mintick), text_color = color.new(close > close[1] ? color_price_entry : color_price_scenario , 0),text_size=table_text_size, bgcolor = na)
    // 2nd Row
    table.cell(table_one, 0, 1, 'Sigma Lots', text_color = color_text, text_size=table_text_size, bgcolor = color.new(color_price_entry,90))
    table.cell(table_one, 1, 1, 'Scenario Gain', text_color = color_text, text_size=table_text_size, bgcolor = color.new(color_price_entry,90))
    // 3rd 
    table.cell(table_one, 0, 2, str.tostring(no_of_entry == "ONE" ? input_price_sizing_i : no_of_entry == "TWO" ? input_price_sizing_i + input_price_sizing_ii : no_of_entry == "THREE" ? input_price_sizing_i + input_price_sizing_ii + input_price_sizing_iii : no_of_entry == "FOUR" ? input_price_sizing_i + input_price_sizing_ii + input_price_sizing_iii + input_price_sizing_iv : no_of_entry == "FIVE" ? input_price_sizing_i + input_price_sizing_ii + input_price_sizing_iii + input_price_sizing_iv + input_price_sizing_v : no_of_entry == "SIX" ? input_price_sizing_i + input_price_sizing_ii + input_price_sizing_iii + input_price_sizing_iv + input_price_sizing_v + input_price_sizing_vi : input_price_sizing_i + input_price_sizing_ii + input_price_sizing_iii + input_price_sizing_iv + input_price_sizing_v + input_price_sizing_vi + input_price_sizing_vii, '#.##'), text_color = color_text, text_size=table_text_size, bgcolor = na)
    table.cell(table_one, 1, 2, str.tostring(no_of_entry == "ONE" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i : no_of_entry == "TWO" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii : no_of_entry == "THREE" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii + (( price_scenario - input_price_entry_iii ) * contract_size) * input_price_sizing_iii : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii + (( price_entry_iii - price_scenario ) * contract_size) * input_price_sizing_iii : no_of_entry == "FOUR" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii + (( price_scenario - input_price_entry_iii ) * contract_size) * input_price_sizing_iii + (( price_scenario - input_price_entry_iv ) * contract_size) * input_price_sizing_iv : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii + (( price_entry_iii - price_scenario ) * contract_size) * input_price_sizing_iii + (( price_entry_iv - price_scenario ) * contract_size) * input_price_sizing_iv : no_of_entry == "FIVE" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii + (( price_scenario - input_price_entry_iii ) * contract_size) * input_price_sizing_iii + (( price_scenario - input_price_entry_iv ) * contract_size) * input_price_sizing_iv + (( price_scenario - input_price_entry_v ) * contract_size) * input_price_sizing_v : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii + (( price_entry_iii - price_scenario ) * contract_size) * input_price_sizing_iii + (( price_entry_iv - price_scenario ) * contract_size) * input_price_sizing_iv + (( price_entry_v - price_scenario ) * contract_size) * input_price_sizing_v : no_of_entry == "SIX" ? input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii + (( price_scenario - input_price_entry_iii ) * contract_size) * input_price_sizing_iii + (( price_scenario - input_price_entry_iv ) * contract_size) * input_price_sizing_iv + (( price_scenario - input_price_entry_v ) * contract_size) * input_price_sizing_v + (( price_scenario - input_price_entry_vi ) * contract_size) * input_price_sizing_vi : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii + (( price_entry_iii - price_scenario ) * contract_size) * input_price_sizing_iii + (( price_entry_iv - price_scenario ) * contract_size) * input_price_sizing_iv + (( price_entry_v - price_scenario ) * contract_size) * input_price_sizing_v + (( price_entry_vi - price_scenario ) * contract_size) * input_price_sizing_vi : input_bias == "LONG" ? (( price_scenario - input_price_entry_i ) * contract_size) * input_price_sizing_i + (( price_scenario - input_price_entry_ii ) * contract_size) * input_price_sizing_ii + (( price_scenario - input_price_entry_iii ) * contract_size) * input_price_sizing_iii + (( price_scenario - input_price_entry_iv ) * contract_size) * input_price_sizing_iv + (( price_scenario - input_price_entry_v ) * contract_size) * input_price_sizing_v + (( price_scenario - input_price_entry_vi ) * contract_size) * input_price_sizing_vi + (( price_scenario - input_price_entry_vii ) * contract_size) * input_price_sizing_vii : (( price_entry_i - price_scenario ) * contract_size) * input_price_sizing_i + (( price_entry_ii - price_scenario ) * contract_size) * input_price_sizing_ii + (( price_entry_iii - price_scenario ) * contract_size) * input_price_sizing_iii + (( price_entry_iv - price_scenario ) * contract_size) * input_price_sizing_iv + (( price_entry_v - price_scenario ) * contract_size) * input_price_sizing_v + (( price_entry_vi - price_scenario ) * contract_size) * input_price_sizing_vi + (( price_entry_vii - price_scenario ) * contract_size) * input_price_sizing_vii, '#.##'), text_color = color_text, text_size=table_text_size, bgcolor = na)

