金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 965|回复: 1

老师帮忙看看指标

[复制链接]

23

主题

88

帖子

88

积分

等级: 免费版

注册:
2023-8-24
曾用名:
发表于 2023-9-7 13:00 | 显示全部楼层 |阅读模式
//线上平空开多,
//线下平多开空

A:=IFELSE(HIGH>=REF(HIGH,1)&&HIGH>=REF(HIGH,2)&&HIGH>=REF(HIGH,3),LOW,0);
B:=IFELSE(LOW<=REF(LOW,1)&&LOW<=REF(LOW,2)&&LOW<=REF(LOW,3) ,HIGH,8888888888);
P1:=IFELSE(A>REF(LOW,1),REF(LOW,1),0);
P2:=IFELSE(A>REF(LOW,2)&&A<=REF(LOW,1),REF(LOW,2),0);
P3:=IFELSE(A>REF(LOW,3)&&A<=REF(LOW,1)&&A<=REF(LOW,2),REF(LOW,3),0);
P4:=IFELSE(A>REF(LOW,4)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3),REF(LOW,4),0);
P5:=IFELSE(A>REF(LOW,5)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4),REF(LOW,5),0);
P6:=IFELSE(A>REF(LOW,6)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4)&&A<=REF(LOW,5),REF(LOW,6),0);
P7:=IFELSE(A>REF(LOW,7)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4)&&A<=REF(LOW,5)&&A<=REF(LOW,6),REF(LOW,7),0);
P8:=IFELSE(A>REF(LOW,8)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4)&&A<=REF(LOW,5)&&A<=REF(LOW,6)&&A<=REF(LOW,7),REF(LOW,8),0);
P9:=IFELSE(A>REF(LOW,9)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4)&&A<=REF(LOW,5)&&A<=REF(LOW,6)&&A<=REF(LOW,7)&&A<=REF(LOW,8),REF(LOW,9),0);
P10:=IFELSE(A>REF(LOW,10)&&A<=REF(LOW,1)&&A<=REF(LOW,2)&&A<=REF(LOW,3)&&A<=REF(LOW,4)&&A<=REF(LOW,5)&&A<=REF(LOW,6)&&A<=REF(LOW,7)&&A<=REF(LOW,8)&&A<=REF(LOW,9),REF(LOW,10),0);
AA:=P1+P2+P3+P4+P5+P6+P7+P8+P9+P10;
PP1:=IFELSE(AA>REF(LOW,1),REF(LOW,1),0);
PP2:=IFELSE(AA>REF(LOW,2)&&AA<=REF(LOW,1),REF(LOW,2),0);
PP3:=IFELSE(AA>REF(LOW,3)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2),REF(LOW,3),0);
PP4:=IFELSE(AA>REF(LOW,4)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3),REF(LOW,4),0);
PP5:=IFELSE(AA>REF(LOW,5)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4),REF(LOW,5),0);
PP6:=IFELSE(AA>REF(LOW,6)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4)&&AA<=REF(LOW,5),REF(LOW,6),0);
PP7:=IFELSE(AA>REF(LOW,7)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4)&&AA<=REF(LOW,5)&&AA<=REF(LOW,6),REF(LOW,7),0);
PP8:=IFELSE(AA>REF(LOW,8)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4)&&AA<=REF(LOW,5)&&AA<=REF(LOW,6)&&AA<=REF(LOW,7),REF(LOW,8),0);
PP9:=IFELSE(AA>REF(LOW,9)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4)&&AA<=REF(LOW,5)&&AA<=REF(LOW,6)&&AA<=REF(LOW,7)&&AA<=REF(LOW,8),REF(LOW,9),0);
PP10:=IFELSE(AA>REF(LOW,10)&&AA<=REF(LOW,1)&&AA<=REF(LOW,2)&&AA<=REF(LOW,3)&&AA<=REF(LOW,4)&&AA<=REF(LOW,5)&&AA<=REF(LOW,6)&&AA<=REF(LOW,7)&&AA<=REF(LOW,8)&&AA<=REF(LOW,9),REF(LOW,10),0);
AAA:=PP1+PP2+PP3+PP4+PP5+PP6+PP7+PP8+PP9+PP10;
C11:=VALUEWHEN(AAA>0,AAA);
T1:=IFELSE(B<REF(HIGH,1),REF(HIGH,1),0);
T2:=IFELSE(B<REF(HIGH,2)&&B>=REF(HIGH,1),REF(HIGH,2),0);
T3:=IFELSE(B<REF(HIGH,3)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2),REF(HIGH,3),0);
T4:=IFELSE(B<REF(HIGH,4)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3),REF(HIGH,4),0);
T5:=IFELSE(B<REF(HIGH,5)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4),REF(HIGH,5),0);
T6:=IFELSE(B<REF(HIGH,6)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4)&&B>=REF(HIGH,5),REF(HIGH,6),0);
T7:=IFELSE(B<REF(HIGH,7)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4)&&B>=REF(HIGH,5)&&B>=REF(HIGH,6),REF(HIGH,7),0);
T8:=IFELSE(B<REF(HIGH,8)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4)&&B>=REF(HIGH,5)&&B>=REF(HIGH,6)&&B>=REF(HIGH,7),REF(HIGH,8),0);
T9:=IFELSE(B<REF(HIGH,9)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4)&&B>=REF(HIGH,5)&&B>=REF(HIGH,6)&&B>=REF(HIGH,7)&&B>=REF(HIGH,8),REF(HIGH,9),0);
T10:=IFELSE(B<REF(HIGH,10)&&B>=REF(HIGH,1)&&B>=REF(HIGH,2)&&B>=REF(HIGH,3)&&B>=REF(HIGH,4)&&B>=REF(HIGH,5)&&B>=REF(HIGH,6)&&B>=REF(HIGH,7)&&B>=REF(HIGH,8)&&B>=REF(HIGH,9),REF(HIGH,10),0);
BB:=IFELSE((T1+T2+T3+T4+T5+T6+T7+T8+T9+T10)=0,888888,T1+T2+T3+T4+T5+T6+T7+T8+T9+T10);
TT1:=IFELSE(BB<REF(HIGH,1),REF(HIGH,1),0);
TT2:=IFELSE(BB<REF(HIGH,2)&&BB>=REF(HIGH,1),REF(HIGH,2),0);
TT3:=IFELSE(BB<REF(HIGH,3)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2),REF(HIGH,3),0);
TT4:=IFELSE(BB<REF(HIGH,4)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3),REF(HIGH,4),0);
TT5:=IFELSE(BB<REF(HIGH,5)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4),REF(HIGH,5),0);
TT6:=IFELSE(BB<REF(HIGH,6)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4)&&BB>=REF(HIGH,5),REF(HIGH,6),0);
TT7:=IFELSE(BB<REF(HIGH,7)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4)&&BB>=REF(HIGH,5)&&BB>=REF(HIGH,6),REF(HIGH,7),0);
TT8:=IFELSE(BB<REF(HIGH,8)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4)&&BB>=REF(HIGH,5)&&BB>=REF(HIGH,6)&&BB>=REF(HIGH,7),REF(HIGH,8),0);
TT9:=IFELSE(BB<REF(HIGH,9)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4)&&BB>=REF(HIGH,5)&&BB>=REF(HIGH,6)&&BB>=REF(HIGH,7)&&BB>=REF(HIGH,8),REF(HIGH,9),0);
TT10:=IFELSE(BB<REF(HIGH,10)&&BB>=REF(HIGH,1)&&BB>=REF(HIGH,2)&&BB>=REF(HIGH,3)&&BB>=REF(HIGH,4)&&BB>=REF(HIGH,5)&&BB>=REF(HIGH,6)&&BB>=REF(HIGH,7)&&BB>=REF(HIGH,8)&&BB>=REF(HIGH,9),REF(HIGH,10),0);
BBB:=TT1+TT2+TT3+TT4+TT5+TT6+TT7+TT8+TT9+TT10;
D:=VALUEWHEN(BBB>0,BBB);
UD:=IFELSE(CLOSE>D&&REF(CLOSE,1)<=D,1,IFELSE(CLOSE<C11&&REF(CLOSE,1)>=C11,-3,0));
K:=VALUEWHEN(UD<>0,UD);
G:IFELSE(K=1,C11,D),DOT;//COLORRED
POLYLINE(LOW>0,G,COLORGRAY),DOT;//COLORLIGHTGREEN
//G1:=VALUEWHEN(ISLASTBAR,G);
//DRAWNUMBER(LOW>0,G1,G1,0,COLORCYAN);

