| | |
| | | std::ostringstream out_str; |
| | | out_str << setiosflags(ios::fixed) << std::setprecision(2) << stof(tradeData.price); |
| | | |
| | | |
| | | |
| | | ws->label(index, 0, tradeData.time, xf); |
| | | ws->label(index, 1, out_str.str(), xf); |
| | | ws->label(index, 2, tradeData.limitPrice ? L"涨停价" : L"非涨停价", xf); |
| | | if (tradeData.limitPrice == LIMIT_PRICE_NORMAL) { |
| | | ws->label(index, 2, L"正常价", xf); |
| | | } |
| | | else if (tradeData.limitPrice == LIMIT_PRICE_UP) { |
| | | ws->label(index, 2, L"涨停价", xf); |
| | | } |
| | | else if (tradeData.limitPrice == LIMIT_PRICE_DOWN) { |
| | | ws->label(index, 2, L"跌停价", xf); |
| | | } |
| | | ws->label(index, 3, to_string(tradeData.num), xf); |
| | | |
| | | |
| | |
| | | wstring operate; |
| | | switch (tradeData.operateType) |
| | | { |
| | | case BUY: |
| | | case OPERATE_BUY: |
| | | operate = L"买";break; |
| | | case BUY_CANCEL: |
| | | case OPERATE_BUY_CANCEL: |
| | | operate = L"买撤";break; |
| | | case SELL: |
| | | case OPERATE_SELL: |
| | | operate = L"卖";break; |
| | | case SELL_CANCEL: |
| | | case OPERATE_SELL_CANCEL: |
| | | operate = L"卖撤";break; |
| | | default: |
| | | break; |