-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExamples.txt
44 lines (29 loc) · 1.92 KB
/
Examples.txt
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
41
42
43
44
Examples
python ibtrader.py --new_order --order_symbol EUR --order_secType CASH --order_exchange IDEALPRO --order_action BUY --order_type LMT --order_quantity 400000 --order_currency USD --order_limit_price 2 --tcp_port 4001
sleep 5
python ibtrader.py --print_positions --close_sym_position --order_symbol EUR --tcp_port 4001
sleep 5
python ibtrader.py --print_positions
BUY 400K EUR @2 LMT
Sleep 5 seconds
Print Positions
Close Position for EUR
Sleep 5
Print Positions
createneworder.py -ac DU226708 --trade_stock -sym UVXY --long_mkt
ibtrader.py -tcp 4002 -host 192.168.123.4 -clid 9900 -qt -sym VXX -oe SMART -oc USD -ot STK
ibtrader.py -tcp 4002 -host 192.168.123.4 -clid 9900 -qt -sym EUR -oe IDEALPRO -oc USD -ot CASH
python ibtrader.py -clid 9900 -tcp 4002 -host 192.168.123.4 -pp
python ibtrader.py -clid 9900 -tcp 4002 -host 192.168.123.4 --trade_forex --long_mkt -sym EUR -oq 2500000 -nw -acnum ACNUM
python ibtrader.py -clid 9900 -tcp 4002 -host 192.168.123.4 --trade_forex --long_lmt -sym EUR -oq 100000 -nw -acnum ACNUM -ol 1.0
runeff -addts -fromall -sclbw -sclw -do_loess -scale_bandwidth_mult 1 -sdev 0.50 -use_short_sdev -autobw -autobarmulti 1 -shortperiod 0 -tick XIV_QQ -fromdate 20130101 -slippage 0 -use_this_flds 30 -nef -mkcr OOO -maxlosspcnt -4 -okshort -skipbsma 30 -SKIPBS_MA_CPNT 0.01 -min_holding_minutes 0 -lev 1 -minutes 10
runeff -addts -fromall -sclbw -sclw -do_loess -scale_bandwidth_mult 1 -sdev 0.50 -use_short_sdev -autobw -autobarmulti 1 -shortperiod 0 -tick UVXY_QQ -fromdate 20130101 -slippage 0 -use_this_flds 30 -nef -mkcr OOO -maxlosspcnt -4 -okshort -skipbsma 30 -SKIPBS_MA_CPNT 0.01 -min_holding_minutes 0 -lev 1 -minutes 10
## Error handling
The contract description specified for MSFT is ambiguous.
## Solution
Specify exchange as ISLAND
#### Error
Order rejected - reason:The exchange is closed
### Solution
Wait for it to open
createneworder.py -ac DU226708 --trade_forex -sym EUR --long_mkt