CC:=C;
DD:=CC>D;
DK:=CC<C11;


KD:=STKINDI('','GG.DD',0,5,0) AND DD;          //开多条件
PD:=CC<C11;          //平多条件
KK:=STKINDI('','BBO.DK',0,5,0) AND DK;          //开空条件
PK:=CC>D;          //平空条件


平空:SELLSHORT(PK,SS,THISCLOSE);                  //平空信号
开多:BUY(KD AND HOLDING=0,SS,THISCLOSE);          //开多信号
平多:SELL(PD,SS,THISCLOSE);                       //平多信号
开空:BUYSHORT(KK AND HOLDING=0,SS,THISCLOSE);     //开空信号




小周期引用1小时周期;1小时周期收盘价小于G,且小周期收盘价小于G时,开空,小周期收盘价大于G时,平空;
小周期引用1小时周期;1小时周期收盘价大于G,且小周期收盘价大于G时,开多,小周期收盘价小于G时,平多;

老师帮忙看下,我哪里写错了,只能看到开多线,而看不到开空线。

回复

使用道具 举报

14

主题

223

帖子

308

积分

Rank: 9Rank: 9Rank: 9

等级: 管理员

注册:
2021-5-18
曾用名:
发表于 2024-7-1 14:38 | 显示全部楼层
KK:=STKINDI('','BBO.DK',0,5,0) AND DK;

将KK条件,输出到K线图上,看看是否有满足条件为1的,
像加一句
KK1:KK,linethick0;
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 16:30 , Processed in 0.212605 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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