커뮤니티
rsx 폭
1.시뮬레이션 차트에서는, 논리값(참/거짓)이나 논리 표현식이 와야합니다. 뜨며 오류.
2.매수 매도 조건추가
최근 100봉중 최저가가 최고가에서 -10 p 아래이고, 100봉중 최저가에서 +2 p 아래일 때 양전환만 매수.
(많이 하락한 저점 부근에서만 매수)
매도는 반대. 감사합니다.
input : length(14),obLevel(70),osLevel(30);
input : highlightBreakouts(true);
var : src(0),f8(0),f10(0),v8(0),f18(0),f20(0),f28(0),f30(0);
var : vc(0),f38(0),f40(0),v10(0),f48(0),f50(0),v14(0),f58(0);
var : f60(0),v18(0),f68(0),f70(0),v1c(0),f78(0),f80(0),v20(0);
var : f88(0),f88_(0),f90_(0),f0(0),f90(0),v4_(0),rsx(0),rsxColor(0);
var : t(0),tx(0);
src = (h+l+c)/3;
f8 = 100 * src;
f10 = IFF(IsNan(f8[1])==true,0,f8[1]);
v8 = f8 - f10;
f18 = 3 / (length + 2);
f20 = 1 - f18;
f28 = 0.0;
f28 = f20 * IFF(IsNan(f28[1])==true,0,f28[1]) + f18 * v8;
f30 = 0.0;
f30 = f18 * f28 + f20 * IFF(IsNan(f30[1])==true,0,f30[1]);
vC = f28 * 1.5 - f30 * 0.5;
f38 = 0.0;
f38 = f20 * IFF(IsNan(f38[1])==true,0,f38[1]) + f18 * vC;
f40 = 0.0;
f40 = f18 * f38 + f20 * IFF(IsNan(f40[1])==true,0,f40[1]);
v10 = f38 * 1.5 - f40 * 0.5;
f48 = 0.0;
f48 = f20 * IFF(IsNan(f48[1])==true,0,f48[1]) + f18 * v10;
f50 = 0.0;
f50 = f18 * f48 + f20 * IFF(IsNan(f50[1])==true,0,f50[1]);
v14 = f48 * 1.5 - f50 * 0.5;
f58 = 0.0;
f58 = f20 * IFF(IsNan(f58[1])==true,0,f58[1]) + f18 * abs(v8);
f60 = 0.0;
f60 = f18 * f58 + f20 * IFF(IsNan(f60[1])==true,0,f60[1]);
v18 = f58 * 1.5 - f60 * 0.5;
f68 = 0.0;
f68 = f20 * IFF(IsNan(f68[1])==true,0,f68[1]) + f18 * v18;
f70 = 0.0;
f70 = f18 * f68 + f20 * IFF(IsNan(f70[1])==true,0,f70[1]);
v1C = f68 * 1.5 - f70 * 0.5;
f78 = 0.0;
f78 = f20 * IFF(IsNan(f78[1])==true,0,f78[1]) + f18 * v1C;
f80 = 0.0;
f80 = f18 * f78 + f20 * IFF(IsNan(f80[1])==true,0,f80[1]);
v20 = f78 * 1.5 - f80 * 0.5;
f88_ = 0.0;
f90_ = 0.0;
f88 = 0.0;
f90_ = IFF( IFF(IsNan(f90_[1])==true,0,f90_[1]) == 0 , 1 ,
IFF( IFF(IsNan(f88[1])==true,0,f88[1]) <= IFF(IsNan(f90_[1])==true,0,f90_[1]) ,
IFF(IsNan(f88[1])==true,0,f88[1]) + 1 , IFF(IsNan(f90_[1])==true,0,f90_[1]) + 1));
f88 = IFF(IFF(IsNan(f90_[1])==true,0,f90_[1]) == 0 and (length - 1 >= 5) , length - 1 , 5);
f0 = IFF(f88 >= f90_ and f8 != f10 , 1 , 0);
f90 = IFF(f88 == f90_ and f0 == 0 , 0 , f90_);
v4_ = IFF(f88 < f90 and v20 > 0 , (v14 / v20 + 1) * 50 , 50);
rsx = IFF(v4_ > 100 , 100 , IFF(v4_ < 0 , 0 , v4_));
if rsx > rsx[1] Then
t = 1;
if rsx < rsx[1] Then
t = -1;
if t != t[1] and rsx[1] < 30 Then
{
Buy("b");
tx = Text_New(sDate,sTime,L-0.7,"●");
Text_SetStyle(tx,2,2);
Text_SetColor(tx,Magenta);
Text_SetSize(tx,15);
}
if MarketPosition == 1 and BarsSinceEntry == 1 Then ExitLong("bx");
if t == -1 and t != t[1] and rsx[1] > 70 Then
{
Sell();
tx = Text_New(sDate,sTime,H+0.7,"●");
Text_SetStyle(tx,2,2);
Text_SetColor(tx,Green);
Text_SetSize(tx,15);
}
if MarketPosition == -1 and BarsSinceEntry == 1 Then ExitShort("sx");