金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 5936|回复: 40

把这个指标转化成金字塔指标,并且出现红柱开多仓

[复制链接]

3976

主题

4045

帖子

4070

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2023-7-12 09:04 | 显示全部楼层 |阅读模式
请教:把这个指标转化成金字塔指标,并且出现红柱开多仓。并且开仓数量能够修改。谢谢

嘉年华3 6:39:00
永久日:=1391212;
永久:=IF(DATE<永久日,1,DRAWNULL);
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)*永久,COLORMAGENTA,LINETHICK2;
警戒线: 80*永久,COLORYELLOW;
XIAO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1)*永久;
XIAO2:=SMA(ABS(LOW-XIAO1),13,1)/SMA(MAX(LOW-XIAO1,0),10,1)*永久;
XIAO3:=EMA(XIAO2,10)*永久;
XIAO4:=LLV(LOW,33)*永久;
XIAO5:=EMA(IF(LOW<=XIAO4,XIAO3,0),3)*永久;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,3,0 )*永久,COLOR000055;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.6,0 )*永久,COLOR000077;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.1,0 )*永久,COLOR000099;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,1.5,0 )*永久,COLOR0000BB;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.9,0 )*永久,COLOR0000DD;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.3,0 )*永久,COLOR0000FF;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,3,0)*永久,COLOR005500;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.6,0)*永久,COLOR007700;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.1,0)*永久,COLOR009900;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,1.5,0)*永久,COLOR00BB00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.9,0)*永久,COLOR00DD00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.3,0)*永久,COLOR00FF00;
主力出没:IF(XIAO5>REF(XIAO5,1),XIAO5,0)*永久,COLORRED,NODRAW;
洗盘:IF(XIAO5<REF(XIAO5,1),XIAO5,0)*永久,COLORGREEN,NODRAW;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2))*永久;
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2))*永久;
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26)*永久;
DEA:=EMA(DIFF,9)*永久,COLORFFFF00;
MACD:=(DIFF-DEA)*2*永久;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1))*永久;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1))*永久;
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA)*永久;
顶背离:=REF(CLOSE,A2+1)< CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF)*永久;
④:IF(底背离,57,0),LINETHICK3,COLORBROWN;
DRAWTEXT(底背离,15,'←MACD 底背离')*永久,COLORWHITE;
DRAWTEXT(顶背离,70,'←MACD 顶背离'),COLORGREEN;


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

使用道具 举报

19

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-7-12 09:36 | 显示全部楼层
本帖最后由 技术009 于 2023-7-12 10:30 编辑

[PEL] 复制代码
INPUT:ss(1,1,500,1);
永久日:=1391212;
永久:=IF(DATE<永久日,1,DRAWNULL);
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)*永久,COLORMAGENTA,LINETHICK2;
警戒线: 80*永久,COLORYELLOW;
XIAO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1)*永久;
XIAO2:=SMA(ABS(LOW-XIAO1),13,1)/SMA(MAX(LOW-XIAO1,0),10,1)*永久;
XIAO3:=EMA(XIAO2,10)*永久;
XIAO4:=LLV(LOW,33)*永久;
XIAO5:=EMA(IF(LOW<=XIAO4,XIAO3,0),3)*永久;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,3,0 )*永久,COLOR000055;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.6,0 )*永久,COLOR000077;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.1,0 )*永久,COLOR000099;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,1.5,0 )*永久,COLOR0000BB;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.9,0 )*永久,COLOR0000DD;

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.3,0 )*永久,COLOR0000FF;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,3,0)*永久,COLOR005500;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.6,0)*永久,COLOR007700;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.1,0)*永久,COLOR009900;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,1.5,0)*永久,COLOR00BB00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.9,0)*永久,COLOR00DD00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.3,0)*永久,COLOR00FF00;
主力出没:IF(XIAO5>REF(XIAO5,1),XIAO5,0)*永久,COLORRED,NODRAW;
洗盘:IF(XIAO5<REF(XIAO5,1),XIAO5,0)*永久,COLORGREEN,NODRAW;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2))*永久;
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2))*永久;
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26)*永久;
DEA:=EMA(DIFF,9)*永久,COLORFFFF00;
MACD:=(DIFF-DEA)*2*永久;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1))*永久;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1))*永久;
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA)*永久;
顶背离:=REF(CLOSE,A2+1)< CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF)*永久;
④:IF(底背离,57,0),LINETHICK3,COLORBROWN;
DRAWTEXT(底背离,15,'←MACD 底背离')*永久,COLORWHITE;
DRAWTEXT(顶背离,70,'←MACD 顶背离'),COLORGREEN;

