比特币通信协议 - 币圈消息

比特币通信协议篇11、二、TURN简介。在典型的情况下,TURN客户端连接到内网中,并且通过一个或者多个NAT到 详细

12
返回列表 发新帖

怎么获取当前货币的历史交易单数

  [复制链接]
11#
SHIBIN 发表于 2015-3-9 22:16:04 | 只看该作者
这个你可以去请教王老师
12#
jump101 发表于 2015-3-9 22:47:46 | 只看该作者
#include
#property indicator_chart_window
extern string GET_PATH = "C:\Program Files\GET8\TEXT\";
int last_write_period=0;
extern int MAX_ROWS = 300;
extern string START_DATE = "2008-1-1";
int init() {
  writelog();
  return (0);
}  
int writelog() {
  int i, cnt, hlog, tm;
  string s = Symbol();
  s = StringSubstr(s, 0, 1)+StringSubstr(s, 3, 1);
  string fname = s+"_";
  cnt = Period();
  if (cnt==PERIOD_M1) fname = fname+"M1.txt";
  if (cnt==PERIOD_M5) fname = fname+"M5.txt";
  if (cnt==PERIOD_M15) fname = fname+"M15.txt";
  if (cnt==PERIOD_M30) fname = fname+"M30.txt";
  if (cnt==PERIOD_H1) fname = fname+"H1.txt";
  if (cnt==PERIOD_H4) fname = fname+"H4.txt";
  if (cnt==PERIOD_D1) fname = fname+"D1.txt";
  if (cnt==PERIOD_W1) fname = fname+"W1.txt";
  if (cnt==PERIOD_MN1) fname = fname+"MN.txt";
  cnt = CurTime() / (cnt*60);
  if (cnt!=last_write_period) {
  hlog = FileOpen(fname, FILE_CSV | FILE_WRITE, " ");
  if (hlog=0; i--) {
  tm = StrToTime(START_DATE)+(MAX_ROWS-i+1)*24*3600;
  s = TimeToStr(tm, TIME_DATE);
  s = StringSubstr(s,0,4)+"-"+StringSubstr(s,5,2)+"-"+StringSubstr(s,8,2);
  FileWrite(hlog, s, Open[i], High[i], Low[i], Close[i], Volume[i], Volume[i]);
  }
  FileClose(hlog);  
  last_write_period = cnt;  
  Print("输出GET数据文件成功.");
  Comment(TimeToStr(CurTime(), TIME_DATE), " ", TimeToStr(CurTime(), TIME_MINUTES), ":输出GET数据文件成功.");
  }
  return (0);
}  
int start() {
  return ( writelog() );
}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝1

帖子1

发布主题
阅读排行更多+

Powered by 顺水鱼MT4外汇EA网! X3.2© 2001-2017 顺水MT4外汇EA公司.( 陕ICP备17014341号-1