답변완료
문의 드립니다.
안녕하세요
아래 지표를 사용중에 있는데요..
Input : Period(5);
var1 = ma(C,Period+0);
var2 = ma(C,Period+1);
var3 = ma(C,Period+2);
var4 = ma(C,Period+3);
var5 = ma(C,Period+4);
var6 = ma(C,Period+5);
var7 = ma(C,Period+6);
var8 = ma(C,Period+7);
var9 = ma(C,Period+8);
var10 = ma(C,Period+9);
var11 = ma(C,Period+10);
plot1(var1,"이동평균0",iff(var1>var1[1],YELLOW,GREEN));
plot2(var2,"이동평균1",iff(var2>var2[1],YELLOW,GREEN));
plot3(var3,"이동평균2",iff(var3>var3[1],YELLOW,GREEN));
plot4(var4,"이동평균3",iff(var4>var4[1],YELLOW,GREEN));
plot5(var5,"이동평균4",iff(var5>var5[1],YELLOW,GREEN));
plot6(var6,"이동평균5",iff(var6>var6[1],YELLOW,GREEN));
plot7(var7,"이동평균6",iff(var7>var7[1],YELLOW,GREEN));
plot8(var8,"이동평균7",iff(var8>var8[1],YELLOW,GREEN));
plot9(var9,"이동평균8",iff(var9>var9[1],YELLOW,GREEN));
plot10(var10,"이동평균9",iff(var10>var10[1],YELLOW,GREEN));
plot11(var11,"이동평균10",iff(var11>var11[1],YELLOW,GREEN));
이지표를 변수를 조정해서 3개를 사용중입니다.
변수는 1 . 5 . 15
이렇게 사용중입니다.
여기서 1 변수에서 제일 작은 이평과 15 변수에서 제일 큰 이평이 서로 크로스 할때
매수,매도 신호가 나오게 수식좀 만들어 주시면 감사하겠습니다.
그리고요
선색이 노랑색과 연두색인데요...
모든선들이 노랑색으로 변하면 매수 신호
모든선들이 연두색으로 변하면 매도 신호 나오게도 부탁드립니다.
감사합니다.
2020-11-14
493
글번호 143882
시스템
답변완료
매매시스템 오류 검증
항상 감사합니다
아래시스템식 검증 부탁드립니다.
input : 시작시간(090000),끝시간(113000);
var : Start(false),entrycnt(0),Bcond(false),Bcond1(false),Scond(false),Scond1(false),idx(0);
var : NP(0),PreNP(0),dayPL(0);
NP = NetProfit;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = 0;
Idx = 0;
PreNP = NP;
}
dayPL = (NP-PreNP)+PositionProfit;
Idx = idx+1;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
if stime == 090000 or (stime > 090000 and stime[1] < 090000) Then # 현지시간_ 09:00 장시작 #
Entrycnt = 0;
Bcond = t100==1 and var20>var10 and t60==1 and c>var480 ;
Scond = t100==-1 and var20<var10 and t60==-1 and c<var480 ;
Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and
(IsExitName("eB_청산",1) == true or IsExitName("StopLoss",1) == true);
Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and
(IsExitName("eS_청산",1) == true or IsExitName("StopLoss",1) == true);
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
Entrycnt = Entrycnt+1;
if Idx >= 1 and
Start == true and
Bcond == true and
((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지#
(EntryCnt == 0 or MarketPosition == -1 or (EntryCnt > 0 and MarketPosition == 0 and Condition1 == False )) Then {
if dayPL <= PriceScale*30 and EntryCnt < 6 THEN
buy("B1");
Else
ExitShort("eB_청산");
}
if Idx >= 1 and
Start == true and
Scond == true and
((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) or (MarketPosition == 1)) and #동일방향 재진입금지#
(EntryCnt == 0 or MarketPosition == 1 or (EntryCnt > 0 and MarketPosition == 0 and Condition2 == False )) Then{
IF dayPL <= PriceScale*30 and EntryCnt < 6 Then
sell("S1");
Else
ExitLong("eS_청산");
}
##################################
##### 중심선 돌파 청산 #####
##################################
if MarketPosition == 1 and 66==-1 and t100==-1 /*var20<var10/*중심선*/ Then
exitlong("eB_중심선");
if MarketPosition == -1 and t66==1 and t100==1 /*var20>var10 /*중심선*/ Then
ExitShort("eS_중심선");
2020-11-13
523
글번호 143880
시스템