C#定义结构体

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimulationTool
{
     struct PESSelectParam //成交记录的Key参数
    {
        DateTime strStarTime;   //开始时间
        DateTime strEndTime;       //结束时间
        string   strInvestGroupID; //投资团队ID
 
        List<string>   pstrStrategyList;     //策略名字列表
        int     nStrategyCount;       //策略名字列表大小

        List<string>   pstrSymbolList;       //品种列表
        int     nSymbolCount;         //品种列表大小
    };

     enum PES_TRADE_TYPE     //交易类型枚举
    {
        TRADE_TYPE_LONGPOS  = 0 ,     //多头
        TRADE_TYPE_SHORTPOS           //空头
    };

     struct PESTradeRecord //成交记录
    {
        string   strInvestGroupID; //投资团队ID
        string   strStrategyName;  //策略名字
        string   strSymbol;        //商品名称

        PES_TRADE_TYPE    enTradeType;//交易类型
        DateTime   strOpenPosTime; //建仓时间,精确到秒,格式:20130529102059
        float    fOpenPosPrice;        //建仓价格
        DateTime strClosePosTime; //平仓时间,精确到秒,格式:20130529102059
        float   fClosePosPrice;       //平仓价格
        int     nPosNumber;           //数量
        float   fTradeCost;           //交易成本
        float   fNetProfit;           //净利润
        float   fAccumuNetProfit;     //累计净利润
        float   fReturnRate;          //收益率
        float   fAccumuReturnRate;    //累计收益率
        int     nBarCount;            //持仓周期数
    };

}


 

转载于:https://www.cnblogs.com/ganquanfu2008/archive/2013/05/30/3109277.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值