This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS `snapshot_evecentral`; | |
CREATE TABLE `snapshot_evecentral` ( | |
`price_date` DATE NOT NULL, | |
`price_time` TIME NOT NULL, | |
`typeid` INT(8) NOT NULL, | |
`locationid` INT(8) NOT NULL, | |
`location_type` ENUM('solarsystemid','stationid','regionid','global') NULL, | |
`buy_sell` TINYINT(1) NOT NULL DEFAULT 0, -- 0=sell, 1=buy | |
`price_best` FLOAT(13,2) NULL, -- BUY_MAX, SELL_MIN | |
`price_avg` FLOAT(13,2) NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
library(ggplot2) | |
library(grid) | |
market_data <- read.csv("--FILEPATH GOES HERE--", header=TRUE) | |
market_data$date <- as.Date(market_data$date) | |
market_data$typeid <- as.factor(market_data$typeid) | |
market_data$hour <- as.factor(market_data$HOUR.hour) | |
market_data$locationid <- as.factor(market_data$locationid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages.list <- c("data.table", | |
"quantmod", | |
"jsonlite") | |
packages.new <- packages.list[!(packages.list %in% installed.packages()[,"Package"])] | |
if(length(packages.new)){ | |
install.packages(packages.new) | |
} | |
library(data.table) | |
library(quantmod) | |
library(jsonlite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
library(jsonlite) | |
library(data.table) | |
library(grid) | |
library(reshape) | |
library(ggplot2) | |
library(sde) | |
library(zoo) | |
library(plyr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
library(jsonlite) | |
library(data.table) | |
library(grid) | |
library(reshape) | |
library(ggplot2) | |
library(sde) | |
library(zoo) | |
library(plyr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### INCLUDE LIBRARIES #### | |
library(quantmod) #getSymbols/chartSeries | |
library(zoo) #rollmean/rollapply | |
library(plyr) | |
library(sde) #GBM() | |
library(ggplot2) #ggplot() | |
library(reshape) #melt() | |
#### SCRIPT GLOBALS #### | |
StockSymbol <- "MU" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE invTypes SET volume=500 WHERE groupID in (29,1022,31); | |
UPDATE invTypes SET volume=1000 WHERE groupID in (448,12,649,952,340); | |
UPDATE invTypes SET volume=2500 WHERE groupID in (324,830,893,25,831,237,834); | |
UPDATE invTypes SET volume=3750 WHERE groupID in (543,463); | |
UPDATE invTypes SET volume=5000 WHERE groupID in (420,541,963); | |
UPDATE invTypes SET volume=10000 WHERE groupID in (906,358,833,894,832,26); | |
UPDATE invTypes SET volume=15000 WHERE groupID in (1201,419,540); | |
UPDATE invTypes SET volume=50000 WHERE groupID in (27,898,381,941,900); | |
UPDATE invTypes SET volume=20000 WHERE groupID in (1202,380,28); | |
UPDATE invTypes SET volume=1000000 WHERE groupID in (883,547,485,513,902,659); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT conv.typeName as `typeName`, conv.typeID as `typeID`, COALESCE(dgm.valueInt, dgm.valueFloat,0) as `meta`, conv.groupID, | |
IF(conv.groupID in (29,1022,31), 500, | |
IF(conv.groupID in (448,12,649,952,340), 1000, | |
IF(conv.groupID in (324,830,893,25,831,237,834), 2500, | |
IF(conv.groupID in (543,463), 3750, | |
IF(conv.groupID in (420,541,963), 5000, | |
IF(conv.groupID in (906,358,833,894,832,26), 10000, | |
IF(conv.groupID in (1201,419,540), 15000, | |
IF(conv.groupID in (27,898,381,941,900), 50000, | |
IF(conv.groupID in (1202,380,28), 20000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### INCLUDE LIBRARIES #### | |
library(quantmod) #getSymbols/chartSeries | |
library(zoo) #rollmean/rollapply | |
library(plyr) | |
library(sde) #GBM() | |
library(ggplot2) #ggplot() | |
library(reshape) #melt() | |
library(TTR) #RSI() | |
library(grid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
library(ggplot2) | |
library(grid) | |
library(reshape) | |
library(scales) | |
library(data.table) | |
library(quantmod) | |
library(jsonlite) | |
library(cowplot) |
OlderNewer