Rss & SiteMap

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

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

标题:[求助]黄金分割率 交易公式编写

1楼
cewuya 发表于:2017/6/5 15:45:41
金叉ma5穿ma10,买入, 以买入点前最低点,到目前高点的黄金分割0.618下破,卖出
2楼
pyd 发表于:2017/6/5 16:27:17
以买入点前最低点是指买入那个k线的最低价?
3楼
cewuya 发表于:2017/6/5 16:47:57
以,买入点之前一个波段的近期低点

4楼
pyd 发表于:2017/6/5 17:34:21

波段怎么定义?

5楼
cewuya 发表于:2017/6/9 12:44:14
10个周期内的最低和最高点,做黄金分割,可以吗?这两个点的0.618止损50%,跌破0.5,全部止损。
谢谢
6楼
pyd 发表于:2017/6/9 13:08:36
ma5:ma(c,5);
ma10:ma(c,10);
jc:cross(ma5,ma10);
buy(jc and holding=0,手数,marketr);
ll:=ref(llv(l,10),enterbars+1);
hh:=hhv(h,enterbars+1);
if c<=hh-(1-0.68)*(hh-ll) and holding>0 then sell(1,50%,marketr);
if c<=hh-0.5*(hh-ll) and holding>0 then sell(1,holding,marketr)
7楼
cewuya 发表于:2017/6/13 13:55:46
谢谢
8楼
cewuya 发表于:2017/6/15 8:53:57
你好,

ma5:ma(c,5);
ma10:ma(c,10);
jc:cross(ma5,ma10);
buy(jc and holding=0,手数,marketr);
ll:=ref(llv(l,10),enterbars+1);
hh:=hhv(h,enterbars+1);
if c<=hh-(1-0.68)*(hh-ll) and holding>0 then sell(1,50%,marketr);
if c<=hh-0.5*(hh-ll) and holding>0 then sell(1,holding,marketr)
这个公式里,怎么加上,10根k线后,突破高点加仓1次,并且1天只能加仓一次,
止损条件的时候,加上4根k线后再执行止损条件,谢谢老师

9楼
pyd 发表于:2017/6/15 8:56:53

编写中,但是建议楼主学习下编写教程:http://www.weistock.com/bbs/dispbbs.asp?boardid=16&Id=55132

 

10楼
pyd 发表于:2017/6/15 9:07:39

VARIABLE:n=0;
ss:=1;//手数
ma5:ma(c,5);
ma10:ma(c,10);
jc:cross(ma5,ma10);
buy(jc and holding=0,ss,marketr);
if n=0 and enterbars>=10 and h>ref(hhv(h,enterbars),1) and holding>0 then begin //加仓
buy(1,1,marketr);
n:=1;
end
ll:=ref(llv(l,10),enterbars+1);
hh:=hhv(h,enterbars+1);

if c<=hh-(1-0.68)*(hh-ll) and holding>0 and enterbars>=4 then sell(1,50%,marketr);
if c<=hh-0.5*(hh-ll) and holding>0  and enterbars>=4 then sell(1,holding,marketr);

if time=closetime(0) then n:=0;

[此贴子已经被作者于2017/6/15 9:07:48编辑过]
共14 条记录, 每页显示 10 条, 页签: [1] [2]


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