Rss & SiteMap

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

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

标题:请老师吧交易系统改成指标带信号的

1楼
第一魔尊 发表于:2016/11/8 16:50:39

runmode:0;

input:length1(10,5,60,5);
input:length2(5,5,60,5);

ama:=md(close,length1);

ama1:=ema(ama,length2);

entrylongcond:=ref(cross(ama,ama1),1);
entryshortcond:=ref(cross(ama1,ama),1);

if holding=0 then begin
 if entrylongcond then
  buy(1,1,limitr,open);
end

if holding=0 then begin
 if entryshortcond then
  buyshort(1,1,limitr,open);
end

if holding>0 then begin
 if entryshortcond then begin
  sell(1,holding,limitr,open);
  buyshort(1,1,limitr,open);
 end
end

if holding<0 then begin
 if entrylongcond then begin
  sellshort(1,holding,limitr,open);
  buy(1,1,limitr,open);
 end
end

盈亏:asset-50000,noaxis,colorred,linethick2;

2楼
jinzhe 发表于:2016/11/8 16:54:14

 

input:length1(10,5,60,5);
input:length2(5,5,60,5);

ama:=md(close,length1);

ama1:=ema(ama,length2);

entrylongcond:=ref(cross(ama,ama1),1);
entryshortcond:=ref(cross(ama1,ama),1);

drawtext(cross(entrylongcond,0.5),h,'买入'),pxup20;
drawtext(cross(entryshortcond,0.5),l,'卖出'),pxdn10;

3楼
第一魔尊 发表于:2016/11/15 18:05:51
谢谢
[此贴子已经被作者于2016-11-15 18:07:02编辑过]
4楼
第一魔尊 发表于:2016/11/15 18:50:55
怎么看到指标计算出来的线呢,能显示出来嘛
5楼
jinzhe 发表于:2016/11/16 8:53:35

ama:=md(close,length1);

ama1:=ema(ama,length2);

 

去掉两个等号即可

共5 条记录, 每页显示 10 条, 页签: [1]


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