Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

komo135/forex-trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived.

The new repository will be https://github.com/komo135/trade-rl.

Download Forex data

  1. Download Metatrader5 from this link and install.
  2. Verify that a demo account exists.
  3. If the demo account does not exist, create a demo account.
create-demo-account.mp4
  1. Go from Tools to Options (Ctr + o).
  2. Go to the chart bar and change Max bars in chart to unlimited.
change-max-bars-in-chart.mp4
  1. install Metatrader5 and ta package
$ pip install MetaTrader5 ta
  1. run generate_data.py
$ cd data
$ python generate_data.py

run agent

$ python
>>> from agent import dqn

>>> agent = dqn.Agent(model_name="efficientnet_b0", s=5, action_type=3, pip_scale=1, n=1, loss_cut=False, use_device="tpu", dueling=False)
>>> agent.train()
>>>
>>> agent.plot_result(w=self.best_w, risk=0.04, s=self.s)

image