답변완료
수식추가
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0),T(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
If STime == 180000 Then
DBN = 0;
DBN = DBN + 1;
Var1 = Period;
Var2 = Var1 - 1;
Var3 = Var1 - 2;
Var5 = Sence;
Var6 = H-L;
JustChanged = FALSE;
if CurrentBar <= Var2 then begin
Highs[CurrentBar] = Close;
Lows[CurrentBar] = Close;
RRange[CurrentBar] = (H-L) /2;
end;
if CurrentBar == Var1 then begin
if Highs[Var2] >= Highs[Var3] then begin
UpWave[1] = TRUE;
HHighest = Highs[Var2];
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
#Plot1(VLineUp,"VLineUp");
end;
if Highs[Var2] < Highs[Var3] then begin
DnWave[1] = TRUE;
LLowest = Lows[Var2];
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
#Plot2(VLineDn,"VLineDn");
end;
end;
if CurrentBar > Var1 then begin
if DnWave[1] and Close > VLineDn then begin
DnWave[1] = FALSE;
UpWave[1] = TRUE;
JustChanged = TRUE;
HHighest = Close;
LLowest = 0;
end;
if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin
UpWave[1] = FALSE;
DnWave[1] = TRUE;
JustChanged = TRUE;
LLowest = Close;
HHighest = 0;
end;
if JustChanged == FALSE then begin
if Close > HHighest then
HHighest = Close;
else if Close < LLowest then
LLowest = Close;
end;
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
if UpWave[1] then
T = 1;
else if DnWave[1] then
T = -1;
end;
Input : BBP(20), MultiD(2);
var : BBmd(0),BBup(0),BBdn(0);
BBmd = ma(C,Period);
BBup = BollBandUp(BBP,MultiD);
BBdn = BollBandDown(BBP,MultiD);
if CrossDown(C,BBup) and t == -1 Then
sell();
if crossup(C,BBdn) and t == 1 Then
buy();
안녕하세요
위식에서 이평20추가 부탁드려요
매수 현가격 이평20선 위에있을때 매수.
매도 현가격 이평20선 아래에서 매도.
2024-07-16
515
글번호 181526
시스템
답변완료
파라볼릭 하락 2파
Input : af(0.02), maxAF(0.2);
var : T(0),B(0),S(0),tx(0),HH(0),LL(0),box(0);
var1 = CSar(af,maxAF);
plot1(var1, "CSAR",IFF(c>var1,Red,Blue));
if CrossUp(C,var1) Then
{
T = 1;
B = var1;
HH = H;
if abs(S-LL) < 0.9 Then
Text_Delete(tx);
tx = Text_New(sDate,sTime,HH,NumToStr(abs(HH-B),2));
Text_SetColor(tx,Red);
Text_SetSize(tx,25);
Text_SetStyle(tx,1,1);
Text_SetBold(tx,1);
box = Box_New(sDate,sTime,B,NextBarSdate,NextBarStime,HH);
}
if CrossDown(C,var1) Then
{
T = -1;
S = var1;
LL = L;
if abs(B-HH) < 0.8 Then
Text_Delete(tx);
tx = Text_New(sDate,sTime,LL,NumToStr(abs(LL-S),2));
Text_SetColor(tx,Blue);
Text_SetSize(tx,25);
Text_SetStyle(tx,1,0);
Text_SetBold(tx,1);
box = Box_New(sDate,sTime,S,NextBarSdate,NextBarStime,LL);
}
Else
{
if T == 1 Then
{
if H > HH Then
HH = H;
Text_SetString(tx,NumToStr(abs(HH-B),2));
Text_SetLocation(tx,sDate,sTime,HH);
Box_SetEnd(box,NextBarSdate,NextBarStime,hh);
if HH < B+0.6 Then
{
Box_SetColor(box,Orange);
Box_SetFill(box,true,90);
}
Else if HH >= B+0.6 and HH < B+0.8 Then
{
Box_SetColor(box,Gray);
Box_SetFill(box,true,80);
}
Else if HH >= B+0.8 and HH < B+1.3 Then
{
Box_SetColor(box,Magenta);
Box_SetFill(box,true,50);
}
Else if HH >= B+1.3 and HH < B+1.9 Then
{
Box_SetColor(box,Gray);
Box_SetFill(box,true,60);
}
Else
{
Box_SetColor(box,Pink);
Box_SetFill(box,true,90);
}
}
if T == -1 Then
{
if L < LL Then
LL = L;
Text_SetString(tx,NumToStr(abs(LL-S),2));
Text_SetLocation(tx,sDate,sTime,LL);
Box_SetEnd(box,NextBarSdate,NextBarStime,LL);
if LL > S-0.6 Then
{
Box_SetColor(box,Cyan);
Box_SetFill(box,true,120);
}
Else if LL <= S-0.6 and ll > S-0.9 Then
{
Box_SetColor(box,Yellow);
Box_SetFill(box,true,150);
}
Else if LL <= S-0.9 and ll > S-1.3 Then
{
Box_SetColor(box,Lime);
Box_SetFill(box,true,120);
}
Else if LL <= S-1.3 and ll > S-1.6 Then
{
Box_SetColor(box,Cyan);
Box_SetFill(box,true,90);
}
Else if LL <= S-1.6 and ll > S-1.9 Then
{
Box_SetColor(box,Blue);
Box_SetFill(box,true,30);
}
Else
{
Box_SetColor(box,Yellow);
Box_SetFill(box,true,120);
}
}
}
직전 하락파라볼릭보다 고점이 낮은 새 하락파라볼릭이 생긴후, 직전 하락파라 저점을, 주가가(현재봉이) 깨면 세로선 추가 (역N자형 하락2파).
파라볼릭선 세로선 박스 등 모두 표시된 상태로,
세로선 생기면(하락 2파) 매도, 양전환시 매도청산. 감사합니다.
2024-07-16
655
글번호 181522
시스템