답변완료
안녕하세요^^재질문 드려봅니다
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);
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,3)[1]/AccumN(Volume,3)[1];
A1 = C[1] >= C[10]*1.06;
A2 = Highest(H,6)[4] >= C[10]*1.06;
A3 = Accumn(H-O,3)[7] > Accumn(H-O,3)[4];
A4 = Highest(H,6)[4] > Highest(H,3)[1];
A5 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.25 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.30;
A6 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.20 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.25;
A7 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.15 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.20;
A8 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.10 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.15;
A9 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.05 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.10;
A10 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.01 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.05;
A11 = AccumN(V,3)[4] > AccumN(V,3)[1];
A12 = C[1] <= C[4]*1.01 and C[1] >= C[4]*0.99;
A13 = 0.59 >= VV and VV >= 0.46;
B1 = C[1] < C[10]*1.06;
B2 = Highest(H,6)[4] >= C[10]*1.06;
B3 = Accumn(H-O,3)[7] > Accumn(H-O,3)[4];
B4 = Highest(H,6)[4] > Highest(H,3)[1];
B5 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.25 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.30;
B6 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.20 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.25;
B7 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.15 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.20;
B8 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.10 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.15;
B9 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.05 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.10;
B10 = AccumN(v,3)[1] >= AccumN(v,6)[4]*0.01 and AccumN(v,3)[1] <= AccumN(v,6)[4]*0.05;
B11 = AccumN(V,3)[4] > AccumN(V,3)[1];
if A1 and A2 and A3 and A4 and A5 and A11 and (A12 or A13) Then
Buy("A6");
if A1 and A2 and A3 and A4 and A6 and A11 and (A12 or A13) Then
Buy("A5");
if A1 and A2 and A3 and A4 and A7 and A11 and (A12 or A13) Then
Buy("A4");
if A1 and A2 and A3 and A4 and A8 and A11 and (A12 or A13) Then
Buy("A3");
if A1 and A2 and A3 and A4 and A9 and A11 and (A12 or A13) Then
Buy("A2");
if A1 and A2 and A3 and A4 and A10 and A11 and (A12 or A13) 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");
#A1매수진입후
if MarketPosition == 1 and IsEntryName("A1") == true Then
{
#12% 수익이면 청산
ExitLong("C1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("C2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("C3",AtStop,EntryPrice*0.93);
}
#A2매수진입후
if MarketPosition == 1 and IsEntryName("A2") == true Then
{
#12% 수익이면 청산
ExitLong("D1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("D2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("D3",AtStop,EntryPrice*0.93);
}
#A3매수진입후
if MarketPosition == 1 and IsEntryName("A3") == true Then
{
#12% 수익이면 청산
ExitLong("E1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("E2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("E3",AtStop,EntryPrice*0.93);
}
#A4매수진입후
if MarketPosition == 1 and IsEntryName("A4") == true Then
{
#12% 수익이면 청산
ExitLong("F1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("F2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("F3",AtStop,EntryPrice*0.93);
}
#A5매수진입후
if MarketPosition == 1 and IsEntryName("A5") == true Then
{
#12% 수익이면 청산
ExitLong("G1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("G2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("G3",AtStop,EntryPrice*0.93);
}
#A6매수진입후
if MarketPosition == 1 and IsEntryName("A6") == true Then
{
#12% 수익이면 청산
ExitLong("H1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("H2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("H3",AtStop,EntryPrice*0.93);
}
#B1매수진입후
if MarketPosition == 1 and IsEntryName("B1") == true Then
{
#12% 수익이면 청산
ExitLong("I1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("I2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("I3",AtStop,EntryPrice*0.93);
}
#B2매수진입후
if MarketPosition == 1 and IsEntryName("B2") == true Then
{
#12% 수익이면 청산
ExitLong("J1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("J2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("J3",AtStop,EntryPrice*0.93);
}
#B3매수진입후
if MarketPosition == 1 and IsEntryName("B3") == true Then
{
#12% 수익이면 청산
ExitLong("K1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("K2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("K3",AtStop,EntryPrice*0.93);
}
#B4매수진입후
if MarketPosition == 1 and IsEntryName("B4") == true Then
{
#12% 수익이면 청산
ExitLong("L1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("L2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("L3",AtStop,EntryPrice*0.93);
}
#B5매수진입후
if MarketPosition == 1 and IsEntryName("B5") == true Then
{
#12% 수익이면 청산
ExitLong("M1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("M2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("M3",AtStop,EntryPrice*0.93);
}
#B6매수진입후
if MarketPosition == 1 and IsEntryName("B6") == true Then
{
#12% 수익이면 청산
ExitLong("N1",AtLimit,EntryPrice*1.12);
#2% 이상 수익이후에 7% 하락하면 청산
if Highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
ExitLong("N2",AtStop,Highest(H,BarsSinceEntry)*0.93);
#7% 손실시 청산
ExitLong("N3",AtStop,EntryPrice*0.93);
}
-----------------------------------------------------------------
안녕하세요 아까 질문에 대한 답변을 받아 제가 수정해서
완성시켜 봤는데요 질문이 다시 생겨서 글남깁니다.
이렇게 작성했는데 일단 검증은 되서 다행이긴 한데요
뭘 잘못한건지 ㅍ.ㅍ 예상과는 달라서요
질문 1. 파일을 보면 A3 A2의 청산은 나타나지 않고 A5의 청산인 G1만 동시에 3개가 뜹니다.
즉,왜 H1, D1이 나타나지 않는지 나타나게 하려면 어케해야하는지 알려주세요
따로따로 뜨게해주세요 ㅠ.ㅠ왜 수익선이 한곳에 몰려있는지 후아,,,,
2. G1보다 먼저 2봉전에 A3의 청산조건인 H1이 충족(12프로이상됨)되어 차트상
떠야하는데 왜 안뜨는지 알려주세요
3. 시스템 변수 설정창에서 당일청산에서 시간으로 3:00PM으로 설정하면 매도청산이
그 시점까지만 이루어지는지 알려주세요
4. 이건 기본 차트 질문인데요.
차트 오른쪽에 가격이 뜨는것을 퍼센티지로 변경하려면 어케해야하는지 알려주세요
첨부파일을 보면 7000~9000원이 아닌 0프로에서 30프로로 이런식으로..뜨게요
정말 항상 노고에 감사드리며 첨부파일 올립니다
2020-08-20
940
글번호 141544
시스템
답변완료
부탁드립니다
$,아래식을 타주기분봉으로 수정부탁드립니다
Input : Length1(5),Length2(10),Length3(20),Length4(60),Length5(120),Length6(240),Length7(480);
Var : TLen1(0),TLen2(0),TLen3(0),TLen4(0),TLen5(0),TLen6(0),TLen7(0);
var : Tma1(0),Tma2(0),Tma3(0),Tma4(0),Tma5(0),Tma6(0),Tma7(0),Tma8(0),Tma9(0),Tma10(0);
TLen1 = Ceiling((Length1 + 1) * .5);
TLen2 = Ceiling((Length2 + 1) * .5);
TLen3 = Ceiling((Length3 + 1) * .5);
TLen4 = Ceiling((Length4 + 1) * .5);
TLen5 = Ceiling((Length5 + 1) * .5);
TLen6 = Ceiling((Length6 + 1) * .5);
TLen7 = Ceiling((Length7 + 1) * .5);
Tma1 = ema(ma(c, TLen1), TLen1);
Tma2 = ema(ma(c, TLen2), TLen2);
Tma3 = ema(ma(c, TLen3), TLen3);
Tma4 = ema(ma(c, TLen4), TLen4);
Tma5 = ema(ma(c, TLen5), TLen5);
Tma6 = ema(ma(c, TLen6), TLen6);
Tma7 = ema(ma(c, TLen7), TLen7);
Plot1(Tma1, "삼단순c1");
Plot2(Tma2, "삼단순c2");
Plot3(Tma3, "삼단순c3");
Plot4(Tma4, "삼단순c4");
Plot5(Tma5, "삼단순c5");
Plot6(Tma6, "삼단순c6");
Plot7(Tma7, "삼단순c7");
2020-08-15
932
글번호 141540
지표
답변완료
늘 감사드립니다
Input:length(10);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),
TL1(0),처리구분(""),T(0),TL2(0),TL3(0);
var : hh(0),ll(0),ii(0),diff(0),TL41(0),TL42(0),TL43(0),TL44(0),TL45(0),TL46(0);
Array:고점[10,5](0),저점[10,5](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and
Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
TL_Delete(TL2);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetExtRight(TL2,False);
TL2 = TL_New(sDate[1],sTime[1],고점[1,1],sdate,sTime,고점[1,1]);
TL_SetColor(TL2,BLUE);
TL_SetSize(TL2,2);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
TL_Delete(TL3);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetExtRight(TL3,False);
TL3 = TL_New(sDate[1],sTime[1],저점[1,1],sdate,sTime,저점[1,1]);
TL_SetColor(TL3,RED);
TL_SetSize(TL3,2);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,0);
TL_SetColor(TL1,YELLOW);
TL_SetEnd(TL2,sdate,stime,고점[1,1]);
TL_SetEnd(TL3,sdate,stime,저점[1,1]);
TL_SetExtRight(TL2,true);
TL_SetExtRight(TL3,true);
if T != T[1] then
{
if T == 1 Then
{
HH = 고점[2,1];
LL = 저점[1,1];
ii = index-고점[2,2];
diff = abs(HH-LL);
}
Else
{
HH = 고점[1,1];
LL = 저점[2,1];
ii = index-저점[2,2];
diff = abs(HH-LL);
}
TL_Delete(TL41);
TL_Delete(TL42);
TL_Delete(TL43);
TL_Delete(TL44);
TL_Delete(TL45);
TL_Delete(TL46);
TL41 = TL_New(sdate[ii],stime[ii],LL+diff*2.00,sdate,stime,LL+diff*2.00);
TL42 = TL_New(sdate[ii],stime[ii],LL+diff*2.618,sdate,stime,LL+diff*2.618);
TL43 = TL_New(sdate[ii],stime[ii],LL+diff*3.618,sdate,stime,LL+diff*3.618);
TL44 = TL_New(sdate[ii],stime[ii],HH-diff*2.00,sdate,stime,HH-diff*2.00);
TL45 = TL_New(sdate[ii],stime[ii],HH-diff*2.618,sdate,stime,HH-diff*2.618);
TL46 = TL_New(sdate[ii],stime[ii],HH-diff*3.618,sdate,stime,HH-diff*3.618);
TL_SetExtRight(TL41,true);
TL_SetExtRight(TL42,true);
TL_SetExtRight(TL43,true);
TL_SetExtRight(TL44,true);
TL_SetExtRight(TL45,true);
TL_SetExtRight(TL46,true);
TL_SetSize(TL41,2);
TL_SetSize(TL42,2);
TL_SetSize(TL43,2);
TL_SetSize(TL44,2);
TL_SetSize(TL45,2);
TL_SetSize(TL46,2);
}
if T == 1 and T != T[1] and 저점[1,1] > 저점[2,1] Then
Buy();
#### 거래당일 매수바(bar) 발생하는 종목검색식 부탁드립니다
일봉에서 사용하고져 합니다
2020-08-15
916
글번호 141539
종목검색