커뮤니티
수식 문의요
2013-09-24 03:36:05
121
글번호 67741
안녕하세요
물타기 말고 손절식 넣으려고 한는데요
양봉 첫번째 저가 깰 경우 손절하는걸로 바꾸어주세요
그리고 2번째양봉이 종가 5프로이상 상승할경우 매수안되게 해주세요
장대 양봉 나올경우 매수 금지되는 식으로요
즐거운하루되세요
input : 금액(200000);
var : Vol(0),BuyP(0);
if CodeCategoryEx == 11 and BasePrice < 50000 Then
Vol = int(int(금액/C)/10)*10;
Else
Vol = int(금액/C);
if CodeCategoryEx == 31 or CodeCategoryEx == 32 Then
Vol = int((금액)/(C*BigPointValue));
var1 = ma(C,1);
var2 = ma(c,5);
if MarketPosition == 0 and
crossup(var1,var2) and
countif(C>O,2) == 2 and
V > V[1] Then{
buy("매수",AtMarket,def,Vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 and
crossup(var1,var2) and
countif(C>O,2) == 2 and
L > L[1] and L[1] < L[2] and
C <= BuyP*0.95 Then{
buy("추가매수",AtMarket,def,vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 Then
exitlong("매도",atlimit,avgEntryPrice*1.05);
답변 1
예스스탁 예스스탁 답변
2013-09-24 11:53:14
안녕하세요
예스스탁입니다.
input : 금액(200000);
var : Vol(0),BuyP(0);
if CodeCategoryEx == 11 and BasePrice < 50000 Then
Vol = int(int(금액/C)/10)*10;
Else
Vol = int(금액/C);
if CodeCategoryEx == 31 or CodeCategoryEx == 32 Then
Vol = int((금액)/(C*BigPointValue));
var1 = ma(C,1);
var2 = ma(c,5);
if MarketPosition == 0 and
crossup(var1,var2) and
countif(C>O,2) == 2 and C < O*1.05 and
V > V[1] Then{
buy("매수",AtMarket,def,Vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 and
crossup(var1,var2) and
countif(C>O,2) == 2 and C < O*1.05 and
L > L[1] and L[1] < L[2] and
C <= BuyP*0.95 Then{
buy("추가매수",AtMarket,def,vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 Then{
exitlong("매도",atlimit,avgEntryPrice*1.05);
ExitLong("손절",AtStop,L[BarsSinceEntry+1]);
}
즐거운 하루되세요
> HI_jh***** 님이 쓴 글입니다.
> 제목 : 수식 문의요
> 안녕하세요
물타기 말고 손절식 넣으려고 한는데요
양봉 첫번째 저가 깰 경우 손절하는걸로 바꾸어주세요
그리고 2번째양봉이 종가 5프로이상 상승할경우 매수안되게 해주세요
장대 양봉 나올경우 매수 금지되는 식으로요
즐거운하루되세요
input : 금액(200000);
var : Vol(0),BuyP(0);
if CodeCategoryEx == 11 and BasePrice < 50000 Then
Vol = int(int(금액/C)/10)*10;
Else
Vol = int(금액/C);
if CodeCategoryEx == 31 or CodeCategoryEx == 32 Then
Vol = int((금액)/(C*BigPointValue));
var1 = ma(C,1);
var2 = ma(c,5);
if MarketPosition == 0 and
crossup(var1,var2) and
countif(C>O,2) == 2 and
V > V[1] Then{
buy("매수",AtMarket,def,Vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 and
crossup(var1,var2) and
countif(C>O,2) == 2 and
L > L[1] and L[1] < L[2] and
C <= BuyP*0.95 Then{
buy("추가매수",AtMarket,def,vol);
BuyP = NextBarOpen;
}
if MarketPosition == 1 Then
exitlong("매도",atlimit,avgEntryPrice*1.05);
다음글
이전글