Skip to content

Instantly share code, notes, and snippets.

@bnsheehy
Created December 26, 2021 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnsheehy/b712ca494d2e07ce6b9438b042ca85d9 to your computer and use it in GitHub Desktop.
Save bnsheehy/b712ca494d2e07ce6b9438b042ca85d9 to your computer and use it in GitHub Desktop.
Create the PnF Historical Data Table
CREATE TABLE IF NOT EXISTS `base_pnf_data_historical` (
`key_id` varchar(40) NOT NULL,
`date` datetime NOT NULL,
`figi` varchar(14) NOT NULL,
`ticker` varchar(8) NOT NULL,
`open` float NULL,
`high` float NULL,
`low` float NULL,
`close` float NULL,
`change` float NULL,
`percent_change` float NULL,
`volume` float NULL,
`plot_symbol` varchar(1) NULL,
`reversal` integer NULL,
`signal_name` varchar(4) NULL,
`high_point` float NULL,
`last_high_point` float NULL,
`prev_high_point` float NULL,
`low_point` float NULL,
`last_low_point` float NULL,
`prev_low_point` float NULL,
`next_entry` float NULL,
`stop_loss` float NULL,
`entry_x` float NULL,
`entry_o` float NULL,
`target_price` float NULL,
`last_updated_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`last_corp_action_date` datetime NULL,
PRIMARY KEY(key_id(40))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment