龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2022-11-3 11:30

【KDJ】

[code]
Input:len(9),m1(3),m2(3),overbuy(80),oversell(20);
var:rsv(50),kvalue(50),dvalue(50),JValue(50);

value1 = Close - Lowest(low,len);
value2 = Highest(high,len) - Lowest(low,len);

if value2 <> 0 then begin

rsv = 100*value1/value2;
kvalue = SMA(rsv,m1,1);
dvalue = SMA(kvalue,m2,1);
end;

JValue = 3*kvalue - 2*dvalue;

plot1(kvalue,"K",white);
plot2(dvalue,"D",yellow);
//plot3(overbuy,"80",darkgray);
//plot4(oversell,"20",darkgray);
plot5(jvalue,"J",RGB(255,0,255));

Value1 = TL_New_Self_BN(1,20,currentbar,20);

value2 = TL_New_Self_BN(1,80,currentbar,80);

TL_SetSize(value1,0.1);

TL_SetSize(value2,0.1);

TL_SetStyle(value1, 5);

TL_SetStyle(value2, 5);

TL_SetColor(value1,rgb(128,255,128));

TL_SetColor(value2,LightGray);

[/code]

页: [1]