Skip to content

JohniFx/alga

Repository files navigation

alga:

GitHub commit activity GitHub tag (latest by date) GitHub all releases

This repo uses oanda v20 API as a basis for a forex trading algo. The focus is not on some magic indicators but to implement more and more general trading rules like

  • do not add to loser,
  • let your winners run and cut your losses quickly,
  • move your stop to breakeven asap,
  • do not hold stopless, losing trades
  • take small partial profits,
  • add to winner and move stop on averages.
  • the trend is your friend,
  • the trend is the timeframe.

Some additional ipynb jupyter notebook files also included. They contain background analysis, and not part of the algo.

Unfortunately the algo is not successful, still producing losses, so it may be called loss generator or account destroyer. I have way to many ideas to implement but time is a constraint.

2022-04-01: development mostly on quant side, to improve entry and forecasting.

2022-03-10

added a rule to block trading if there is already a trade within loss.

2022-02-22 comments

main.initial_tradecheck(): at algo start the prog checks any open trades in the method and processes them according to general trading rules

2021-12-08 comments

cfg.py: this is a general purpose file. it runs the streaming prices, transactions and account polling in the background and also provides variables available for all other classes. main.py: this is where account management happens, trader.py this class is responsible for the trading functions, quant.py this is the market based analysis, technical analysis and signal generator. The application was intended to run in the terminal, in my case in tmux.

2021-12-08_alga

About

Algorithmic trading on Oanda v20 REST API.

Resources

Stars

Watchers

Forks