编写通达信Expma指标均线增加到16条,分别是2日,3日,13日,25日,50日,100日,125日,250日,500日,1000日,1250日,2500日,5000日,10000日12500日,25000日
时间: 2023-11-21 09:06:21 浏览: 152
以下是通达信Expma指标均线增加到16条的代码:
```c
/* 多空指标Expma */
/* 参数:n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16 */
/* 用法:EXPMA(CLOSE,N1),COLORRED,EXPMA(CLOSE,N2),COLORGREEN,... */
/* 代码开始: */
MA1:=EXPMA(C,N1);
MA2:=EXPMA(C,N2);
MA3:=EXPMA(C,N3);
MA4:=EXPMA(C,N4);
MA5:=EXPMA(C,N5);
MA6:=EXPMA(C,N6);
MA7:=EXPMA(C,N7);
MA8:=EXPMA(C,N8);
MA9:=EXPMA(C,N9);
MA10:=EXPMA(C,N10);
MA11:=EXPMA(C,N11);
MA12:=EXPMA(C,N12);
MA13:=EXPMA(C,N13);
MA14:=EXPMA(C,N14);
MA15:=EXPMA(C,N15);
MA16:=EXPMA(C,N16);
COLOR1:={COLORRED,COLORGREEN,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA};
COLOR2:={COLORGREEN,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW};
COLOR3:={COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN};
COLOR4:={COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE};
COLOR5:={COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK};
COLOR6:={COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE};
COLOR7:={COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA};
COLOR8:={COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW};
COLOR9:={COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN};
COLOR10:={COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE};
COLOR11:={COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK};
COLOR12:={COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE};
COLOR13:={COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA};
COLOR14:={COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW};
COLOR15:={COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN};
COLOR16:={COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE,COLORBLACK,COLORBLUE,COLORMAGENTA,COLORYELLOW,COLORCYAN,COLORWHITE};
P1:=MA1;COLORP1:=COLOR1;
P2:=MA2;COLORP2:=COLOR2;
P3:=MA3;COLORP3:=COLOR3;
P4:=MA4;COLORP4:=COLOR4;
P5:=MA5;COLORP5:=COLOR5;
P6:=MA6;COLORP6:=COLOR6;
P7:=MA7;COLORP7:=COLOR7;
P8:=MA8;COLORP8:=COLOR8;
P9:=MA9;COLORP9:=COLOR9;
P10:=MA10;COLORP10:=COLOR10;
P11:=MA11;COLORP11:=COLOR11;
P12:=MA12;COLORP12:=COLOR12;
P13:=MA13;COLORP13:=COLOR13;
P14:=MA14;COLORP14:=COLOR14;
P15:=MA15;COLORP15:=COLOR15;
P16:=MA16;COLORP16:=COLOR16;
```
其中,n1~n16 分别对应的是 2日,3日,13日,25日,50日,100日,125日,250日,500日,1000日,1250日,2500日,5000日,10000日,12500日,25000日 的周期。可以根据需要进行修改。
阅读全文