欢迎您光临花生网社区!
| |

 找回密码
 立即注册
楼主: djy252
打印 上一主题 下一主题

新手请教,设置开多仓的止盈和止损 [复制链接]



Rank: 2

8#
发表于 2013-4-9 10:52:16 |只看该作者 | [分享到 腾讯微博 新浪微博]
bt11 发表于 2013-4-9 10:50
SetProfitTarget(profitPoint*BigPointValue);
SetStopLoss(LossPoint*BigPointValue);  
这两句放到最后吧 ...

多谢~了~~

使用道具 举报



Rank: 8Rank: 8

7#
发表于 2013-4-9 10:50:58 |只看该作者 | [分享到 腾讯微博 新浪微博]
SetProfitTarget(profitPoint*BigPointValue);
SetStopLoss(LossPoint*BigPointValue);  
这两句放到最后吧,另外,你这个公式如果用到股指,就是100*300=3万块止赢,总仓位;如果要对每手止赢,可以
SetStopContract;
SetProfitTarget(profitPoint*BigPointValue);
SetStopLoss(LossPoint*BigPointValue);  
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 2

6#
发表于 2013-4-9 10:44:25 |只看该作者 | [分享到 腾讯微博 新浪微博]
bt11 发表于 2013-4-9 10:20
if 多仓 then begin
SetProfitTarget(200);

看到编译地方了,
我设置开仓无论是多仓和空仓都设置止盈和止损,这样对吗

profitPoint := 100;
LossPoint := 20

SetProfitTarget(profitPoint*BigPointValue);
SetStopLoss(LossPoint*BigPointValue);  
       
If bEnterLong Then Buy;
If bExitLong Then Sell;
If bEnterShort Then SellShort;
If bExitShort Then BuyToCover;

使用道具 举报



Rank: 8Rank: 8

5#
发表于 2013-4-9 10:42:55 |只看该作者 | [分享到 腾讯微博 新浪微博]
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 2

4#
发表于 2013-4-9 10:39:19 |只看该作者 | [分享到 腾讯微博 新浪微博]
bt11 发表于 2013-4-9 10:20
if 多仓 then begin
SetProfitTarget(200);

请问下,修改了公式,直接保存就编译了是吗?

使用道具 举报



Rank: 2

3#
发表于 2013-4-9 10:22:49 |只看该作者 | [分享到 腾讯微博 新浪微博]
bt11 发表于 2013-4-9 10:20
if 多仓 then begin
SetProfitTarget(200);

多谢!!!!!!

使用道具 举报



Rank: 8Rank: 8

2#
发表于 2013-4-9 10:20:37 |只看该作者 | [分享到 腾讯微博 新浪微博]
if 多仓 then begin
SetProfitTarget(200);


SetStopLoss(100);
end

可以看下这些函数的帮助

另外,可以参考http://www.hs633.com/forum.php?m ... &extra=page%3D1
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册


bottom

Archiver|www.hs633.com ( 粤ICP备11107430号 )

GMT+8, 2024-6-26 14:03 , Processed in 0.070312 second(s), 7 queries .

花生网 Copyright©2012-2014

回顶部