커뮤니티
수정부탁합니다
2013-10-16 23:10:14
144
글번호 68544
안녕하세요
9시~9시20분사이에 2번째 매수시에는 첫번째(매도,손절)가격보다 낮을경우 2번째매수들어가게 해주세요
수고하십시오~
input : 투입금액(200000),P(20);
var : ma2(0);
ma2 = ma(c,20);
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));
If V >50000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and stime >= 90000 and stime < 92000 and dayopen > DayClose(1) Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수",onclose,def,var1);
}
If V >1000000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and
stime >= 144000 and stime < 150000 Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수2",onclose,def,var1);
}
if MarketPosition == 1 Then{
ExitLong("손절",AtStop,L[BarsSinceEntry]-PriceScale);
if countif(C < O,2) == 2 Then
;
}
value1 = ema(C, 1);
value2 = ema(C, 5);
# 매도/매수청산
If CrossDown(value1, value2) and C > EntryPrice Then
{
Sell();
}
답변 1
예스스탁 예스스탁 답변
2013-10-17 15:58:29
안녕하세요
예스스탁입니다.
input : 투입금액(200000),P(20);
var : ma2(0),cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
ma2 = ma(c,20);
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));
If V >50000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and stime >= 90000 and stime < 92000 and dayopen > DayClose(1)
and (count == 0 or (count == 1 and MarketPosition == 0 and C < ExitPrice(1))) Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수",onclose,def,var1);
}
If V >1000000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and
stime >= 144000 and stime < 150000 Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수2",onclose,def,var1);
}
if MarketPosition == 1 Then{
ExitLong("손절",AtStop,L[BarsSinceEntry]-PriceScale);
if countif(C < O,2) == 2 Then
;
}
value1 = ema(C, 1);
value2 = ema(C, 5);
# 매도/매수청산
If CrossDown(value1, value2) and C > EntryPrice Then
{
Sell();
}
즐거운 하루되세요
> HI_jh***** 님이 쓴 글입니다.
> 제목 : 수정부탁합니다
> 안녕하세요
9시~9시20분사이에 2번째 매수시에는 첫번째(매도,손절)가격보다 낮을경우 2번째매수들어가게 해주세요
수고하십시오~
input : 투입금액(200000),P(20);
var : ma2(0);
ma2 = ma(c,20);
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));
If V >50000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and stime >= 90000 and stime < 92000 and dayopen > DayClose(1) Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수",onclose,def,var1);
}
If V >1000000 and Upvol/DownVol*100 >=120
and C > O and C > ma2 and
stime >= 144000 and stime < 150000 Then{
if MarketPosition == 0 or (MarketPosition == 1 and C <= EntryPrice*0.95) Then
buy("매수2",onclose,def,var1);
}
if MarketPosition == 1 Then{
ExitLong("손절",AtStop,L[BarsSinceEntry]-PriceScale);
if countif(C < O,2) == 2 Then
;
}
value1 = ema(C, 1);
value2 = ema(C, 5);
# 매도/매수청산
If CrossDown(value1, value2) and C > EntryPrice Then
{
Sell();
}