커뮤니티
확인부탁요
2013-02-07 15:46:26
264
글번호 59243
input : 투입금액(100000),P1(5),P2(20),P3(60);
var : ma1(0),ma2(0),ma3(0);
if CodeCategory == 1 Then{ #코스피
if BasePrice < 50000 Then
Var1 = int(int(투입금액/C)/10)*10;
Else
Var1 = int(투입금액/C);
}
if CodeCategory == 2 Then#코스닥
Var1 = int(투입금액/C);
if CodeCategory == 6 Then#옵션
Var1 = int(투입금액/(C*BigPointValue));
value1 = Upvol/DownVol*100;
ma1 = ma(c,P1);
ma2 = ma(c,P2);
ma3 = ma(c,P3);
If ExitDate(1) != sdate and MarketPosition == 0 and dayindex > 0
and countif(V > 30000,2) == 2 and countif(value1 >=120,2) == 2 and
stime >= 100000 and
ma1 > ma2 and ma2 > ma3 Then
buy("b",onclose,def,var1);
SetStopLoss(3,PercentStop);
SetStopProfittarget(3,PercentStop);
이동평균선 정배열에서요 이동평균이 1분봉 기준인가요?아님 일봉기준인가요?
분봉 기준이면 1봉기준으로 바꾸고 싶은데요 어떻게 하면 되는지요
항상 성싱한 답변 감사합니다
답변 1
예스스탁 예스스탁 답변
2013-02-07 16:37:16
안녕하세요
예스스탁입니다.
적용하는 차트가 1분봉이면 1분봉 기준이며
차트가 일봉이면 일봉기준입니다.
분봉차트에 적용하는데 일봉기준을 사용하고 하시면 아래식
이용하시면 됩니다.
input : 투입금액(100000),P1(5),P2(20),P3(60);
var : count(0),sumV1(0),sumV2(0),sumV3(0);
var : mav1(0),mav2(0),mav3(0);
if CodeCategory == 1 Then{ #코스피
if BasePrice < 50000 Then
Var1 = int(int(투입금액/C)/10)*10;
Else
Var1 = int(투입금액/C);
}
if CodeCategory == 2 Then#코스닥
Var1 = int(투입금액/C);
if CodeCategory == 6 Then#옵션
Var1 = int(투입금액/(C*BigPointValue));
value1 = Upvol/DownVol*100;
#일봉이평 계산
sumV1 = 0;
sumV2 = 0;
sumV3 = 0;
for count = 0 to P3{
if count < P1 Then
sumV1 = sumV1+CloseD(count);
if count < P2 Then
sumV2 = sumV2+CloseD(count);
if count < P3 Then
sumV3 = sumV3+CloseD(count);
}
maV1 = sumV1 / P1;
maV2 = sumV2 / P2;
maV3 = sumV3 / P3;
If ExitDate(1) != sdate and MarketPosition == 0 and dayindex > 0
and countif(V > 30000,2) == 2 and countif(value1 >=120,2) == 2 and
stime >= 100000 and
mav1 > mav2 and mav2 > mav3 Then
buy("b",onclose,def,var1);
SetStopLoss(3,PercentStop);
SetStopProfittarget(3,PercentStop);
즐거운 하루되세요
> HI_jht7469 님이 쓴 글입니다.
> 제목 : 확인부탁요
> input : 투입금액(100000),P1(5),P2(20),P3(60);
var : ma1(0),ma2(0),ma3(0);
if CodeCategory == 1 Then{ #코스피
if BasePrice < 50000 Then
Var1 = int(int(투입금액/C)/10)*10;
Else
Var1 = int(투입금액/C);
}
if CodeCategory == 2 Then#코스닥
Var1 = int(투입금액/C);
if CodeCategory == 6 Then#옵션
Var1 = int(투입금액/(C*BigPointValue));
value1 = Upvol/DownVol*100;
ma1 = ma(c,P1);
ma2 = ma(c,P2);
ma3 = ma(c,P3);
If ExitDate(1) != sdate and MarketPosition == 0 and dayindex > 0
and countif(V > 30000,2) == 2 and countif(value1 >=120,2) == 2 and
stime >= 100000 and
ma1 > ma2 and ma2 > ma3 Then
buy("b",onclose,def,var1);
SetStopLoss(3,PercentStop);
SetStopProfittarget(3,PercentStop);
이동평균선 정배열에서요 이동평균이 1분봉 기준인가요?아님 일봉기준인가요?
분봉 기준이면 1봉기준으로 바꾸고 싶은데요 어떻게 하면 되는지요
항상 성싱한 답변 감사합니다
다음글