金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
12
返回列表 发新帖
楼主: 曹193885

帮我转码一下,转成金字塔的

[复制链接]

4

主题

34

帖子

34

积分

Rank: 1

等级: 新手上路

注册:
2024-4-19
曾用名:
 楼主| 发表于 2025-3-6 13:33 | 显示全部楼层
什么意思不明白您说的
回复

使用道具 举报

44

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2025-3-6 13:34 | 显示全部楼层
不要代码都堆在一起,这样不好修改的

就好比你阅读文章,所有内容堆在一起和有分层的段落的
哪一个更容易阅读呢
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

4

主题

34

帖子

34

积分

Rank: 1

等级: 新手上路

注册:
2024-4-19
曾用名:
 楼主| 发表于 2025-3-6 13:34 | 显示全部楼层
sj:=if(date+19000000<22300414,1,0);
{+4天上方时间为准}var2:=ema(close,120)*sj;
var3:=(close*sj-var2*sj)*2/(120+1)+var2;
生命线:=var3*sj,linethick2,color0000ff;
xclose2:=ema((open+high+low+close)/4,3);
if((生命线>=xclose2),生命线,drawnull),linethick2,color00ff00;
if((生命线<xclose2),生命线,drawnull),linethick2,color0000ff;
ma3:=ma(c,170);
hh1:=if(h<ref(h,1)&&ref(h,1)<ref(h,2),ref(h,2),0);
ll1:=if(l>ref(l,1)&&ref(l,1)>ref(l,2),ref(l,2),0);
hh2:=valuewhen(hh1>0,hh1);ll2:=valuewhen(ll1>0,ll1);
hh:=hhv(high,1)/10*sj+hhv(high,2)/10+hhv(high,2)/10+hhv(high,4)/10+hhv(high,4)/10+hhv(high,8)/10+hhv(high,8)/10+hhv(high,13)/10+hhv(high,40)/10+hhv(high,20)/10;
ll:=llv(low,1)/10*sj+llv(low,2)/10+llv(low,2)/10+llv(low,4)/10+llv(low,4)/10+llv(low,8)/10+llv(low,8)/10+llv(low,13)/10+llv(low,40)/10+llv(low,20)/10;
h1:=if(hh<ref(hh,1)&&ll<ref(ll,1)&&ref(open,1)>close&&open>close&&(hhv(open,0)-close)>0,ref(hh,2),0);
l1:=if(ll>ref(ll,1)&&hh>ref(hh,1)&&ref(open,1)<close&&open<close&&(close-llv(open,0))>0,ref(ll,2),0);x:=date;
x0:=h1,linethick2;
x00:=l1;
xxx0:=o,linethick2;
xxx00:=c;
xxx000:=h;
xxx0000:=l;
h2:=valuewhen(x0>0,x0),linethick2;
l2:=valuewhen(x00>0,x00),linethick2;
k1:=if(close>h2,-3,if(close<l2,1,0));
k2:=valuewhen(k1<>0,k1);
g:=if(k2=1,h2,l2);
g1:=valuewhen(islastbar,g);
drawnumber(l>0,g1,g1,7),colorcyan;
drawnumber(ll>0,g1,g1,7),colorwhite;
x000:=k2,linethick2;
tmp:=k2,linethick2;
w1:=x000,linethick2;
x0000:=open-close,linethick2;
w2:=x0000,linethick2;
ht:=if(open>close,open,close),linethick2;
lt:=if(open<close,open,close),linethick2;
stickline(w1=1,xxx000,ht,0,0),colorcyan;
stickline(w1=1,xxx0000,lt,0,0),colorcyan;
stickline(w1=-3,xxx000,ht,0,0),colorred;
stickline(w1=-3,xxx0000,lt,0,0),colorred;
stickline(w1>0,xxx0,xxx00,3,1),colorcyan;
stickline(w1<=0,xxx0,xxx00,3,1),colorred;
stickline(w2>0&&w1<=0,xxx0,xxx00,3,0),colorred;
stickline(w2>0&&w1>0,xxx0,xxx00,3,0),colorcyan;
if(k2=1,g,drawnull),colorcyan;
if(k2=-3,g,drawnull),colorred;
drawtext(cross(tmp,0),hh,'空'),colorgreen;
drawtext(cross(0,tmp),ll,'多');n3:=barslast(cross(w1>0,0.5)),linethick2;
n4:=barslast(cross(w1<=0,0.5)),linethick2;
hh3:=if(w1<=0,ref(hhv(h,n4),n3),drawnull),coloryellow;
ll3:=if(w1>0,ref(llv(l,n3),n4),drawnull),colorgreen;
b:=cross(c,hh3)  or ref(if(hh3=drawnull,1,drawnull),1)&&c>hh3;
s:=cross(ll3,c) or ref(if(ll3=drawnull,1,drawnull),1)&&c<ll3;{drawicon(b=1,l, 25);drawicon(s=1,h, 27);}
lc:= ref(close,1),linethick2;
rsi:=sma(max(close-lc, 0), 6, 1)/sma(abs(close-lc), 6, 1)*100,linethick2;{drawtext(filter(cross(rsi,30) and (close>ref(high,1.5)),5),low-low*0.001,'空止赢'),coloryellow;
drawtext(filter(cross(70,rsi) and (close<ref(low,1.5)),5),high+high*0.001,'多止赢'),colormagenta;};
yjd:=if(date+19000000>20210410,1,0);
drawtextex(islastbar=1 and yjd,1,0.1,0.2,' '),coloryellow;


kd:cross(0,tmp);
ss:=100;//默认下单手数
buy(kd,ss,market);
回复

使用道具 举报

4

主题

34

帖子

34

积分

Rank: 1

等级: 新手上路

注册:
2024-4-19
曾用名:
 楼主| 发表于 2025-3-6 13:35 | 显示全部楼层
这个是您之前给我转码的,但是里面没有平仓逻辑,你吧开空变成平仓多单的就好了,因为我拿来做股票,不需要开空的
回复

使用道具 举报

44

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2025-3-6 13:35 | 显示全部楼层
这个直接用就行了
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

4

主题

34

帖子

34

积分

Rank: 1

等级: 新手上路

注册:
2024-4-19
曾用名:
 楼主| 发表于 2025-3-6 13:38 | 显示全部楼层
用不了啊,没有平仓的,
回复

使用道具 举报

4

主题

34

帖子

34

积分

Rank: 1

等级: 新手上路

注册:
2024-4-19
曾用名:
 楼主| 发表于 2025-3-6 13:38 | 显示全部楼层
我是拿来做股票的,要吧里面的开空信号变成平多的信号理解不
回复

使用道具 举报

44

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2025-3-6 13:40 | 显示全部楼层
sell(cross(tmp,0),holding,marketr)

最后加一个这个
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2025-7-16 03:04 , Processed in 0.108031 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表