-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added automated machine learning scripts
- Loading branch information
1 parent
ff15fe2
commit 868a138
Showing
49 changed files
with
880 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,6 @@ ScoreData.R | |
model/LOG/AI_T-15.csv | ||
model/LOG/AI_T-60.csv | ||
*.csv | ||
_DATA/ | ||
_MODELS/ | ||
_SETUP/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
TPSL_Level | ||
10 | ||
60 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
TPSL_Level | ||
40 | ||
30 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\01_SelfLearnM1.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\01_SelfLearnM1.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\01_SelfLearnM1.R" | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\01_SelfLearnM1.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\02_ScoreDataM1.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\02_ScoreDataM1.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\02_ScoreDataM1.R | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\02_ScoreDataM1.R |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\03_SelfLearnM15.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\03_SelfLearnM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\03_SelfLearnM15.R" | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\03_SelfLearnM15.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\04_ScoreDataM15.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\04_ScoreDataM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\04_ScoreDataM15.R | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\04_ScoreDataM15.R |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\05_SelfLearnM60.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\05_SelfLearnM60.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\05_SelfLearnM60.R" | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\05_SelfLearnM60.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\06_ScoreDataM60.R" | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\06_ScoreDataM60.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\06_ScoreDataM60.R | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\06_ScoreDataM60.R |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ---------------------------------------------------------------------------------------- | ||
# R Script to collect the asset indicator data and respective 'future' price change | ||
# ---------------------------------------------------------------------------------------- | ||
# (C) 2019 Vladimir Zhbanko | ||
# https://www.udemy.com/self-learning-trading-robot/?couponCode=LAZYTRADE7-10 | ||
# | ||
# load libraries to use and custom functions | ||
library(tidyverse) | ||
library(lubridate) | ||
library(lazytrade) | ||
|
||
#### Read asset prices and indicators ========================================== | ||
#absolute path with the data (choose either MT4 directory or a '_TEST_DATA' folder) | ||
|
||
path_terminal <- "C:/Program Files (x86)/FxPro - Terminal2/MQL4/Files/" | ||
macd <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_Macd", time_period = 15, data_deepth = "300") | ||
prices <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_CP", time_period = 15, data_deepth = "300") | ||
|
||
path_data <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_DATA" | ||
# Vector of currency pairs | ||
Pairs = c("EURUSD", "GBPUSD", "AUDUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", | ||
"EURGBP", "EURJPY", "EURCHF", "EURNZD", "EURCAD", "EURAUD", "GBPAUD", | ||
"GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "AUDCAD", "AUDCHF", "AUDJPY", | ||
"AUDNZD", "CADJPY", "CHFJPY", "NZDJPY", "NZDCAD", "NZDCHF", "CADCHF") | ||
|
||
# Writing indicator and price change to the file | ||
for (PAIR in Pairs) { | ||
# PAIR <- "EURUSD" | ||
# performing data collection using the custom function | ||
aml_collect_data(price_dataset = prices, | ||
indicator_dataset = macd, | ||
symbol = PAIR, | ||
num_bars = 75, | ||
timeframe = 15, | ||
path_data = path_data) | ||
|
||
#full_path <- file.path(path_data, 'EURUSDM15X75.rds') | ||
#full_path <- file.path(path_data, 'GBPUSDM15X75.rds') | ||
#x1 <- read_rds(full_path) | ||
|
||
} | ||
|
||
# outcome is series of files written to the _DATA folder of the repository | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\08_CollectDataM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\08_CollectDataM15.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\09_MakeModelM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\09_MakeModelM15.R |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# ---------------------------------------------------------------------------------------- | ||
# R Script to build or update Deep Learning model for every Currency Pair | ||
# ---------------------------------------------------------------------------------------- | ||
# (C) 2019 Vladimir Zhbanko | ||
# https://www.udemy.com/self-learning-trading-robot/?couponCode=LAZYTRADE7-10 | ||
# | ||
# load libraries to use and custom functions | ||
library(tidyverse) | ||
library(h2o) | ||
library(lazytrade) | ||
|
||
#### Read asset prices and indicators ========================================== | ||
#absolute path with the data (choose either MT4 directory or a '_TEST_DATA' folder) | ||
path_data <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_DATA" | ||
# Vector of currency pairs | ||
Pairs = c("EURUSD", "GBPUSD", "AUDUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", | ||
"EURGBP", "EURJPY", "EURCHF", "EURNZD", "EURCAD", "EURAUD", "GBPAUD", | ||
"GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "AUDCAD", "AUDCHF", "AUDJPY", | ||
"AUDNZD", "CADJPY", "CHFJPY", "NZDJPY", "NZDCAD", "NZDCHF", "CADCHF") | ||
#absolute path to store model objects (useful when scheduling tasks) | ||
path_model <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_MODELS" | ||
|
||
h2o.init() | ||
|
||
# Writing indicator and price change to the file | ||
for (PAIR in Pairs) { | ||
## PAIR <- "EURUSD" | ||
# performing Deep Learning Regression using the custom function | ||
aml_make_model(symbol = PAIR, | ||
num_bars = 75, | ||
timeframe = 15, | ||
path_model = path_model, | ||
path_data = path_data) | ||
|
||
} | ||
|
||
# stop h2o engine | ||
h2o.shutdown(prompt = F) | ||
|
||
|
||
# outcome are the models files for each currency pair written to the folder /_MODELS | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# ---------------------------------------------------------------------------------------- | ||
# R Script to score the latest asset indicator data against Deep Learning model | ||
# ---------------------------------------------------------------------------------------- | ||
# (C) 2019 Vladimir Zhbanko | ||
# https://www.udemy.com/self-learning-trading-robot/?couponCode=LAZYTRADE7-10 | ||
# | ||
# load libraries to use and custom functions | ||
library(tidyverse) | ||
library(h2o) | ||
library(lazytrade) | ||
|
||
#### definition of paths and variables ========================================== | ||
path_data <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_DATA" | ||
#absolute path to store model objects (useful when scheduling tasks) | ||
path_model <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_MODELS" | ||
# load prices of 28 currencies | ||
path_sbxm <- "C:/Program Files (x86)/FxPro - Terminal1/MQL4/Files" | ||
path_sbxs <- "C:/Program Files (x86)/FxPro - Terminal3/MQL4/Files" | ||
|
||
time_frame <- 15 #this is to define chart timeframe periodicity | ||
predictor_period <- 75 #this variable will define market type period (number of bars) | ||
|
||
# Vector of currency pairs | ||
Pairs = c("EURUSD", "GBPUSD", "AUDUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", | ||
"EURGBP", "EURJPY", "EURCHF", "EURNZD", "EURCAD", "EURAUD", "GBPAUD", | ||
"GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "AUDCAD", "AUDCHF", "AUDJPY", | ||
"AUDNZD", "CADJPY", "CHFJPY", "NZDJPY", "NZDCAD", "NZDCHF", "CADCHF") | ||
|
||
# initialize the virtual machine | ||
h2o.init(nthreads = 1) | ||
|
||
for (PAIR in Pairs) { | ||
## PAIR <- "EURUSD" | ||
|
||
aml_score_data(symbol = PAIR, | ||
num_bars = predictor_period, | ||
timeframe = time_frame, | ||
path_model = path_model, | ||
path_data = path_data, | ||
path_sbxm = path_sbxm, | ||
path_sbxs = path_sbxs) | ||
|
||
} | ||
|
||
# shutdown h2o | ||
h2o.shutdown(prompt = F) | ||
|
||
# outcome is series of files written to the sandboxes of each terminals | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\10_ScoreDataM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\10_ScoreDataM15.R |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ---------------------------------------------------------------------------------------- | ||
# R Script to collect the asset indicator data and respective 'future' price change | ||
# ---------------------------------------------------------------------------------------- | ||
# (C) 2019 Vladimir Zhbanko | ||
# https://www.udemy.com/self-learning-trading-robot/?couponCode=LAZYTRADE7-10 | ||
# | ||
# load libraries to use and custom functions | ||
library(tidyverse) | ||
library(lubridate) | ||
library(lazytrade) | ||
|
||
#### Read asset prices and indicators ========================================== | ||
#absolute path with the data (choose either MT4 directory or a '_TEST_DATA' folder) | ||
|
||
path_terminal <- "C:/Program Files (x86)/FxPro - Terminal2/MQL4/Files/" | ||
macd <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_Macd", time_period = 60, data_deepth = "300") | ||
prices <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_CP", time_period = 60, data_deepth = "300") | ||
|
||
path_data <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_DATA" | ||
# Vector of currency pairs | ||
Pairs = c("EURUSD", "GBPUSD", "AUDUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", | ||
"EURGBP", "EURJPY", "EURCHF", "EURNZD", "EURCAD", "EURAUD", "GBPAUD", | ||
"GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "AUDCAD", "AUDCHF", "AUDJPY", | ||
"AUDNZD", "CADJPY", "CHFJPY", "NZDJPY", "NZDCAD", "NZDCHF", "CADCHF") | ||
|
||
# Writing indicator and price change to the file | ||
for (PAIR in Pairs) { | ||
# PAIR <- "EURUSD" | ||
# performing data collection using the custom function | ||
aml_collect_data(price_dataset = prices, | ||
indicator_dataset = macd, | ||
symbol = PAIR, | ||
num_bars = 75, | ||
timeframe = 60, | ||
path_data = path_data) | ||
|
||
#full_path <- file.path(path_data, 'EURUSDM15X75.rds') | ||
#full_path <- file.path(path_data, 'GBPUSDM15X75.rds') | ||
#x1 <- read_rds(full_path) | ||
|
||
} | ||
|
||
# outcome is series of files written to the _DATA folder of the repository | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.1\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\11_CollectDataM60.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-3.6.1\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD\11_CollectDataM60.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# ---------------------------------------------------------------------------------------- | ||
# R Script to collect the asset indicator data and respective 'future' price change | ||
# ---------------------------------------------------------------------------------------- | ||
# (C) 2019 Vladimir Zhbanko | ||
# https://www.udemy.com/self-learning-trading-robot/?couponCode=LAZYTRADE7-10 | ||
# | ||
# load libraries to use and custom functions | ||
#library(tidyverse) | ||
library(magrittr) | ||
library(dplyr) | ||
library(readr) | ||
library(lubridate) | ||
library(lazytrade) | ||
|
||
#### Read asset prices and indicators ========================================== | ||
#absolute path with the data (choose either MT4 directory or a '_TEST_DATA' folder) | ||
|
||
path_terminal <- "C:/Program Files (x86)/FxPro - Terminal2/MQL4/Files/" | ||
macd <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_Macd", time_period = 15, data_deepth = "300") | ||
prices <- load_asset_data(path_terminal = path_terminal, trade_log_file = "AI_CP", time_period = 15, data_deepth = "300") | ||
|
||
path_data <- "C:/Users/fxtrams/Documents/000_TradingRepo/R_selflearning/_DATA" | ||
# Vector of currency pairs | ||
Pairs = c("EURUSD", "GBPUSD", "AUDUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", | ||
"EURGBP", "EURJPY", "EURCHF", "EURNZD", "EURCAD", "EURAUD", "GBPAUD", | ||
"GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "AUDCAD", "AUDCHF", "AUDJPY", | ||
"AUDNZD", "CADJPY", "CHFJPY", "NZDJPY", "NZDCAD", "NZDCHF", "CADCHF") | ||
|
||
# Writing indicator and price change to the file | ||
for (PAIR in Pairs) { | ||
# PAIR <- "EURUSD" | ||
# performing data collection using the custom function | ||
aml_collect_data(price_dataset = prices, | ||
indicator_dataset = macd, | ||
symbol = PAIR, | ||
num_bars = 75, | ||
timeframe = 15, | ||
path_data = path_data) | ||
|
||
#full_path <- file.path(path_data, 'EURUSDM15X75.rds') | ||
#full_path <- file.path(path_data, 'GBPUSDM15X75.rds') | ||
#x1 <- read_rds(full_path) | ||
|
||
} | ||
|
||
# outcome is series of files written to the _DATA folder of the repository | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.2\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD1\01_CollectDataM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-4.0.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD1\01_CollectDataM15.R" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
:: Use this line of code for debugging purposes *** Adapt the paths for R installation and R script!!! | ||
::"C:\Program Files\R\R-3.6.2\bin\R.exe" CMD BATCH "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD1\02_MakeModelM15.R" | ||
:: Use this code in 'production' | ||
"C:\Program Files\R\R-4.0.0\bin\Rscript.exe" "C:\Users\fxtrams\Documents\000_TradingRepo\R_selflearning\_PROD1\02_MakeModelM15.R" |
Oops, something went wrong.