m*********h 发帖数: 5449 | 1 This is an abstract toy system. A lot work to do for a real algorithmic
trading system.
This is not for high frequency trading. It is for swing trading.
two threads:
the first is data manager or retreiver.
the second is trading thread.
the first one is related to broker and API. please check your broker's
documents.
the following is trading thread. suppose all data, positions and order
status are up to
date.
like a game, a trading thread is mainly an infinite loop.
while(true)
{
update timer;
check trend alert conditions;
send alert to users if triggered;
check current positions and live orders;
check trading requirements;
check trading entry or exit conditions;
place or cancel orders if all conditions are satisfied;
sleep 10 milliseconds;
} |
G***G 发帖数: 16778 | 2 how to communicate between the two threads simutaneously?
【在 m*********h 的大作中提到】 : This is an abstract toy system. A lot work to do for a real algorithmic : trading system. : This is not for high frequency trading. It is for swing trading. : two threads: : the first is data manager or retreiver. : the second is trading thread. : the first one is related to broker and API. please check your broker's : documents. : the following is trading thread. suppose all data, positions and order : status are up to
|
W***n 发帖数: 11530 | 3 "sleep 10 milliseconds"
this is not hi-freq trading?! |
m*********h 发帖数: 5449 | 4 a lot of ways on google
【在 G***G 的大作中提到】 : how to communicate between the two threads simutaneously?
|
m*********h 发帖数: 5449 | 5 high frequency requires much less response time
but my Internet is not that fast
【在 W***n 的大作中提到】 : "sleep 10 milliseconds" : this is not hi-freq trading?!
|
s********y 发帖数: 831 | 6 白痴码工。
【在 m*********h 的大作中提到】 : This is an abstract toy system. A lot work to do for a real algorithmic : trading system. : This is not for high frequency trading. It is for swing trading. : two threads: : the first is data manager or retreiver. : the second is trading thread. : the first one is related to broker and API. please check your broker's : documents. : the following is trading thread. suppose all data, positions and order : status are up to
|
m*********h 发帖数: 5449 | 7 哪个基金还在用手工下单?
【在 s********y 的大作中提到】 : 白痴码工。
|