以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 老师好,帮忙编个程序 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=56481) |
-- 作者:yhl99414 -- 发布时间:2013/9/10 23:38:56 -- 老师好,帮忙编个程序 突破首根k线最高点开多仓3手,突破首根k线最低点开空仓3手。 止盈:1/3止盈33点,止盈后剩下2手设回调止损10点(实质盈利10点); 1/3止盈44点,止盈后剩下1/3设回调一半止损,或者到收盘平仓。
|
-- 作者:jinzhe -- 发布时间:2013/9/11 8:41:13 -- 首根k线 指的是当日的第一根k线? 1/3止盈33点的意思是盈利33点后平掉1/3手持仓? |
-- 作者:90也玩期货 -- 发布时间:2013/9/11 9:24:37 -- 老师:是的 |
-- 作者:90也玩期货 -- 发布时间:2013/9/11 9:24:51 -- 不知道这个怎么写,谢谢老师 |
-- 作者:90也玩期货 -- 发布时间:2013/9/11 9:42:36 -- 老师可以回答我吗 |
-- 作者:jinzhe -- 发布时间:2013/9/11 9:44:09 -- variable:hh=0; if h>h_1 then begin if h>hh then hh:=h; if l<l_1 then begin if l<ll then ll:=l; if c-enterprice>33*mindiff then sell(holding>0,n/3,thisclose); if enterprice-c>33*mindiff then sellshort(holding<0,n/3,thisclose); if hh-h>10*mindiff and close-enterprice>10*mindiff then sell(holding>0,n*2/3,thisclose); if l-ll>10*mindiff and enterprice-close>10*mindiff then sellshort(holding<0,n*2/3,thisclose); if time=closetime(0) then begin |
-- 作者:90也玩期货 -- 发布时间:2013/9/11 10:14:40 -- 谢谢老师,辛苦了 |
-- 作者:yhl99414 -- 发布时间:2013/9/11 14:51:41 -- 90后干嘛来凑热闹? |
-- 作者:jinzhe -- 发布时间:2013/9/11 14:55:32 -- ![]() |
-- 作者:yhl99414 -- 发布时间:2013/9/11 17:36:49 -- 老师,针对白银的话,这里有个问题啊就是白银按照21点开始算第一条k线的,能不能把白天的9点开始第一条k线算首根k线??谢谢老师 |