예스스탁
예스스탁 답변
2020-12-14 10:01:07
안녕하세요
예스스탁입니다.
var : VV(0);
var : A1(False),A2(False),A3(False),A4(False),A5(False),A6(False),A7(False),A8(False),A9(False),A10(False),A11(False),A12(False),A13(False),A14(False),A15(False);
var : B1(False),B2(False),B3(False),B4(False),B5(False),B6(False),B7(False),B8(False),B9(False),B10(False),B11(False);
VV = AccumN(DownVol,1)[1]/AccumN(Volume,1)[1];
A1 = C[4]<Lowest(L,2)[1];
A2 = Highest(H,2)[2] >= C[4]*1.06;
A3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2];
A4 = Highest(H,2)[2] > Highest(H,1)[1];
A5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30;
A6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25;
A7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20;
A8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15;
A9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10;
A10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05;
A11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1;
A12 = C[1] <= C[2]*1.01 and C[1] >= C[2]*0.99;
A13 = 0.60 >= VV and VV >= 0.40;
A14 = (Accumn(DownVol,3)[1]/Accumn(Volume,3)[1])/(Accumn(DownVol,2)[2]/Accumn(Volume,2)[2])<1.1;
A15 = (Accumn(Volume,2)[2]/Accumn(Volume,2)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,4)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,6)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,8)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,10)[4] >= 8);
B1 = C[1] < C[4]*1.06;
B2 = Highest(H,2)[2] >= C[4]*1.06;
B3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2];
B4 = Highest(H,2)[2] > Highest(H,1)[1];
B5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30;
B6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25;
B7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20;
B8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15;
B9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10;
B10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05;
B11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1;
if A1 and A2 and A3 and A4 and A5 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A6");
if A1 and A2 and A3 and A4 and A6 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A5");
if A1 and A2 and A3 and A4 and A7 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A4");
if A1 and A2 and A3 and A4 and A8 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A3");
if A1 and A2 and A3 and A4 and A9 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A2");
if A1 and A2 and A3 and A4 and A10 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A1");
if B1 and B2 and B3 and B4 and B5 and B11 Then
Buy("B6");
if B1 and B2 and B3 and B4 and B6 and B11 Then
Buy("B5");
if B1 and B2 and B3 and B4 and B7 and B11 Then
Buy("B4");
if B1 and B2 and B3 and B4 and B8 and B11 Then
Buy("B3");
if B1 and B2 and B3 and B4 and B9 and B11 Then
Buy("B2");
if B1 and B2 and B3 and B4 and B10 and B11 Then
Buy("B1");
var : A1Price(0),A1high(0);
var : A2Price(0),A2high(0);
var : A3Price(0),A3high(0);
var : A4Price(0),A4high(0);
var : A5Price(0),A5high(0);
var : A6Price(0),A6high(0);
var : B1Price(0),B1high(0);
var : B2Price(0),B2high(0);
var : B3Price(0),B3high(0);
var : B4Price(0),B4high(0);
var : B5Price(0),B5high(0);
var : B6Price(0),B6high(0);
if MarketPosition == 1 Then
{
#A1진입 발생
#보유수량이 증가하고 최근 발생한 진입명이 A1이면
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A1" Then
{
#진입가 저장
A1Price = LatestEntryPrice(0);
#진입이후 최고가의 초기값으로 현재봉 고가저장
A1high = H;
}
#새로운 고가가 발생하면 변수의 값을 새로운 고가를 변경
if A1high > 0 and H > A1high Then
A1high = H;
if A1Price > 0 Then #추가된 if문
{
#12% 수익이면 청산
ExitLong("A1-1",AtLimit,A1Price*1.12,"A1");
#1% 이상 수익이후에 7% 하락하면 청산
if A1high >= A1Price*1.01 Then
ExitLong("A1-2",AtStop,A1high*0.93,"A1");
#6% 손실시 청산
ExitLong("A1-3",AtStop,A1Price*0.94,"A1");
}
#A2진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A2" Then
{
A2Price = LatestEntryPrice(0);
A2high = H;
}
if A2high > 0 and H > A2high Then
A2high = H;
if A2Price > 0 Then
{
ExitLong("A2-1",AtLimit,A2Price*1.12,"A2");
if A2high >= A2Price*1.01 Then
ExitLong("A2-2",AtStop,A2high*0.93,"A2");
ExitLong("A2-3",AtStop,A2Price*0.94,"A2");
}
#A3진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A3" Then
{
A3Price = LatestEntryPrice(0);
A3high = H;
}
if A3high > 0 and H > A3high Then
A3high = H;
if A3Price > 0 Then
{
ExitLong("A3-1",AtLimit,A3Price*1.12,"A3");
if A3high >= A3Price*1.01 Then
ExitLong("A3-2",AtStop,A3high*0.93,"A3");
ExitLong("A3-3",AtStop,A3Price*0.94,"A3");
}
#A4진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A4" Then
{
A4Price = LatestEntryPrice(0);
A4high = H;
}
if A4high > 0 and H > A4high Then
A4high = H;
if A4Price > 0 Then
{
ExitLong("A4-1",AtLimit,A4Price*1.12,"A4");
if A4high >= A4Price*1.01 Then
ExitLong("A4-2",AtStop,A4high*0.93,"A4");
ExitLong("A4-3",AtStop,A4Price*0.94,"A4");
}
#A5진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A5" Then
{
A5Price = LatestEntryPrice(0);
A5high = H;
}
if A5high > 0 and H > A5high Then
A5high = H;
if A5Price > 0 Then
{
ExitLong("A5-1",AtLimit,A5Price*1.12,"A5");
if A5high >= A5Price*1.01 Then
ExitLong("A5-2",AtStop,A5high*0.93,"A5");
ExitLong("A5-3",AtStop,A5Price*0.94,"A5");
}
#A6진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A6" Then
{
A6Price = LatestEntryPrice(0);
A6high = H;
}
if A6high > 0 and H > A6high Then
A6high = H;
if A6Price > 0 Then
{
ExitLong("A6-1",AtLimit,A6Price*1.12,"A6");
if A6high >= A6Price*1.01 Then
ExitLong("A6-2",AtStop,A6high*0.93,"A6");
ExitLong("A6-3",AtStop,A6Price*0.94,"A6");
}
#B1진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B1" Then
{
B1Price = LatestEntryPrice(0);
B1high = H;
}
if B1high > 0 and H > B1high Then
B1high = H;
if B1Price > 0 Then
{
ExitLong("B1-1",AtLimit,B1Price*1.12,"B1");
if B1high >= B1Price*1.01 Then
ExitLong("B1-2",AtStop,B1high*0.93,"B1");
ExitLong("B1-3",AtStop,C[4]*0.99,"B1");
}
#B2진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B2" Then
{
B2Price = LatestEntryPrice(0);
B2high = H;
}
if B2high > 0 and H > B2high Then
B2high = H;
if B2Price > 0 Then
{
ExitLong("B2-1",AtLimit,B2Price*1.12,"B2");
if B2high >= B2Price*1.01 Then
ExitLong("B2-2",AtStop,B2high*0.93,"B2");
ExitLong("B2-3",AtStop,C[4]*0.99,"B2");
}
#B3진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B3" Then
{
B3Price = LatestEntryPrice(0);
B3high = H;
}
if B3high > 0 and H > B3high Then
B3high = H;
if B3Price > 0 Then
{
ExitLong("B3-1",AtLimit,B3Price*1.12,"B3");
if B3high >= B3Price*1.01 Then
ExitLong("B3-2",AtStop,B3high*0.93,"B3");
ExitLong("B3-3",AtStop,C[4]*0.99,"B3");
}
#B4진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B4" Then
{
B4Price = LatestEntryPrice(0);
B4high = H;
}
if B4high > 0 and H > B4high Then
B4high = H;
if B4Price > 0 Then
{
ExitLong("B4-1",AtLimit,B4Price*1.12,"B4");
if B4high >= B4Price*1.01 Then
ExitLong("B4-2",AtStop,B4high*0.93,"B4");
ExitLong("B4-3",AtStop,C[4]*0.99,"B4");
}
#B5진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B5" Then
{
B5Price = LatestEntryPrice(0);
B5high = H;
}
if B5high > 0 and H > B5high Then
B5high = H;
if B5Price > 0 Then
{
ExitLong("B5-1",AtLimit,B5Price*1.12,"B5");
if B5high >= B5Price*1.01 Then
ExitLong("B5-2",AtStop,B5high*0.93,"B5");
ExitLong("B5-3",AtStop,C[4]*0.99,"B5");
}
#B6진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B6" Then
{
B6Price = LatestEntryPrice(0);
B6high = H;
}
if B6high > 0 and H > B6high Then
B6high = H;
if B6Price > 0 Then
{
ExitLong("B6-1",AtLimit,B6Price*1.12,"B6");
if B6high >= B6Price*1.01 Then
ExitLong("B6-2",AtStop,B6high*0.93,"B6");
ExitLong("B6-3",AtStop,C[4]*0.99,"B6");
}
}
Else
{
A1Price = 0;
A1high = 0;
A2Price = 0;
A2high = 0;
A3Price = 0;
A3high = 0;
A4Price = 0;
A4high = 0;
A5Price = 0;
A5high = 0;
A6Price = 0;
A6high = 0;
B1Price = 0;
B1high = 0;
B2Price = 0;
B2high = 0;
B3Price = 0;
B3high = 0;
B4Price = 0;
B4high = 0;
B5Price = 0;
B5high = 0;
B6Price = 0;
B6high = 0;
}
즐거운 하루되세요
> 말라 님이 쓴 글입니다.
> 제목 : 안녕하세요 질문드립니다.
> 안녕하세요 시스템에서 "매도"부분만 약간 수정하고 싶어서 글남깁니다
아래는 제가 사용하는 시스템인데요
#A진입은 제외하고
#"B진입 1~6부분"만 수정하고싶습니다
각 진입마다 매도식은
1매도는 매수가 대비 12프로상승시 매도
2매도는 매수가 대비 1프로상승 후 7프로 하락시 매도
3매도는 매수가 대비 6프로 하락시 매도
이렇게 3개로 똑같습니다.
여기서 3매도 부분만 C[4]부분을 참고하고 싶은데요
"6프로 하락시 매도"가아닌 "C[4] 대비 1프로 하락"시 매도로 식좀 수정해주시면 고맙겠습니다.
var : VV(0);
var : A1(False),A2(False),A3(False),A4(False),A5(False),A6(False),A7(False),A8(False),A9(False),A10(False),A11(False),A12(False),A13(False),A14(False),A15(False);
var : B1(False),B2(False),B3(False),B4(False),B5(False),B6(False),B7(False),B8(False),B9(False),B10(False),B11(False);
VV = AccumN(DownVol,1)[1]/AccumN(Volume,1)[1];
A1 = C[4]<Lowest(L,2)[1];
A2 = Highest(H,2)[2] >= C[4]*1.06;
A3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2];
A4 = Highest(H,2)[2] > Highest(H,1)[1];
A5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30;
A6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25;
A7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20;
A8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15;
A9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10;
A10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05;
A11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1;
A12 = C[1] <= C[2]*1.01 and C[1] >= C[2]*0.99;
A13 = 0.60 >= VV and VV >= 0.40;
A14 = (Accumn(DownVol,3)[1]/Accumn(Volume,3)[1])/(Accumn(DownVol,2)[2]/Accumn(Volume,2)[2])<1.1;
A15 = (Accumn(Volume,2)[2]/Accumn(Volume,2)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,4)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,6)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,8)[4] >= 8 Or
Accumn(Volume,2)[2]/Accumn(Volume,10)[4] >= 8);
B1 = C[1] < C[4]*1.06;
B2 = Highest(H,2)[2] >= C[4]*1.06;
B3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2];
B4 = Highest(H,2)[2] > Highest(H,1)[1];
B5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30;
B6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25;
B7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20;
B8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15;
B9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10;
B10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05;
B11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1;
if A1 and A2 and A3 and A4 and A5 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A6");
if A1 and A2 and A3 and A4 and A6 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A5");
if A1 and A2 and A3 and A4 and A7 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A4");
if A1 and A2 and A3 and A4 and A8 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A3");
if A1 and A2 and A3 and A4 and A9 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A2");
if A1 and A2 and A3 and A4 and A10 and A11 and (A12 or A13 or A14) and A15 Then
Buy("A1");
if B1 and B2 and B3 and B4 and B5 and B11 Then
Buy("B6");
if B1 and B2 and B3 and B4 and B6 and B11 Then
Buy("B5");
if B1 and B2 and B3 and B4 and B7 and B11 Then
Buy("B4");
if B1 and B2 and B3 and B4 and B8 and B11 Then
Buy("B3");
if B1 and B2 and B3 and B4 and B9 and B11 Then
Buy("B2");
if B1 and B2 and B3 and B4 and B10 and B11 Then
Buy("B1");
var : A1Price(0),A1high(0);
var : A2Price(0),A2high(0);
var : A3Price(0),A3high(0);
var : A4Price(0),A4high(0);
var : A5Price(0),A5high(0);
var : A6Price(0),A6high(0);
var : B1Price(0),B1high(0);
var : B2Price(0),B2high(0);
var : B3Price(0),B3high(0);
var : B4Price(0),B4high(0);
var : B5Price(0),B5high(0);
var : B6Price(0),B6high(0);
if MarketPosition == 1 Then
{
#A1진입 발생
#보유수량이 증가하고 최근 발생한 진입명이 A1이면
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A1" Then
{
#진입가 저장
A1Price = LatestEntryPrice(0);
#진입이후 최고가의 초기값으로 현재봉 고가저장
A1high = H;
}
#새로운 고가가 발생하면 변수의 값을 새로운 고가를 변경
if A1high > 0 and H > A1high Then
A1high = H;
if A1Price > 0 Then #추가된 if문
{
#12% 수익이면 청산
ExitLong("A1-1",AtLimit,A1Price*1.12,"A1");
#1% 이상 수익이후에 7% 하락하면 청산
if A1high >= A1Price*1.01 Then
ExitLong("A1-2",AtStop,A1high*0.93,"A1");
#6% 손실시 청산
ExitLong("A1-3",AtStop,A1Price*0.94,"A1");
}
#A2진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A2" Then
{
A2Price = LatestEntryPrice(0);
A2high = H;
}
if A2high > 0 and H > A2high Then
A2high = H;
if A2Price > 0 Then
{
ExitLong("A2-1",AtLimit,A2Price*1.12,"A2");
if A2high >= A2Price*1.01 Then
ExitLong("A2-2",AtStop,A2high*0.93,"A2");
ExitLong("A2-3",AtStop,A2Price*0.94,"A2");
}
#A3진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A3" Then
{
A3Price = LatestEntryPrice(0);
A3high = H;
}
if A3high > 0 and H > A3high Then
A3high = H;
if A3Price > 0 Then
{
ExitLong("A3-1",AtLimit,A3Price*1.12,"A3");
if A3high >= A3Price*1.01 Then
ExitLong("A3-2",AtStop,A3high*0.93,"A3");
ExitLong("A3-3",AtStop,A3Price*0.94,"A3");
}
#A4진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A4" Then
{
A4Price = LatestEntryPrice(0);
A4high = H;
}
if A4high > 0 and H > A4high Then
A4high = H;
if A4Price > 0 Then
{
ExitLong("A4-1",AtLimit,A4Price*1.12,"A4");
if A4high >= A4Price*1.01 Then
ExitLong("A4-2",AtStop,A4high*0.93,"A4");
ExitLong("A4-3",AtStop,A4Price*0.94,"A4");
}
#A5진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A5" Then
{
A5Price = LatestEntryPrice(0);
A5high = H;
}
if A5high > 0 and H > A5high Then
A5high = H;
if A5Price > 0 Then
{
ExitLong("A5-1",AtLimit,A5Price*1.12,"A5");
if A5high >= A5Price*1.01 Then
ExitLong("A5-2",AtStop,A5high*0.93,"A5");
ExitLong("A5-3",AtStop,A5Price*0.94,"A5");
}
#A6진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A6" Then
{
A6Price = LatestEntryPrice(0);
A6high = H;
}
if A6high > 0 and H > A6high Then
A6high = H;
if A6Price > 0 Then
{
ExitLong("A6-1",AtLimit,A6Price*1.12,"A6");
if A6high >= A6Price*1.01 Then
ExitLong("A6-2",AtStop,A6high*0.93,"A6");
ExitLong("A6-3",AtStop,A6Price*0.94,"A6");
}
#B1진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B1" Then
{
B1Price = LatestEntryPrice(0);
B1high = H;
}
if B1high > 0 and H > B1high Then
B1high = H;
if B1Price > 0 Then
{
ExitLong("B1-1",AtLimit,B1Price*1.12,"B1");
if B1high >= B1Price*1.01 Then
ExitLong("B1-2",AtStop,B1high*0.93,"B1");
ExitLong("B1-3",AtStop,B1Price*0.94,"B1");
}
#B2진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B2" Then
{
B2Price = LatestEntryPrice(0);
B2high = H;
}
if B2high > 0 and H > B2high Then
B2high = H;
if B2Price > 0 Then
{
ExitLong("B2-1",AtLimit,B2Price*1.12,"B2");
if B2high >= B2Price*1.01 Then
ExitLong("B2-2",AtStop,B2high*0.93,"B2");
ExitLong("B2-3",AtStop,B2Price*0.94,"B2");
}
#B3진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B3" Then
{
B3Price = LatestEntryPrice(0);
B3high = H;
}
if B3high > 0 and H > B3high Then
B3high = H;
if B3Price > 0 Then
{
ExitLong("B3-1",AtLimit,B3Price*1.12,"B3");
if B3high >= B3Price*1.01 Then
ExitLong("B3-2",AtStop,B3high*0.93,"B3");
ExitLong("B3-3",AtStop,B3Price*0.94,"B3");
}
#B4진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B4" Then
{
B4Price = LatestEntryPrice(0);
B4high = H;
}
if B4high > 0 and H > B4high Then
B4high = H;
if B4Price > 0 Then
{
ExitLong("B4-1",AtLimit,B4Price*1.12,"B4");
if B4high >= B4Price*1.01 Then
ExitLong("B4-2",AtStop,B4high*0.93,"B4");
ExitLong("B4-3",AtStop,B4Price*0.94,"B4");
}
#B5진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B5" Then
{
B5Price = LatestEntryPrice(0);
B5high = H;
}
if B5high > 0 and H > B5high Then
B5high = H;
if B5Price > 0 Then
{
ExitLong("B5-1",AtLimit,B5Price*1.12,"B5");
if B5high >= B5Price*1.01 Then
ExitLong("B5-2",AtStop,B5high*0.93,"B5");
ExitLong("B5-3",AtStop,B5Price*0.94,"B5");
}
#B6진입
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B6" Then
{
B6Price = LatestEntryPrice(0);
B6high = H;
}
if B6high > 0 and H > B6high Then
B6high = H;
if B6Price > 0 Then
{
ExitLong("B6-1",AtLimit,B6Price*1.12,"B6");
if B6high >= B6Price*1.01 Then
ExitLong("B6-2",AtStop,B6high*0.93,"B6");
ExitLong("B6-3",AtStop,B6Price*0.94,"B6");
}
}
Else
{
A1Price = 0;
A1high = 0;
A2Price = 0;
A2high = 0;
A3Price = 0;
A3high = 0;
A4Price = 0;
A4high = 0;
A5Price = 0;
A5high = 0;
A6Price = 0;
A6high = 0;
B1Price = 0;
B1high = 0;
B2Price = 0;
B2high = 0;
B3Price = 0;
B3high = 0;
B4Price = 0;
B4high = 0;
B5Price = 0;
B5high = 0;
B6Price = 0;
B6high = 0;
}