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

 找回密码
 立即注册
查看: 7620|回复: 2
打印 上一主题 下一主题

关于交易函数的一些建议 [复制链接]



Rank: 8Rank: 8

1#
发表于 2013-4-3 10:27:03 |显示全部楼层 | [分享到 腾讯微博 新浪微博]
  SK(卖开),   BK(买开),   SP(卖平),   BP(买平)四个函数对应金魔方的
  sellshort(卖开),buy(买开),buytocover(卖平),sell(买平)。

,就是洗了一个程序之后,一旦开始,就总是出现平仓指令,这是怎么回事。
能截个图看看嘛
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: 8Rank: 8

2#
发表于 2013-4-3 10:41:52 |显示全部楼层 | [分享到 腾讯微博 新浪微博]
用这个组合OT_MARKET,OB_THISBAR
要在代码最开始加

#Run_Every_Tick

点评

masterxl  了解了 多谢  发表于 2013-4-3 10:58
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: 8Rank: 8

3#
发表于 2013-4-3 14:15:19 |显示全部楼层 | [分享到 腾讯微博 新浪微博]
if ... then buy,前面没加run_every_tick,是用的默认参数
Buy('Symbol'='', Lots=DEFAULT, Price=0, Slippage=0,OT=OT_Market, OB=OB_NextBar, EntryName='')
下个bar市价开仓。

加run_every_tick,一般是配合OT_MARKET,OB_THISBAR,本根K线上,每来一个tick,触发公式执行一次
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-5-18 13:46 , Processed in 0.085938 second(s), 9 queries .

花生网 Copyright©2012-2014

回顶部