Rss & SiteMap

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

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

标题:[求助]请教公式编写

1楼
wjs 发表于:2011/2/12 12:47:17
当某一条件成立时,最后一根K线位置中某点的值做一标记,其后3-5根K线上穿或下穿时做另一标记。
例:当做空条件成立时,标记‘卖出’,其后2根K线如期发展,结果,第3~5根K线发生反转,其CLOSE
大于卖出点时,标记‘反转’或‘买入’。
谢谢!
2楼
admin 发表于:2011/2/12 13:28:26

请稍等,我们的专家正在为您编写。

请耐心等待

3楼
z7c9 发表于:2011/2/12 14:12:02

runmode:0;

variable:down=0;

if holding=0 then begin
 buyshort(1,1,limitr,close);
 drawtext(1,high,'卖出');
end 

if enterbars=1 and close<enterprice then
 down:=1;

if enterbars=2 and close<ref(close,1) then
 down:=down+1; 

if holding<0 then begin
 if down=2 and enterbars>=3 and enterbars<=5 and close>enterprice then begin
  sellshort(1,holding,limitr,close);
  drawtext(1,low,'反转');
 end
 
 if enterbars>=6 then
  sellshort(1,holding,limitr,close);
end


 

4楼
董小球 发表于:2011/2/12 14:13:38

variable:x=1,y=2;
if 条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'标记1');
end

if 空条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'卖出');
x=BARPOS;
end

now:=BARPOS;

if now-x>=3 AND now-x<=5 AND 其后2根K线如期发展的条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'反转');
end

 

 

大概的代码是这样 具体细节自己再推敲下

5楼
wjs 发表于:2011/2/12 19:29:37
谢谢二位老师。
共5 条记录, 每页显示 10 条, 页签: [1]


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