以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  在金字塔图表交易中,止盈如何写?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=81613)

--  作者:wy93222357
--  发布时间:2015/7/24 15:47:20
--  在金字塔图表交易中,止盈如何写?
请教各位老师:在金字塔图表交易中,有盘中出现盈利之后,不希望持仓由盈利转为亏损,止盈如何写?
--  作者:jinzhe
--  发布时间:2015/7/24 16:09:30
--  

打算多少点止盈?


--  作者:jinzhe
--  发布时间:2015/7/24 16:11:17
--  

那就以开多为例

if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1 then sell(1,0,market);

表示盘中有盈利, 在价格跌倒盈利一个点的情况下,止盈

 


--  作者:wy93222357
--  发布时间:2015/7/27 10:09:11
--  
谢谢!
--  作者:wy93222357
--  发布时间:2015/7/27 10:29:13
--  

请教能不能这样写?在第8根棒之后,当市场价格低于1个点时。平仓止盈。

 

if holding>0 and hhv(h,8)>enterprice and  close-enterprice<=1  then sell(1,0,market);


--  作者:jinzhe
--  发布时间:2015/7/27 10:32:49
--  

那就是

if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1  and enterbars>8 then sell(1,0,market);


--  作者:wy93222357
--  发布时间:2015/7/27 10:48:56
--  
哦,十分感谢!
--  作者:wy93222357
--  发布时间:2015/7/27 11:07:21
--  

大师请教一下,enterprice是一个常量,enterprice+1>=1成了一个变量,怎么理解?close-enterprice<=1 比较好理解一点。

 

 

 


--  作者:jinzhe
--  发布时间:2015/7/27 11:11:12
--  

按照高中的数学不等式的计算,

l<=enterprice+1 和l-enterprice<=1是一个意思

怎么就不能理解了


--  作者:wy93222357
--  发布时间:2015/7/27 14:19:24
--  

if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1  and enterbars>8 then sell(1,0,market);是不是可以换成以下写法:

 

if holding>0 and hhv(h,enterbars+1)>enterprice+1 and close- enterprice<=1 and enterbars>8 then sell(1,0,market);