Redian新闻
>
A basic algorithmic trading framework
avatar
A basic algorithmic trading framework# Stock
m*h
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;
}
avatar
G*G
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

avatar
W*n
3
"sleep 10 milliseconds"
this is not hi-freq trading?!
avatar
m*h
4
a lot of ways on google

【在 G***G 的大作中提到】
: how to communicate between the two threads simutaneously?
avatar
m*h
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?!

avatar
s*y
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

avatar
m*h
7
哪个基金还在用手工下单?

【在 s********y 的大作中提到】
: 白痴码工。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。