buy(XIAO5>REF(XIAO5,1),ss,market);
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-7-12 10:28 来自手机 | 显示全部楼层
通达信里显示是这样的,出现红色柱子开多
Screenshot_2023-07-12-10-25-49-11_a26174d3591be45cf75c0ea8b70765e4.jpg
回复

使用道具 举报

19

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-7-12 10:30 | 显示全部楼层
红柱条件就是 XIAO5>REF(XIAO5,1) 以这个条件作为开多条件就行了。上面代码已经提供了。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-7-12 10:30 来自手机 | 显示全部楼层
导入金字塔里是这样的。是哪里出问题了吗
IMG_20230712_102952.jpg
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-7-12 10:40 来自手机 | 显示全部楼层
我这个通达信指标里有未来函数吗
回复

使用道具 举报

19

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-7-12 10:43 | 显示全部楼层
没有。

你这个指标本身是幅图指标,很多绘图效果在主图上效果不行的。
下面这个指标是单纯的下单指标,你加载在主图上用这个,幅图上你还是用你前面那段代码指标加载继续了:
[PEL] 复制代码
INPUT:ss(1,1,500,1);
永久日:=1391212;
永久:=IF(DATE<永久日,1,DRAWNULL);
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)*永久;
警戒线: 80*永久,COLORYELLOW;
XIAO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1)*永久;
XIAO2:=SMA(ABS(LOW-XIAO1),13,1)/SMA(MAX(LOW-XIAO1,0),10,1)*永久;
XIAO3:=EMA(XIAO2,10)*永久;
XIAO4:=LLV(LOW,33)*永久;
XIAO5:=EMA(IF(LOW<=XIAO4,XIAO3,0),3)*永久;
主力出没:IF(XIAO5>REF(XIAO5,1),XIAO5,0)*永久,COLORRED,NODRAW;
洗盘:IF(XIAO5<REF(XIAO5,1),XIAO5,0)*永久,COLORGREEN,NODRAW;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2))*永久;
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2))*永久;
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26)*永久;
DEA:=EMA(DIFF,9)*永久,COLORFFFF00;
MACD:=(DIFF-DEA)*2*永久;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1))*永久;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1))*永久;
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA)*永久;
顶背离:=REF(CLOSE,A2+1)< CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF)*永久;
④:IF(底背离,57,0),LINETHICK3,COLORBROWN;
DRAWTEXT(底背离,15,'←MACD 底背离')*永久,COLORWHITE;
DRAWTEXT(顶背离,70,'←MACD 顶背离'),COLORGREEN;
 
buy(XIAO5>REF(XIAO5,1),ss,market);



效果如下,主要主图和幅图是2个指标,一个交易的,一个看盘的
截图202307121043175592.png
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-7-12 10:52 来自手机 | 显示全部楼层
好的,成功了,谢谢老师。代码里开仓数量在哪里修改
回复

使用道具 举报

19

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-7-12 10:52 | 显示全部楼层
交易指标里参数ss就是手数的。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-8-15 12:58 来自手机 | 显示全部楼层
老师通达信的指标导成金字塔的指标用的什么格式
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-16 02:44 , Processed in 0.266944 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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