Rss & SiteMap

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

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

标题:求助????关于止损问题???

1楼
golding 发表于:2014/5/13 16:16:18

原程序:

//止损3个点
if ENTERPRICE-l>=3*mindiff then
sell(1,holding,market);
if h-ENTERPRICE>=3*mindiff then
sellshort(1,holding,market);
//回落到1个点止盈
if h-enterprice>=3*mindiff THEN
n:=1;
if n=1 and h-ENTERPRICE<=1*mindiff then
sell(1,holding,market);
if enterprice-l>=3*mindiff then
m:=1;
if m=1 and ENTERPRICE-l<=1*mindiff then
sellshort(1,holding,market);


改成带“后台”程序按下述安求:

    A.当亏损:1个点 平仓
    B.赚钱:1个点或以上,自动设置止盈:0.2个点,如果价格没有回到止盈价格,让利润去漂。
                                                               如果价格回到止盈价格,自动平仓。

2楼
jinzhe 发表于:2014/5/13 16:34:19

if dynainfo(7)-tenterprice>1 and tsellholding(0)>0 then tsellshort(1,0,mkt);

if tenterprice-dynainfo(7)>1 and tbuyholding(0)>0 then tsell(1,0,mkt);

 

if dynainfo(7)-tenterprice>1 and dynainfo(7)<hhv(h,tenterbars+1)-0.2 and tbuyholding(0)>0 then tsell(1,0,mkt);

if tenterprice-dynainfo(7)>1 and dynainfo(7)>llv(l,tenterbars+1)+0.2 and tsellholding(0)>0 then tsellshort(1,0,mkt);

3楼
golding 发表于:2014/5/14 10:47:02

if dynainfo(7)-tenterprice>1 and tsellholding(0)>0 then tsellshort(1,0,mkt);

if tenterprice-dynainfo(7)>1 and tbuyholding(0)>0 then tsell(1,0,mkt);

 

经测试:相差0.2就自动平仓。 是不是你们软件定义:1个点止损,就是0.2????

4楼
golding 发表于:2014/5/14 11:00:35

if dynainfo(7)-tenterprice>1 and dynainfo(7)<hhv(h,tenterbars+1)-0.2 and tbuyholding(0)>0 then tsell(1,0,mkt);

if tenterprice-dynainfo(7)>1 and dynainfo(7)>llv(l,tenterbars+1)+0.2 and tsellholding(0)>0 then tsellshort(1,0,mkt);

 

B.赚钱:1个点或以上,自动设置止盈:0.2个点,如果价格没有回到止盈价格,让利润去漂。
                                                               如果价格回到止盈价格,自动平仓。

 

经测试:不会自动设置止盈:0.2个点。

5楼
golding 发表于:2014/5/14 11:02:41

if dynainfo(7)-tenterprice>1 and tsellholding(0)>0 then tsellshort(1,0,mkt);

if tenterprice-dynainfo(7)>1 and tbuyholding(0)>0 then tsell(1,0,mkt);

 

经测试:相差0.2就自动平仓。 是不是你们软件定义:1个点止损,就是0.2????


  单帖管理 | 引用 | 回复 | 编辑 | 回到顶部
golding
4楼 | 信息 | 搜索 | 邮箱


加好友 发短信
等级:新手上路 帖子:3 积分:0 威望:0 精华:0 注册:2014/5/13 16:14:34
   发帖心情Post By:2014/5/14 11:00:35

if dynainfo(7)-tenterprice>1 and dynainfo(7)<hhv(h,tenterbars+1)-0.2 and tbuyholding(0)>0 then tsell(1,0,mkt);

if tenterprice-dynainfo(7)>1 and dynainfo(7)>llv(l,tenterbars+1)+0.2 and tsellholding(0)>0 then tsellshort(1,0,mkt);

 

B.赚钱:1个点或以上,自动设置止盈:0.2个点,如果价格没有回到止盈价格,让利润去漂。
                                                               如果价格回到止盈价格,自动平仓。

 

经测试:不会自动设置止盈:0.2个点。

6楼
jinzhe 发表于:2014/5/14 11:15:57

if dynainfo(7)-tenterprice>1 and tsellholding(0)>0 then tsellshort(1,0,mkt);

if tenterprice-dynainfo(7)>1 and tbuyholding(0)>0 then tsell(1,0,mkt);

 

if dynainfo(7)-tenterprice>1 and dynainfo(7)<(hhv(h,tenterbars+1)-0.2) and tbuyholding(0)>0 then tsell(1,0,mkt);

if tenterprice-dynainfo(7)>1 and dynainfo(7)>(llv(l,tenterbars+1)+0.2) and tsellholding(0)>0 then tsellshort(1,0,mkt);

加了一个括号,让后面的计算先进行了,看看这个效果怎么样

7楼
golding 发表于:2014/5/14 14:27:08
关于止损,止盈的问题,最好你们写个简单的程序测试一些,给到客户最好。总之,后面加了括号的,也是有问题的。
8楼
jinzhe 发表于:2014/5/14 14:36:11
举例说明问题
9楼
golding 发表于:2014/5/14 15:06:04
第一个问题: 

if dynainfo(7)-tenterprice>1 and tsellholding(0)>0 then tsellshort(1,0,mkt);

if tenterprice-dynainfo(7)>1 and tbuyholding(0)>0 then tsell(1,0,mkt);

 

经测试:相差0.2就自动平仓。

 

第二个问题:

if dynainfo(7)-tenterprice>1 and dynainfo(7)<(hhv(h,tenterbars+1)-0.2) and tbuyholding(0)>0 then tsell(1,0,mkt);

if tenterprice-dynainfo(7)>1 and dynainfo(7)>(llv(l,tenterbars+1)+0.2) and tsellholding(0)>0 then tsellshort(1,0,mkt);

 

经测试:说明一些股指1个点就是300元,是由5个0.2组成的。 赚1个或以上,自动设定止盈0.2 ,上面的0.2止盈,没有作用。

10楼
golding 发表于:2014/5/14 15:13:34
求助????关于止损问题???  发帖心情 Post By:2014/5/13 16:16:18 [只看该作者]

原程序:

//止损3个点
if ENTERPRICE-l>=3*mindiff then
sell(1,holding,market);
if h-ENTERPRICE>=3*mindiff then
sellshort(1,holding,market);
//回落到1个点止盈
if h-enterprice>=3*mindiff THEN
n:=1;
if n=1 and h-ENTERPRICE<=1*mindiff then
sell(1,holding,market);
if enterprice-l>=3*mindiff then
m:=1;
if m=1 and ENTERPRICE-l<=1*mindiff then
sellshort(1,holding,market);


改成带“后台”程序按下述安求:

    A.当亏损:1个点 平仓
    B.赚钱:1个点或以上,自动设置止盈:0.2个点,如果价格没有回到止盈价格,让利润去漂。
                                                               如果价格回到止盈价格,自动平仓。

共80 条记录, 每页显示 10 条, 页签: [1] [2][3][4][5][6][7][8]


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