Code Monkey home page Code Monkey logo

forex_algotrading's People

Contributors

coreyhu avatar jonromero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forex_algotrading's Issues

http://0.0.0.0:8000/chart.html

Edit 16/11/17: Issue not resolved. I was able to run the code till the end (verified by "Done. Goto 0.0.0.0:8000/chart.html"), and went into http://MYPCNAME:8000 but I could not find any "Chart" file in the server... Help from anyone??

Problem with ml script

I had a couple problem with your ml.py come

The first one is only a glitch and in the doc you say that the file unzipped in the data directory should be sample.csv, instead it is f.csv

The second one is a bug:

Traceback (most recent call last):
File "ml.py", line 56, in
main(sys.argv[1])
File "ml.py", line 21, in main
ticks_data = grouped_data['Sell'].resample('24H').ohlc()
File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 2360, in getattr
(type(self).name, name))
AttributeError: 'Series' object has no attribute 'ohlc'

I have solved this changing the line:

ticks_data = grouped_data['Sell'].resample('24H').groupby(['Sell']).ohlc()

with:

tick2_data = grouped_data.resample('24H', how={'Sell': 'ohlc'})
ticks_data = tick2_data['Sell']

New Sample Data

Can someone tell me how to get new sample data to test or upload a new spreadsheet file

error when running create-ohlc.py

I got error when running create-ohlc.py.
Here the message:

**>


Traceback (most recent call last):
File "create_OHLC.py", line 36, in
main(sys.argv[1])
File "create_OHLC.py", line 12, in main
df = pandas.read_csv(filename, parse_dates={'DateTime'}, index_col='DateTime', names=['Tid', 'Dealable', 'Pair', 'DateTime', 'Buy', 'Sell'], date_parser=parse)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 646, in parser_f
return _read(filepath_or_buffer, kwds)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 389, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 730, in init
self._make_engine(self.engine)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 923, in _make_engine
self._engine = CParserWrapper(self.f, self.options)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 1378, in init
ParserBase.init(self, kwds)
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 1032, in init
kwds.pop('parse_dates', False))
File "/Users/yusuf81/anaconda/envs/forex27/lib/python2.7/site-packages/pandas/io/parsers.py", line 1015, in _validate_parse_dates_arg
raise TypeError(msg)
TypeError: Only booleans, lists, and dictionaries are accepted for the 'parse_dates' parameter
---------------------------------------------------------------------------

I think "def parse" output rejected by parse_dates.

400 (Bad Request)

I get this error:
.\git\forex_algotrading>python .\post3\runner.py ------ System online ------- 2017-07-02 00:39:28.751531 Bad Request 2017-07-01T22:39:13.752105Z Traceback (most recent call last): File ".\post3\runner.py", line 46, in <module> main() File ".\post3\runner.py", line 27, in main prices = response.get("prices", 200) File "C:\Python35\lib\site-packages\v20\response.py", line 30, in get raise ResponseUnexpectedStatus(self, status) v20.errors.ResponseUnexpectedStatus: GET https://api-fxpractice.oanda.com:443/v3/accounts/.../pricing?instruments=E UR_USD&includeUnitsAvailable=False&since=2017-07-01T22%3A39%3A13.752105Z expected status 200, got 400 (Bad Request)
Are examples still working on your side?

i want to find somebody to automate a daily trading strategy

i have a few ideas
when the second daily candle close (above for buy) (below for sell)
i want to start building a postion in the direction of the trend
following day i want to take a postion when prices breaks and retest
the previous day high or low on the 1 hour
every daily candle that closes above or below the 5 ema i want to add to my postion using
1 hour break and retest of he previous day high or using the days opening price 30 min timeframe after 9 pm eastern
close all postion on the first close back below/above the 5 ema
@jonromero

Support and resistance might be rolling

Hello,

Currently ml.py use whole data to define support/resistance lines

capture d ecran 2016-09-11 a 11 45 36

but this kind of "indicator" might be rolling (with a given window width)

Kind regards

Chart.html is empty

Everything worked out until trying to open Chat.html.

It was an empty page with nothing on it. I used the sample data, and I setup the http server. I could access the files, but the chart.html was empty

OANDA_ACCESS_TOKEN and OANDA_ACCOUNT_ID shouldn't be in script

Hello,

it's not very safe to have OANDA_ACCESS_TOKEN and OANDA_ACCOUNT_ID in script
(because you can accidentally push to GitHub these very private data)

You might have

  • a config.py file and
  • a config.default.py file

Add config.py to .gitignore

config.default.py could be simply

OANDA_ACCESS_TOKEN="...."
OANDA_ACCOUNT_ID="..."

User will have to copy
config.default.py to config.py
and edit config.py

your scripts will contains

from config import OANDA_ACCESS_TOKEN, OANDA_ACCOUNT_ID

Kind regards

wrong library name in requirements.txt

I think it should be scikit-learn. That's the library name. sklearn is a module in that library.
Another recommendation is to do a "pip install wheel" first.

Unauthorized error?

I did exactly what was in the installation guide, and after trying to run runner.py, I got the following message:

Traceback (most recent call last):
File "runner.py", line 46, in <module> main()
File "runner.py", line 27, in main prices = response.get("prices", 200)
File "/tmp/falgo/local/lib/python2.7/site-packages/v20/response.py", line 30, in get raise ResponseUnexpectedStatus(self, status)
v20.errors.ResponseUnexpectedStatus: GET https://api- fxpractice.oanda.com:443/v3/accounts/999743/pricing?instruments=EUR_USD&since=2017-02-23T23%3A16%3A26.691541Z&includeUnitsAvailable=False expected status 200, got 401 `(Unauthorized)

I am pretty sure I have the right account number form manage funds section on OANDA and the right API key as well.

Python 3

Hello,

maybe you might support Python 3

print ... should be replaced by print(...)

python -m http.server 8000

should be use to run micro web server

Kind regards

Debugging error 4

I am very VERY new to messing with anything more advanced that using matlab to do matrix equations. I got this bot from on here but even using others I get the same message. The token and ID that used are indeed the correct ones with my account. Please help! I hope this is the right place to ask a question..

Trace back message

ubuntu@ubuntu:~/Downloads/forex_algotrading-master/post3$ python runner.py
------ System online ------- 2016-09-16 21:53:13.002630
Buy at 1.11532
Traceback (most recent call last):
File "runner.py", line 29, in
main()
File "runner.py", line 23, in main
type='market')
File "/home/ubuntu/Downloads/forex_algotrading-master/post3/oandapy.py", line 73, in create_order
return self.request(endpoint, "POST", params=params)
File "/home/ubuntu/Downloads/forex_algotrading-master/post3/oandapy.py", line 262, in request
raise OandaError(content)
oandapy.OandaError: OANDA API returned error code 4 (The access token provided does not allow this request to be made)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.