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

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

关于复合价格的语句问题 [复制链接]



Rank: 8Rank: 8

4#
发表于 2013-4-8 10:58:27 |只看该作者 | [分享到 腾讯微博 新浪微博]
zpr:
  1.     LS:=IIF(C>=OPEN,(O+C+H)/3,(O+C+L)/3);
  2.     LS1:=IIF(C>=OPEN,(O+H)/2,(O+L)/2);
  3.     P:=SMA(LS,2,1);
  4.     JP:LS/REF(LS,1)*100,OWNERSCAle;
  5.     ZP:P/REF(P,1)*100,OWNERSCAle;
复制代码运行代码
日ZP:RefIndi('', 'zpr.zp', P_DAY, 1);
这样可以在其他周期引用日线上的zp值
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

3#
发表于 2013-4-8 10:25:43 |只看该作者 | [分享到 腾讯微博 新浪微博]
上次弄的有误,现再次表述如下------
另建公式叫ZPR:
  1. LS:=IIF(C>=OPEN,(O+C+H)/3,(O+C+L)/3);
  2. LS1:=IIF(C>=OPEN,(O+H)/2,(O+L)/2);
  3. P:=SMA(LS,2,1);
  4. JP:LS/REF(LS,1)*100,OWNERSCAle;
  5. ZP:P/REF(P,1)*100,OWNERSCAle;
复制代码运行代码


然后建一个策略叫 跨ZPR,主要是调用公式中的日线的相关值:
BSJ=LastEntryPrice;
KT=intpart((CurrentTime-LastEntryTime)/100);{分钟}
(以下在5分钟图表上跨周期调用公式ZPR中的日线ZP值)
bEnterLong :=(日ZP>100.1 && C<BSJ)或者(日ZP>100.1 && C>BSJ&& KT>=N);   //多头开仓条件
bExitLong  :=(日ZP<99.9  && C>BSJ)或者(日ZP<99.9  && C<BSJ && KT>=N);    //多头平仓条件
bEnterShort:=(日ZP<99.9  && C>BSJ)或者(日ZP<99.9  && C<BSJ && KT>=N);  //空头开仓条件
bExitShort :=(日ZP>100.1 && C<BSJ)或者(日ZP>100.1 && C>BSJ&& KT>=N);  //空头平仓条件

使用道具 举报



Rank: 8Rank: 8

2#
发表于 2013-4-3 16:35:44 |只看该作者 | [分享到 腾讯微博 新浪微博]
//J:=如果收盘价>=开盘价,则(O+C+H)/3,否则(O+C+L)/3);

j:=IIF(c>=open,(O+C+H)/3,(O+C+L)/3);
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-7-3 21:03 , Processed in 0.093750 second(s), 7 queries .

花生网 Copyright©2012-2014

回顶部