-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRUN_ME.py
More file actions
40 lines (35 loc) · 1.62 KB
/
RUN_ME.py
File metadata and controls
40 lines (35 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
'''
There is a risk of loss when trading stocks, futures, forex, options and other
tradeable finacial instruments. Please trade with capital you can afford to
lose. Past performance is not necessarily indicative of future results.
Nothing in this computer program/code is intended to be a recommendation and/or
solicitation to buy or sell any stocks or futures or options or any
tradable securities/financial instruments.
All information and computer programs provided here is for education and
entertainment purpose only; accuracy and thoroughness cannot be guaranteed.
Readers/users are solely responsible for how to use these information and
are solely responsible any consequences of using these information.
If you have any questions, please send email to IBridgePy@gmail.com
'''
#fileName='futures_history_using_ibridgepy.py'
#fileName='stocks_history_using_ibridgepy.py'
#fileName='stocks_using_ibridgepy.py'
#fileName='options_using_ibridgepy.py'
#fileName='example_get_historical_data.py'
#fileName='example_show_real_time_prices.py'
#fileName='example_place_order.py'
fileName='example_place_market_and_limit_order.py'
#!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!
#accountCode='XXXXXXXX' # You need to change it to your own IB account number
accountCode='XXXXXXXX'
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'''
In the default mode, handle_data will be called every second.
To run Quantopian algorithms, handle_data will be called every minute
Please use the following runMode
'''
#runMode='run_like_quantopian'
with open("configuration.txt") as f:
script = f.read()
exec(script)