Gann Pivot HL 2024-V2.ps
Copy
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © congacindy
//@version=5
indicator("Gann Pivot HL 2024-V2", overlay = true)
// Inputs
leftBars = input.int(8, "Left Bars", minval=1)
rightBars = input.int(8, "Right Bars", minval=1)
nswing = input.int(8, "Number of Swing? Display", minval=1)
nStore= input.int(10, "Number of Swing?", minval=1)
trim_date = input.bool(true, "Trim Future Dates?")
nDatePast = input.int(45, "Number of Days in the past to display?", minval=1)
nDateFuture= input.int(90, "Number of Days in the future to display?", minval=1)
nNearFuture= input.int(21, "Number of Days in the future to change color?", minval=1)
// Get swing high and low
pivotHigh = ta.pivothigh(high, leftBars, rightBars)
pivotLow = ta.pivotlow(low, leftBars, rightBars)
txt_col_bear = input.color(color.rgb(76, 244, 169), 'Text/Frame Color', group='Dashboard')
txt_col_bull = input.color(color.rgb(228, 95, 235), 'Text/Frame Color', group='Dashboard')
txt_col = input.color(color.rgb(182, 186, 200), 'Text/Frame Color', group='Dashboard')
dash_loc_high = input.string('Top Right', 'Dashboard Location for SwingHigh', options=['Top Right', 'Bottom Right', 'Top Left', 'Mid Left', 'Mid Right'], group='Dashboard')
dash_loc_low = input.string('Bottom Right', 'Dashboard Location for SwingLow', options=['Top Right', 'Bottom Right', 'Top Left', 'Mid Left', 'Mid Right'], group='Dashboard')
dash_loc_extra = input.string('Mid Left', 'Dashboard Location for Soltice ...', options=['Top Right', 'Bottom Right', 'Bottom Left', 'Top Left', 'Mid Left', 'Mid Right'], group='Dashboard')
text_size = input.string('Tiny', 'Dashboard Size', options=['Tiny', 'Small', 'Normal', 'Large'], group='Dashboard')
// Store last 10 swing high and low values
//var float[] lastHighs = array.new_float(nswing)
//var float[] lastLows = array.new_float(nswing)
//var int[] lastHighDates = array.new_int(nswing)
//var int[] lastLowDates = array.new_int(nswing)
// Declare SwingLowData as matrices
var swingLowData = matrix.new<float>(nStore, 10)
//if pivotLow
if not na(pivotLow)
// Shift the existing rows down
for i = nStore - 1 to 1
for j = 0 to 9
matrix.set(swingLowData, i, j, matrix.get(swingLowData, i - 1, j))
// Add the new data to the first row
matrix.set(swingLowData, 0, 0, low[rightBars])
matrix.set(swingLowData, 0, 1, time[rightBars])
matrix.set(swingLowData, 0, 2, time[rightBars] + 22.5 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 3, time[rightBars] + 45 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 4, time[rightBars] + 90 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 5, time[rightBars] + 135 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 6, time[rightBars] + 180 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 7, time[rightBars] + 225 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 8, time[rightBars] + 270 * 24 * 60 * 60 * 1000)
matrix.set(swingLowData, 0, 9, time[rightBars] + 315 * 24 * 60 * 60 * 1000)
// Declare swingHighData as a matrix
var swingHighData = matrix.new<float>(nStore, 10)
// Get the current timestamp
var int currentTimestamp = time
int timestamp = 0
// Initialize an empty array to store the dates
var string[] dateArrayHigh = array.new_string(0)
//if pivotHigh
if not na (pivotHigh)
// Shift the existing rows down
for i = nStore - 1 to 1
for j = 0 to 9
matrix.set(swingHighData, i, j, matrix.get(swingHighData, i - 1, j))
// Add the new data to the first row
matrix.set(swingHighData, 0, 0, high[rightBars])
matrix.set(swingHighData, 0, 1, time[rightBars])
matrix.set(swingHighData, 0, 2, time[rightBars] + 22.5 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 3, time[rightBars] + 45 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 4, time[rightBars] + 90 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 5, time[rightBars] + 135 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 6, time[rightBars] + 180 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 7, time[rightBars] + 225 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 8, time[rightBars] + 270 * 24 * 60 * 60 * 1000)
matrix.set(swingHighData, 0, 9, time[rightBars] + 315 * 24 * 60 * 60 * 1000)
// Create table
//var table swingTable = table.new(position.top_right, 6, nswing+1, border_color=txt_col,border_width=1,frame_color=txt_col,frame_width=1)
//var table_position_low = dash_loc_low == 'Top Left' ? position.top_left : dash_loc_low == 'Bottom Left' ? position.bottom_left : dash_loc_low == 'Top Right' ? position.top_right : position.bottom_right
//var table_position_high = dash_loc_high == 'Top Left' ? position.top_left : dash_loc_high == 'Bottom Left' ? position.bottom_left : dash_loc_high == 'Top Right' ? position.top_right : position.bottom_right
//var table_position_extra = dash_loc_extra == 'Top Left' ? position.top_left : dash_loc_extra == 'Bottom Left' ? position.bottom_left : dash_loc_extra == 'Top Right' ? position.top_right : position.bottom_right
var table_position_low = dash_loc_low == 'Top Left' ? position.top_left : dash_loc_low == 'Bottom Left' ? position.bottom_left : dash_loc_low == 'Top Right' ? position.top_right : dash_loc_low == 'Mid Left' ? position.middle_left : dash_loc_low == 'Mid Right' ? position.middle_right : position.bottom_right
var table_position_high = dash_loc_high == 'Top Left' ? position.top_left : dash_loc_high == 'Bottom Left' ? position.bottom_left : dash_loc_high == 'Top Right' ? position.top_right : dash_loc_high == 'Mid Left' ? position.middle_left : dash_loc_high == 'Mid Right' ? position.middle_right : position.bottom_right
var table_position_extra = dash_loc_extra == 'Top Left' ? position.top_left : dash_loc_extra == 'Bottom Left' ? position.bottom_left : dash_loc_extra == 'Top Right' ? position.top_right : dash_loc_extra == 'Mid Left' ? position.middle_left : dash_loc_extra == 'Mid Right' ? position.middle_right : position.bottom_right
var table_text_size = text_size == 'Tiny' ? size.tiny : text_size == 'Small' ? size.small : text_size == 'Normal' ? size.normal : size.large
// Create a table to display the swing high data
var table swingHighTable = table.new(position = table_position_high, rows = 10, columns = nswing+1, border_color=txt_col,border_width=1,frame_color=txt_col,frame_width=1)
table.cell(swingHighTable, 0, 0, "Date", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 1, "High", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 2, "Date+22.5", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 3, "High+45", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 4, "High+90", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 5, "High+135", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 6, "High+180", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 7, "High+225", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 8, "High+270", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingHighTable, 0, 9, "High+315", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
// Update the table with the first two rows of swingHighData
//if barstate.islast
// if matrix.rows(swingHighData) >= nswing
// for i = 1 to nswing
// table.cell(swingHighTable, i, 0, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 1)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 1, str.tostring(matrix.get(swingHighData, i-1, 0)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 2, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 2)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 3, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 3)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 4, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 4)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 5, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 5)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 6, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 6)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 7, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 7)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 8, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 8)), text_color=txt_col_bear, text_size=table_text_size)
// table.cell(swingHighTable, i, 9, str.format("{0,date,yyyy-MM-dd}",matrix.get(swingHighData, i-1, 9)), text_color=txt_col_bear, text_size=table_text_size)
if barstate.islast
if matrix.rows(swingHighData) >= nswing
for i = 1 to nswing
//var int timestamp = int(matrix.get(swingHighData, i-1, 1))
timestamp := int(matrix.get(swingHighData, i-1, 1))
var int oneMonthAgo = int(timenow - nDatePast * 24 * 60 * 60 * 1000)
var int sixtyDaysInFuture = int(timenow + nDateFuture * 24 * 60 * 60 * 1000)
var int fourteenDaysInFuture = int(timenow + nNearFuture * 24 * 60 * 60 * 1000)
//table.cell(swingHighTable, i, 0, timestamp > oneMonthAgo ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size)
table.cell(swingHighTable, i, 0, str.format("{0,date,yyyy-MM-dd}", timestamp), text_color=txt_col_bull, text_size=table_text_size)
table.cell(swingHighTable, i, 1, str.tostring(matrix.get(swingHighData, i-1, 0)), text_color=txt_col_bull, text_size=table_text_size)
timestamp := int(matrix.get(swingHighData, i-1, 2))
table.cell(swingHighTable, i, 2, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=(timestamp >= timenow and timestamp < fourteenDaysInFuture) and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80) : na)
timestamp := int(matrix.get(swingHighData, i-1, 3))
table.cell(swingHighTable, i, 3, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80): na)
timestamp := int(matrix.get(swingHighData, i-1, 4))
table.cell(swingHighTable, i, 4, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80): na)
timestamp := int(matrix.get(swingHighData, i-1, 5))
table.cell(swingHighTable, i, 5, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80) : na)
timestamp := int(matrix.get(swingHighData, i-1, 6))
table.cell(swingHighTable, i, 6, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80) : na)
timestamp := int(matrix.get(swingHighData, i-1, 7))
table.cell(swingHighTable, i, 7, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80) : na)
timestamp := int(matrix.get(swingHighData, i-1, 8))
table.cell(swingHighTable, i, 8, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80): na)
timestamp := int(matrix.get(swingHighData, i-1, 9))
table.cell(swingHighTable, i, 9, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bull, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=80) : na)
// Create a table to display the swing high data
var table swingLowTable = table.new(position = table_position_low, rows = 10, columns = nswing+1, border_color=txt_col,border_width=1,frame_color=txt_col,frame_width=1)
table.cell(swingLowTable, 0, 0, "Date", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 1, "Low", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 2, "Low+22.5", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 3, "Low+45", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 4, "Low+90", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 5, "Low+135", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 6, "Low+180", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 7, "Low+225", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 8, "Low+270", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
table.cell(swingLowTable, 0, 9, "Low+315", text_color=txt_col, text_size=table_text_size,bgcolor=color.gray)
if barstate.islast
if matrix.rows(swingLowData) >= nswing
for i = 1 to nswing
//var int timestamp = int(matrix.get(swingLowData, i-1, 1))
timestamp := int(matrix.get(swingLowData, i-1, 1))
var int oneMonthAgo = int(timenow - nDatePast * 24 * 60 * 60 * 1000)
var int sixtyDaysInFuture = int(timenow + nDateFuture * 24 * 60 * 60 * 1000)
var int fourteenDaysInFuture = int(timenow + nNearFuture * 24 * 60 * 60 * 1000)
//table.cell(swingLowTable, i, 0, timestamp > oneMonthAgo ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size)
table.cell(swingLowTable, i, 0, str.format("{0,date,yyyy-MM-dd}", timestamp), text_color=txt_col_bear, text_size=table_text_size)
table.cell(swingLowTable, i, 1, str.tostring(matrix.get(swingLowData, i-1, 0)), text_color=txt_col_bear, text_size=table_text_size)
timestamp := int(matrix.get(swingLowData, i-1, 2))
table.cell(swingLowTable, i, 2, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=(timestamp >= timenow and timestamp < fourteenDaysInFuture) and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70) : na)
timestamp := int(matrix.get(swingLowData, i-1, 3))
table.cell(swingLowTable, i, 3, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70): na)
timestamp := int(matrix.get(swingLowData, i-1, 4))
table.cell(swingLowTable, i, 4, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70): na)
timestamp := int(matrix.get(swingLowData, i-1, 5))
table.cell(swingLowTable, i, 5, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70) : na)
timestamp := int(matrix.get(swingLowData, i-1, 6))
table.cell(swingLowTable, i, 6, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70) : na)
timestamp := int(matrix.get(swingLowData, i-1, 7))
table.cell(swingLowTable, i, 7, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70) : na)
timestamp := int(matrix.get(swingLowData, i-1, 8))
table.cell(swingLowTable, i, 8, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70): na)
timestamp := int(matrix.get(swingLowData, i-1, 9))
table.cell(swingLowTable, i, 9, (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? str.format("{0,date,yyyy-MM-dd}", timestamp) : "", text_color=txt_col_bear, text_size=table_text_size, bgcolor=timestamp >= timenow and timestamp < fourteenDaysInFuture and (timestamp > oneMonthAgo and (not trim_date or timestamp <= sixtyDaysInFuture)) ? color.new(color.yellow, transp=70) : na)
// Function to get the timestamp for approximate equinox and solstice dates
getTimestamp(year, month, day) =>
timestamp(year, month, day, 0, 0)
// Current year
currentYear = year(timenow)
// Approximate dates for equinoxes and solstices
springEquinoxMonth = 3
springEquinoxDay = 20
summerSolsticeMonth = 6
summerSolsticeDay = 21
autumnEquinoxMonth = 9
autumnEquinoxDay = 23
winterSolsticeMonth = 12
winterSolsticeDay = 21
// Calculate timestamps for the current year
spring_equinox_timestamp = getTimestamp(currentYear, springEquinoxMonth, springEquinoxDay)
summer_solstice_timestamp = getTimestamp(currentYear, summerSolsticeMonth, summerSolsticeDay)
autumn_equinox_timestamp = getTimestamp(currentYear, autumnEquinoxMonth, autumnEquinoxDay)
winter_solstice_timestamp = getTimestamp(currentYear, winterSolsticeMonth, winterSolsticeDay)
// Create a table to display the turning dates
var table gann_turning_dates = table.new(position=table_position_extra , columns=2, rows=5, border_color=txt_col,border_width=1,frame_color=txt_col,frame_width=1)
// Update the table with the turning dates
if barstate.islast
table.cell(gann_turning_dates, 0, 0, "Turning Date", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 1, 0, "Date", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 0, 1, "Spring Equinox", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 1, 1, str.format("{0,date,yyyy-MM-dd}", spring_equinox_timestamp), text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 0, 2, "Summer Solstice", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 1, 2, str.format("{0,date,yyyy-MM-dd}", summer_solstice_timestamp), text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 0, 3, "Autumn Equinox", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 1, 3, str.format("{0,date,yyyy-MM-dd}", autumn_equinox_timestamp), text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 0, 4, "Winter Solstice", text_color=txt_col, text_size=table_text_size)
table.cell(gann_turning_dates, 1, 4, str.format("{0,date,yyyy-MM-dd}", winter_solstice_timestamp), text_color=txt_col, text_size=table_text_size)
Show all 268 lines