Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhuangxinyu committed Nov 18, 2019
2 parents 04562a1 + 9dcee90 commit 1740729
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ you can open it in trading time, it's a monitor of spread.

### Open Source:
Currently, the repository opened the strategy code, exchange api code, backtest code, complementary tools code.
For the base part of strategy, I just make it as a dynamic library in external, ok to use, but code is not included
here, the reason is that something i am now still debugging, reconstructing, and thinking. if you have any questions
on this part, email me.

### Author:
* XinYu Huang
Expand Down
15 changes: 7 additions & 8 deletions TODO.readme
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
order_ref issue
1. make neworder and moderateorder as a pair, using the same component - OrderPrice
2. OrderPrice provide several modes:
i) Best
ii) Market
iii) NoLossBest
one selective parameters: edurance->bool, and a num of edurance
3. ModerateOrder as one function, parmater list->(map, mode, bool, int)
1.order show still be 4k align, even use flush every time
2.encapsulate config handler
3.deconstructor release resource
4.backtest framework need simlify
5.Data interface
6.Time performance test
7.more complex backtest function in
4 changes: 2 additions & 2 deletions src/simplearb/strategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@ void Strategy::ModerateOrders(const std::string & contract) {
continue;
}
if (ticker == main_ticker) {
CancelOrder(o);
printf("[%s %s]Abandon this oppounity because main ticker price change %lf->%lf mpv=%lf\n", main_ticker.c_str(), hedge_ticker.c_str(), o->price, reasonable_price, min_price_move);
CancelOrder(o);
} else if (ticker == hedge_ticker) {
ModOrder(o);
printf("[%s %s]Slip point for :modify %s order %s: %lf->%lf mpv=%lf\n", main_ticker.c_str(), hedge_ticker.c_str(), OrderSide::ToString(o->side), o->order_ref, o->price, reasonable_price, min_price_move);
ModOrder(o);
} else {
continue;
}
Expand Down

0 comments on commit 1740729

Please sign in to comment.