답변완료
이평수렴확장
수고가많습니다
영웅문 수식 한국투자증권수식 적용될수있도록 부탁 드립니다
(분.틱다적용 될수있도록)
A)
1.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a>b && x>x(1),x,0)
2.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a>b && x>x(1),x,0)
3.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a<b && x>x(1),x,0)
4.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a<b && x<x(1),x,0)
B)
1.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a>b && x>x(1),-x,0)
2.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a>b && x<x(1),-x,0)
3.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a<b && x>x(1),-x,0)
4.a=ma(c,3);
b=ma(c,60);
x=(a-b);
if(a<b && x<x(1),-x,0)
2022-07-13
1537
글번호 160689
지표
답변완료
시스템식 문의 드립니다.
요청드렸던 시스템식 관련해서 감사드리다는 말씀을 먼저 드리고 싶습니다.
항상 감사드립니다.
그리고 확인중에 하나 궁금한 점이 있어 이렇게 글을 남깁니다.
중간쯤 (약 89~90번째 줄) 에
if var1 > 0 and C < AvgEntryPrice then
ExitLong("bx");
이 문구가 있는데,
작성했던 이유는 var1 > 0 이라는것은 일부 청산을 했고, 1분봉상 종가가 평단만큼
다시 내려오면 매도청산하는 내용인데,
해당시스템식으로 돌려보니, 일부청산 이후 1분봉산 종가가 평단이 아니라 마지막
진입가격만큼 내려오면 매도 청산을 하는것을 볼수 있었습니다.
확인좀 부탁드리겠습니다. .
----------------------------------------------------------------------------
input : 고점(7000);
input : 원금(1000000);
var : A1(0),A2(0),A3(0),A4(0),A5(0), 손절(0);
Var : day(0),EntryDay(0),entry(False),dd(0),ED(0);
A1 = 고점*0.95;
A2 = 고점*0.93;
A3 = 고점*0.91;
A4 = 고점*0.89;
A5 = 고점*0.87;
손절 = 고점*0.85;
if Bdate != Bdate[1] Then
{
Condition1 = False;
entry = true;
day = day+1;
dd = dd+1;
}
if TotalTrades > TotalTrades[1] Then
entry = False;
if DAYClose(1) >= DayClose(2)*1.29
OR DAYClose(2) >= DayClose(3)*1.29
OR DAYClose(3) >= DayClose(4)*1.29
OR DAYClose(4) >= DayClose(5)*1.29
OR DAYClose(5) >= DayClose(6)*1.29
OR DAYClose(6) >= DayClose(7)*1.29
Then
Condition1 = TRUE;
if condition1 == true AND MarketPosition == 0 and entry == true and c > J1 Then
Buy("A매수",AtLimit,J1,Floor((원금*0.2)/A1));
if condition1 == true and entry == true and LatestExitName(1) != "손절" AND ((LatestEntryName(0) == "A매수") OR (MarketPosition == 0 AND C < J1 AND C >= J2)) Then
Buy("B매수",AtLimit,J2,Floor((원금*0.2)/A2));
if condition1 == true and entry == true and LatestExitName(1) != "손절" AND ((LatestEntryName(0) == "B매수") OR (MarketPosition == 0 AND C < J2 AND C >= J3)) Then
Buy("C매수",AtLimit,J3,Floor((원금*0.2)/A3));
if condition1 == true and entry == true and LatestExitName(1) != "손절" AND ((LatestEntryName(0) == "C매수") OR (MarketPosition == 0 AND C < J3 AND C >= J4)) Then
Buy("D매수",AtLimit,J4,Floor((원금*0.2)/A4));
if condition1 == true and entry == true and LatestExitName(1) != "손절" AND ((LatestEntryName(0) == "D매수") OR (MarketPosition == 0 AND C < J4 AND C >= J5)) Then
Buy("E매수",AtLimit,J5,Floor((원금*0.2)/A5));
#매수진입
if MarketPosition == 1 Then
{
#전봉대비 수량 감소(일부 청산발생을 위미)
if CurrentContracts < CurrentContracts[1] Then
{
#청산가 저장
var1 = LatestExitPrice(0);
Condition1 = False;
Condition2 = False;
Condition3 = False;
Condition4 = False;
Condition5 = False;
}
#전봉대비 수량 증가(추가 진입발생을 의미)
if CurrentContracts > CurrentContracts[1] Then
{
#현재수량 저장
Var3 = CurrentContracts;
Condition1 = False;
Condition2 = False;
Condition3 = False;
Condition4 = False;
Condition5 = False;
}
if var1 > 0 and C < AvgEntryPrice then
ExitLong("bx");
if Condition1 == False AND ((LatestEntryName(0) == "A매수") OR (LatestEntryName(0) == "B매수") or (LatestEntryName(0) == "C매수"))Then
ExitLong("3%익절",AtLimit,AvgEntryPrice*1.03,"",Floor(Var3*0.4),1);
if Condition2 == False AND ((LatestEntryName(0) == "A매수") OR (LatestEntryName(0) == "B매수") or (LatestEntryName(0) == "C매수")) Then
ExitLong("4%익절",AtLimit,AvgEntryPrice*1.04,"",Floor(Var3*0.3),1);
if Condition3 == False AND ((LatestEntryName(0) == "A매수") OR (LatestEntryName(0) == "B매수") or (LatestEntryName(0) == "C매수")) Then
ExitLong("5%익절",AtLimit,AvgEntryPrice*1.05,"",Floor(Var3*0.1),1);
if Condition4 == False AND ((LatestEntryName(0) == "A매수") OR (LatestEntryName(0) == "B매수") or (LatestEntryName(0) == "C매수")) Then
ExitLong("7%익절",AtLimit,AvgEntryPrice*1.07,"",Floor(Var3*0.1),1);
ExitLong("10%익절",AtLimit,AvgEntryPrice*1.10);
if Condition1 == False AND ((LatestEntryName(0) == "D매수"))Then
ExitLong("1-D%익절",AtLimit,AvgEntryPrice*1.01,"",Floor(Var3*0.3),1);
if Condition2 == False AND ((LatestEntryName(0) == "D매수")) Then
ExitLong("2-D%익절",AtLimit,AvgEntryPrice*1.02,"",Floor(Var3*0.3),1);
if Condition3 == False AND ((LatestEntryName(0) == "D매수")) Then
ExitLong("3-D%익절",AtLimit,AvgEntryPrice*1.03,"",Floor(Var3*0.3),1);
if Condition4 == False AND ((LatestEntryName(0) == "D매수")) Then
ExitLong("4-D%익절",AtLimit,AvgEntryPrice*1.04,"",Floor(Var3*0.1),1);
if Condition1 == False AND ((LatestEntryName(0) == "E매수"))Then
ExitLong("본절",AtLimit,AvgEntryPrice*1.003,"",Floor(Var3*0.5),1);
if Condition2 == False AND ((LatestEntryName(0) == "E매수")) Then
ExitLong("1-E%익절",AtLimit,AvgEntryPrice*1.01,"",Floor(Var3*0.4),1);
if Condition3 == False AND ((LatestEntryName(0) == "E매수")) Then
ExitLong("2-E%익절",AtLimit,AvgEntryPrice*1.02,"",Floor(Var3*0.1),1);
}
Else#매수진입중이 아니면
{
#변수 0으로 초기화
var1 = 0;
Var2 = 0;
}
if MarketPosition == 1 Then
ExitLong("손절",AtStoP,손절);
2022-07-13
1444
글번호 160687
시스템
답변완료
수정부탁드립니다
#,안녕하세요
아래식을 일봉,주봉에 적용할수 있도록 도움 부탁드립니다.
input : N(0),추세선굵기(0),추세선색상(0);
var : DD(0),D1(0),T1(0),idx(0),TF(0),TL(0),TL11(0),hh(0),ll(0),box(0);
var : MM1(0),박스색상(0),HH1(0),LL1(0);
if Bdate != Bdate[1] Then
{
DD = sDate;
idx = 0;
}
Else
idx = idx+1;
if DD > 0 Then
{
TF = idx%N;
if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) Then
{
D1 = sDate;
T1 = sTime;
TL = TL_new(D1,T1,C,NextBarSdate,NextBarStime,C);
TL_SetColor(TL,추세선색상);
TL_SetSize(TL,추세선굵기);
hh = h;
ll = l;
HH1 = HH[1];
LL1 = LL[1];
MM1 = (HH1+LL1)/2;
box = Box_New(d1,t1,hh,NextBarSdate,NextBarStime,ll);
Box_SetFill(box,true);
}
Else
{
TL_SetBegin(TL,D1,T1,C);
TL_SetEnd(TL,sDate,sTime,C);
if h > hh Then
hh = h;
if l < ll Then
ll = l;
Box_SetBegin(box,d1,t1,hh);
Box_SetEnd(box,sDate,sTime,ll);
}
}
if C > MM1 Then
박스색상 = Magenta;#Magenta
Else
박스색상 = Blue;#LCyan
Box_SetColor(box,박스색상);
2022-07-12
1318
글번호 160680
지표