以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 文字描述请老师编程 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=184744) |
-- 作者:一杯沧海 -- 发布时间:2021/3/17 6:57:24 -- 文字描述请老师编程 函数定义 大阳线:1、实体是前A根最大值 <!--[if !supportLists]-->2、<!--[endif]-->上影线小于等于实体的三分之一 <!--[if !supportLists]-->3、<!--[endif]-->倍量 倍 量:成交量是前B根平均量的C倍
<!--[if !supportLists]-->1、<!--[endif]-->最新价大于480均线 <!--[if !supportLists]-->2、<!--[endif]-->大阳线 <!--[if !supportLists]-->3、<!--[endif]-->macd金叉 <!--[if !supportLists]-->4、<!--[endif]-->(大阳线收盘价-最低价+E)小于F 以上条件均满足是开仓 止损 收盘价小于大阳线最低价-E 当120均线大于进场价格,以收盘价小于120均线止损 空单策略 1、120均线小于480均线 2、120均线小于1440均线 3、收盘价小于120均线 以上条件均满足是开仓 止损 <!--[if !supportLists]-->1、<!--[endif]-->收盘价大于120均线 <!--[if !supportLists]-->2、<!--[endif]-->120均线大于于480均线 满足其中一项止损。 大写英文字母均为可调参数 A\\B\\C简单设置即可默认2,最低1最大3,步长1 谢谢~ |
-- 作者:yukizzc -- 发布时间:2021/3/17 9:50:57 -- input:A(1,1,100,1); DIF:EMA(CLOSE,12)-EMA(CLOSE,26); cond1:close>ma(close,480); if cond1 and cond2 and cond22 and cond3 and cond4 and holding<=0 then buy(1,1,marketr);
以多头为例,cond1到4分别对应你上面四个条件,建议用户自己学习下代码看看逻辑
|