Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共21 条记录, 每页显示 10 条, 页签: [1] [2][3]
[浏览完整版]

标题:记录初始开仓价位任何写?

1楼
系统使用者 发表于:2014/5/5 12:59:19
也就是记录第一次开仓的价位,不是后面出现的上次开仓价位。
1)比如我在9.01分开的多单价位,中间出现很多开多仓价位,我只要9.01初始的开仓价位。
就是说,记录第一次开仓的价位。
2)还有使用盘中到达的点位成交。如,我要这个价位成交: h-ENTERPRICE=3;
2楼
系统使用者 发表于:2014/5/5 12:59:28
谢谢
3楼
jinzhe 发表于:2014/5/5 13:26:23

variable:n=0;

if 开仓条件  and  持仓判断 then begin

    下单语句;

    N:=n+1;

end//开多开空都要这样写,这里只写一个作为范例

ee:valuewhen(n=1,enterprice);//这就是所求的第一次开仓价

if time=closetime(0) then n:=0;//这句话写在代码最后

 

2.什么意思?

 

4楼
系统使用者 发表于:2014/5/5 13:54:24
使用盘中到达的点位成交。如,我要这个限价成交: h-ENTERPRICE=3;
5楼
系统使用者 发表于:2014/5/5 14:06:54
variable:n=0;

if (TIME>=085600 AND TIME<=90000) then begin
tbuy(1,100,lmt,DYNAINFO(54),0);
tbuyshort(1,100,lmt,DYNAINFO(55),0);
if THOLDING2=0 and (currenttime>=94000 and currenttime>=144000) then begin
tbuy(val2>0,100,lmt,O,0);
tbuyshort(val2>0,100,lmt,O,0);
   N:=n+1;
  End
 End 
 ee:=valuewhen(n=1,enterprice);//这就是所求的第一次开仓价

If h-ENTERPRICE>=2 then begin
  tsellShort(1,10,lmt,ee+2,0);
 End
If h-ENTERPRICE>=4 then begin
  tsell(1,10,lmt,ee+4,0);
 End


6楼
系统使用者 发表于:2014/5/5 14:07:14
这样?
7楼
jinzhe 发表于:2014/5/5 14:11:23
你到底是用图表还是后台交易?
8楼
系统使用者 发表于:2014/5/5 14:59:49
后台交易
8800的版本
9楼
系统使用者 发表于:2014/5/5 16:13:04
variable:n=0;

if (TIME>=085600 AND TIME<=90000) then begin
tbuy(1,100,lmt,DYNAINFO(54),0);
tbuyshort(1,100,lmt,DYNAINFO(55),0);
if THOLDING2=0 and (currenttime>=94000 and currenttime>=144000) then begin
tbuy(val2>0,100,lmt,O,0);
tbuyshort(val2>0,100,lmt,O,0);
   N:=n+1;
  End
 End 
 ee:=valuewhen(n=1,enterprice);//这就是所求的第一次开仓价

If h-ENTERPRICE>=2 then begin
  tsellShort(1,10,lmt,ee+2,0);
 End
If h-ENTERPRICE>=4 then begin
  tsell(1,10,lmt,ee+4,0);
 End

后台交易应该如何改?
10楼
jinzhe 发表于:2014/5/5 16:25:12

后台是差不多的用法

if extgbdata('biaoji')=0 and 开仓条件 then begin
 下单语句;
 extgbdataset('biaoji',1);
 extgbdataset('kaicangjia',tenterprice);
end

if time=closetime(0) then BEGIN
 extgbdataset('biaoji',0);
 extgbdataset('kaicangjia',drawnull);
end

 

读取kaicangjia这个全局变量就行了,并且是在不等于0的情况下

 

 

你的那个把h-enterprice>4改成 (h-tenterprice)>4

 

共21 条记录, 每页显示 10 条, 页签: [1] [2][3]


Powered By Dvbbs Version 8.3.0
Processed in 0.07031 s, 3 queries.