Rss & SiteMap

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

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

标题:多单止盈,空单止盈 如何写?

1楼
徐先生 发表于:2015/6/11 21:37:17
多单止盈,空单止盈  如何写?
2楼
jinzhe 发表于:2015/6/12 8:46:33

if 多单止盈条件  and holding>0 then  sell(1,0,market);

if 空单止盈条件  and holding<0 then sellshort(1,0,market);

3楼
徐先生 发表于:2015/6/12 9:41:57
帅哥,在线噢!
谢谢  jinzhe 老师
4楼
徐先生 发表于:2015/6/12 9:43:24
jinzhe  老师      一天只做一次单   如何写?
5楼
jinzhe 发表于:2015/6/12 9:49:09
日线周期还是分钟线?
6楼
徐先生 发表于:2015/6/12 10:19:57
如果是  日线周期?
7楼
jinzhe 发表于:2015/6/12 10:24:31

variable:n=0;

if 开多条件 and holding=0 and n=0 then begin

  buy(1,1,market);

   n:=1;

end

 

if 开空条件 and holding=0 and n=0 then begin

   buyshort(1,1,market);

   n:=1;

end

 

然后下面就是日线和分钟线的区别了:

日线:

n:=0;

 

分钟线:

if time=closetime(0) then n:=0;

8楼
徐先生 发表于:2015/6/12 10:57:09
谢谢  
jinzhe  老师 
9楼
徐先生 发表于:2015/6/15 14:26:13
jinzhe  老师 
帮我改一下  图表程序化

C>MA(C,5);
KD:=C>MA(C,5);          //开多条件
PD:=C<MA(C,5);          //平多条件
KK:=C<MA(C,5);          //开空条件
PK:=C>MA(C,5);          //平空条件


平空:SELLSHORT(PK,1,THISCLOSE);                  //平空信号
开多:BUY(KD AND HOLDING=0,1,THISCLOSE);          //开多信号
平多:SELL(PD,1,THISCLOSE);                       //平多信号
开空:BUYSHORT(KK AND HOLDING=0,1,THISCLOSE);     //开空信号

if 多单  and holding>30 then  sell(1,0,market);//多单止盈条件30

if 空单  and holding<30 then sellshort(1,0,market);//空单止盈条件30


variable:n=0;

if 开多条件 and holding=0 and n=0 then begin  //日线周期做一次单 


  buy(1,1,market);

   n:=1;

end

 

if 开空条件 and holding=0 and n=0 then begin//日线周期做一次单 

   buyshort(1,1,market);

   n:=1;

end

10楼
jinzhe 发表于:2015/6/15 14:27:00
改什么?
共16 条记录, 每页显示 10 条, 页签: [1] [2]


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