Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共29 条记录, 每页显示 10 条, 页签: [1] [2][3]
[浏览完整版]

标题:用于日内交易的公式请老师 帮忙编写一个谢谢

1楼
lqi1000 发表于:2016/11/30 12:29:13
用于日内的   分时图持仓量创新高同时 价格创新高则开多  
2楼
jinzhe 发表于:2016/11/30 13:11:15
if openint=hhv(openint,todaybar) and h=hhv(h,todaybar) then buy(1,1,market);
3楼
lqi1000 发表于:2016/11/30 15:15:29
老师 我刚接触程序化 是个新手  请您帮忙把我一个简单的策略写出来 
1多头,开盘15分钟后价格创日内新高的同时分时图的持仓量也同步创新高并且涨跌幅的绝对值小于3% 则平空开多 。然后固定止损开仓价回撤1%或者跌破分时均价线平仓。  保本止损:如果盈利大于1%则止损价为开仓价。 移动止损: 如果盈利幅度大于3% ,则回撤1%就平仓。   下午三点收盘平仓, 夜盘收盘平仓 。  
2空头,开盘15分钟后价格创日内新低的同时分时图的持仓量也创新高并且涨跌幅的绝对值小于3% 则平多开空。 然后固定止损开仓价回撤1%或者上穿分时均价线平仓。  保本止损:如果盈利大于1%则止损价为开仓价。 移动止损: 如果盈利幅度大于3%, 则回撤1%就平仓  。 下午三点收盘平仓, 夜盘收盘平仓 。
4楼
jinzhe 发表于:2016/11/30 15:26:12


n1:=todaybar;

dm:=4-INTPART(LOG(C));

jj:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);

zf:=abs((c-ref(c,todaybar))/ref(c,todaybar));

if todaybar>15 and h=hhv(h,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sellshort(1,0,market);
 buy(holding=0,1,market);
end

if cross(jj,c) or (c<enterprice*0.99) then sell(1,0,thisclose);
if c>=enterprice*1.01 then sell(1,0,thisclose);
if hhv(h,enterbars+1)>=enterprice*1.03 and c<=enterprice*1.02 then sell(1,0,thisclose);


if todaybar>15 and l=llv(l,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sell(1,0,market);
 buyshort(holding=0,1,market);
end

if cross(close,jj) or (c>=enterprice*1.01) then sellshort(1,0,thisclose);
if c<=enterprice*0.99 then sellshort(1,0,thisclose);
if llv(l,enterbars+1)<=enterprice*0.97 and c>=enterprice*0.98 then sellshort(1,0,thisclose);


if (time=closetime(1)) or (time=closetime(0)) then begin
 sell(1,0,thisclose);
 sellshort(1,0,thisclose);
end

 

5楼
lqi1000 发表于:2016/11/30 16:54:44
谢谢老师 我测试看看
6楼
lqi1000 发表于:2016/12/2 9:38:30
老师 您上面的公式有个问题 我描述的保本止损没有编写正确  你看下 :if c>=enterprice*1.01 then sell(1,0,thisclose);   这个应该是盈利1%就平仓 而不是盈利1%设置保本止损。您再看下然后老师修改之后帮我编出后台程序化的模型吧  图表品种太多又些卡 谢谢了
7楼
jinzhe 发表于:2016/12/2 9:45:57

请定义下保本止损的概念,以及和移动止损的区别

8楼
jinzhe 发表于:2016/12/2 9:46:10
后台交易请用户出示专业版帐号
9楼
lqi1000 发表于:2016/12/2 10:27:21
我是这样想的 一开始 用固定止损1%  当有盈利且大于1%也就是盈亏比至少为1  这个时候采取保本止损 就是盈利大于1%防止在变成亏损单 ,当盈利大于1%并未回到成本价就持有直到盈利大于3%,采取移动止损保护利润就是回撤1%平仓 因为做日内 所以涨跌停也要平仓 。金字塔专业版账号102268 五矿期货的
10楼
lqi1000 发表于:2016/12/2 10:28:51
保本止损就是盈利大于1%后如果价格再回到成本价 即小于成本价平仓
共29 条记录, 每页显示 10 条, 页签: [1] [2][3]


Powered By Dvbbs Version 8.3.0
Processed in 0.00781 s, 3 queries.