- 精华
- 1
- 在线时间
- 222 小时
- UID
- 20
- 积分
- 810
- 帖子
- 153
- 阅读权限
- 60
- 注册时间
- 2007-7-22
- 最后登录
- 2013-7-9
- 精华
- 1
- UID
- 20
- 积分
- 810
- 帖子
- 153
- 主题
- 19
- 阅读权限
- 60
- 注册时间
- 2007-7-22
- 最后登录
- 2013-7-9
|
K线数据导出
//------------------------------------------------------------------------
// 简称: ExportData
// 名称: K线数据导出
// 类别: 用户函数
// 类型: 内建函数
// 输出: 布尔型
// 语法: ExportData(路径) //不带参数的默认路径为当前磁盘的"\交易开拓者\K线数据"
// 例1: begin ExportData; End //如K图为ZN0710,将在当前目录下生成"K线数据沪锌0710.txt"的文件
//------------------------------------------------------------------------
Params
String Num("..\\交易开拓者\\K线数据");
Vars
String FileName;
Begin
FileName=Left(Num,Len(Num)-4)+SymbolName+".txt";
If (CurrentBar > 0)
{
FileAppend(FileName,Text(Year)+"/"+Text(Month)+"/"+Text(Day)+","+Text(Hour)+":"+Text(Minute)+","+
Text(O)+","+Text(H)+","+Text(L)+","+Text(C)+","+Text(V)+","+Text(OpenInt));
}
Else
{
FileAppend(FileName,"日期"+","+"时间"+","+"开盘价"+","+"最高价"+","+"最低价"+","+"收盘价"+","+"成交量"+","+"持仓量");
FileAppend(FileName,Text(Year)+"/"+Text(Month)+"/"+Text(Day)+","+Text(Hour)+":"+Text(Minute)+","+
Text(O)+","+Text(H)+","+Text(L)+","+Text(C)+","+Text(V)+","+Text(OpenInt));
}
Return(True);
End
//------------------------------------------------------------------------
// 编译版本 GS2004.06.12
// 用户版本 2007/08/20 21:49
// 版权所有 轮回
// 更改声明 TradeBlazer Software保留对TradeBlazer平台
// 每一版本的TrabeBlazer公式修改和重写的权利
//------------------------------------------------------------------------ |
|