
Goals and the main idea of this course explained
Disclaimer lecture
Market types – the first key to building a winning Forex trading system Expecting the same system to work in all market types is the definition of insanity.” – Van K. Tharp
We will use the concept shown in the book to manually identify market periods. According to this book there are 6 main market types:
Theory on how to detect market types with Deep Learning
Building understanding on the h2o infrasctucture
Getting the code
The 2(3) ways to get the data:
Use dataset prepared with interactive visualization
Directly use prepared dataset
Collect the data while the model is in production
Lecture will demonstrate how to get financial data log from MQL to the Computer File System:
Data Writer v 4.02
Use function writeDataMacd()
call function every bar
Collect data for H1 timeframe
Q. Which indicator is best? Which indicator should I use? I want to use this system on several timeframes, will I succeed?
This lecture is intended to answer few frequently asked questions
Content:
This is not a trading advise
Any indicator that...
Experiment but be prudent
This is not a trading advise
Authors of this course once again recommend to use provided content as a way to learn computer and data science. In fact classification models could be used for pattern classification in a number of applications like:
classify product physical property by using a sound waves data
classify temperature profile from machinery processes
etc
Any indicator that...
Use of macd indicator shown in the course should be used with caution. The absolute value of the indicator is dependent of the asset price. This may influence performance of the model. Authors of the course may recommend to use other indicators that do not have such dependency. For example indicators that have min max range that:
is from 0 to 100
or from -100 to 100
or from -1 to +1
etc
Experiment but be prudent
Authors of the course would definitely appreciate whenever students will use material of this course to experiment and re-create proposed software. Experimenting is known to be the most effective way to master the subject. However handling complex code may be complicated. Please be mindful to first test the concept on something simple and only after decide whether it is a good option to expand...
Thank you for understanding
2020-11-22
Collecting data in the interactive way:
Use provided data sample
Modular code to extract and aggregate the data
Visualize data as 3D. Using R library(plotly)
Visualize data matrix in 3D graph
We talk about 2 ways of getting the dataset. Particular attention is given on how to:
convert one column to factor
inspect number of factor using function summary(df$column)
Learning Goals
Train Classification Deep Learning Model
Use classified data
Use prepared function
How function works
Random neural network structures
Model performance
Save the model
Use script to build deep learning model and write it to the disk
Reminder to update / retrain Deep Learning models when updating version of h2o package
What is inside the function:
random neural network structures
checking model metrics
logging results of modeling internally
...
Propose a way to automate this task to build the model, why?
we may update h2o package
to try to improve the model by using automatically collected new data
Deploy Script aim is to:
classify current market type for 28 assets based on the values of the latest indicator
record new data for high selected patterns where confidence of classification is high
Look into internals of the function mt_evaluate
Where to find documentation, examples
This lecture shows what needs to be modified in order to run this code locally and reproduce provided example
Run the script
03_Score_Data.R
Checking how automatic pattern recognition is effective to recognize market type:
watch files in the sandboxes
watch the charts
compare market type visually also looking on 'confidence' values inside files
adapt this script and automate to run this program in Windows task scheduler
run on Sunday before market is opened
run weekly on Monday - Tue- Wed - Thu - Fr
Repeat every 1 hour
start running at 0:10
Look at the function mt_evaluate
This may be useful for any data science project:
collect predictor data while model is used
do that on specified condition
store this info persistently (e.g. write to the file)
Reminder that Functions in R package could be understood by reproducing an example
Explaining the reasons of creating this chapter:
creating a User Interface for quick data visualization and check
balancing classes option
suggestion to create an algorithm
Shiny App Prototype for data review
Review how Shiny App works to manually inspect and save data 'aside'
how to add new data for model update
example of creating algorithm blueprint
Read Market Type information in MQL4
Focus of this chapter is to understand the mechanism of using Market Type information in our Trading Robots:
How to read Market Type information in MQL4 program?
How to log Market Type information at the moment of opening new Trades (log to use Reinforcement Learning and define best Market Type for a Trading Robot)
Note that this course will only focus on generating the 'output', the 'demo trading experiment' will be made in the course 7
Reading the data out of the file in the sandbox
Reading 'double' values from flat files to MetaEditor platforms
Code shown inside video lectures
How Market Type info can be used inside Trading Robot
Describe the problem and how we will be solving that!
Show Jumping Monkey Simulation to illustrate the problem
Simulating self-organizing system using R software
Reviewing the code capable to log the Market Status data of the system to the file
Generate data for the Reinforcement Learning Problem. Adding Market Status information to the Trading Results
In this lecture we will be performing Reinforcement Learning on the obtained dataset. Idea will be to create a model. Model will define the policy suggesting optimal Market Type for the Trading System
A note about additional code to find best control parameters
In this lecture we will see how to use Reinforcement Learning policy inside of the Trading Terminal
Summary of steps taken in this section
This lecture outlays learned programming concepts with particular focus on Data Science Modelling
This lecture provides a bonus coupon to the next course for lazy traders
About the Lazy Trading Courses:
This series of courses is designed to to combine fascinating experience of Algorithmic Trading and at the same time to learn Computer and Data Science! Particular focus is made on building Decision Support System that can help to automate a lot of boring processes related to Trading and also learn Data Science. Several algorithms will be built by performing basic data cycle 'data input-data manipulation - analysis -output'. Provided examples throughout all 7 courses will show how to build very comprehensive system capable to automatically evolve without much manual input.
Inspired by:
“it is insane to expect that one system to work for all market types” // -Van K. Tharp
“Luck is what happens when preparation meets opportunity” // -Seneca (Roman philosopher)
About this Course: Use Artificial Intelligence in Trading
This course will cover usage of Deep Learning Classification Model to classify Market Status of Financial Assets using Deep Learning:
Learn to use R and h2o Machine Learning platform to train Supervised Deep Learning Classification Models
Easily gather and write Financial Asset Data with Data Writer Robot
Manipulate data and learn to build Classification Deep Learning Models
Use random neural network structures
Functions with examples in R package
Generate Market Type classification output for Trading Systems
Get Trading robot capable to consider Market Status information in your Strategies
This project is containing several short courses focused to help you managing your Automated Trading Systems:
Set up your Home Trading Environment
Set up your Trading Strategy Robot
Set up your automated Trading Journal
Statistical Automated Trading Control
Reading News and Sentiment Analysis
Using Artificial Intelligence to detect market status
Building an AI trading system
Update: dedicated R package 'lazytrade' was created to facilitate code sharing among different courses
IMPORTANT: all courses will have a 'quick to deploy' sections as well as sections containing theoretical explanations.
What will you learn apart of trading:
While completing these courses you will learn much more rather than just trading by using provided examples:
Learn and practice to use Decision Support System
Be organized and systematic using Version Control and Automated Statistical Analysis
Learn using R to read, manipulate data and perform Machine Learning including Deep Learning
Learn and practice Data Visualization
Learn sentiment analysis and web scrapping
Learn Shiny to deploy any data project in hours
Get productivity hacks
Learn to automate your tasks and scheduling them
Get expandable examples of MQL4 and R code
What these courses are not:
These courses will not teach and explain specific programming concepts in details
These courses are not meant to teach basics of Data Science or Trading
There is no guarantee on bug free programming
Disclaimer:
Trading is a risk. This course must not be intended as a financial advice or service. Past results are not guaranteed for the future. Significant time investment may be required to reproduce proposed methods and concepts