커뮤니티
수식 부탁드립니다
2017-10-26 10:12:21
155
글번호 113623
분봉 차트에서 사용할예정입니다
1)단가 1000원 돌파시 50만원어치 매수
-장초반1000이상이지만 갭5%이상시에는 20만원어치 매수
-장초반1000이상이고 갭5%이상이지만 전일음봉이고 전일고점과 2%이내일때 30만원어치 매수
2)1차매수후 2%상승시 추가로 최초매수의 50%를 추가 매수
3)7%상승시 청산50%
15%상승시 청산25%
20%청산시 청산25%
4)4~6.99%상승후 4%이하시 20% 청산
7%상승시 청산30%
15%상승시 청산25%
20%청산시 청산25%
5)-5%에서 손절 50%
손절 50%이후 -5~-9.99%사이에서 더하락하다가 -5%이상 상승시 손절한량만큼 재매수
0~4.99% 상승하다가 0%이하로 재하락시 완전청산
5%상승시 청산50%
10%상승시 청산25%
15%청산시 청산25%
답변 1
예스스탁 예스스탁 답변
2017-10-26 14:19:13
안녕하세요
예스스탁입니다.
var : XV(0),HH(0);
var : X1(0),X2(0),X3(0),X4(0);
var : X5(0),X6(0),X7(0),X8(0),X9(0);
if bdate != bdate[1] Then
{
if MarketPosition == 0 and O >= C[1]*1.05 and O >= 1000 Then
{
if DayClose(1) < dayopen(1) and C <= dayhigh(1)*0.98 and C <= DayHigh(1)*1.02 Then
buy("b3",OnClose,def,floor(300000/C));
Else
buy("b2",OnClose,def,floor(200000/C));
}
}
Else
{
if MarketPosition == 0 and crossup(C,1000) Then
buy("b1",OnClose,def,Floor(500000/c));
}
if MarketPosition == 1 Then
{
if CurrentContracts < CurrentContracts[1] Then{
XV = abs(CurrentContracts-CurrentContracts[1]);
if LatestExitName(0) == "bp11" or LatestExitName(0) == "bp12" Then
X1 = X1+1;
if LatestExitName(0) == "bp2" Then
X2 = X2+1;
if LatestExitName(0) == "bp3" Then
X3 = X3+1;
if LatestExitName(0) == "btr" Then
X4 = X4+1;
if LatestExitName(0) == "bl" Then
X5 = X5+1;
if LatestExitName(0) == "bx" Then
X6 = X6+1;
if LatestExitName(0) == "bp21" Then
X7 = X7+1;
if LatestExitName(0) == "bp22" Then
X8 = X8+1;
if LatestExitName(0) == "bp23" Then
X9 = X9+1;
}
if CurrentContracts > CurrentContracts[1] Then
HH = H;
if H > HH Then
HH = H;
if MaxEntries == 1 and CurrentContracts == MaxContracts Then
buy("bb1",AtStop,EntryPrice*1.02,CurrentContracts*0.5);
if MaxEntries == 1 and CurrentContracts < MaxContracts and LatestExitName(0) == "bl" Then
buy("bb2",AtStop,EntryPrice*0.95,XV);
if LatestEntryName(0) == "bb1" Then
{
if X1 < 1 then
{
if CurrentContracts == MaxContracts Then
ExitLong("bp11",atlimit,EntryPrice*1.07,"",Floor(MaxContracts*0.5),1);
Else
ExitLong("bp12",atlimit,EntryPrice*1.07,"",Floor(MaxContracts*0.3),1);
}
if X2 < 1 then
ExitLong("bp2",atlimit,EntryPrice*1.15,"",Floor(MaxContracts*0.25),1);
if X3 < 1 then
ExitLong("bp3",atlimit,EntryPrice*1.20);
if X4 < 1 and
CurrentContracts == MaxContracts and
highest(h,BarsSinceEntry) > EntryPrice*1.04 and
highest(h,BarsSinceEntry) < EntryPrice*1.07 Then
ExitLong("btr",AtStop,EntryPrice*1.04,"",Floor(MaxContracts*0.20),1);
}
if X5 < 1 Then
ExitLong("bl",AtStop,EntryPrice*0.95,"",Floor(MaxContracts*0.50),1);
if LatestEntryName(0) == "bb2" Then
{
if X6 < 1 and HH > EntryPrice and HH < EntryPrice*1.05 Then
exitlong("bx",AtStop,EntryPrice);
if X7 < 1 then
ExitLong("bp21",atlimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1);
if X8 < 1 Then
ExitLong("bp22",atlimit,EntryPrice*1.10,"",Floor(MaxContracts*0.25),1);
if X9 < 1 Then
ExitLong("bp23",atlimit,EntryPrice*1.15);
}
}
Else{
X1 = 0;
X2 = 0;
X3 = 0;
X4 = 0;
X5 = 0;
X6 = 0;
X7 = 0;
X8 = 0;
X9 = 0;
}
즐거운 하루되세요
> 티끌 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다
> 분봉 차트에서 사용할예정입니다
1)단가 1000원 돌파시 50만원어치 매수
-장초반1000이상이지만 갭5%이상시에는 20만원어치 매수
-장초반1000이상이고 갭5%이상이지만 전일음봉이고 전일고점과 2%이내일때 30만원어치 매수
2)1차매수후 2%상승시 추가로 최초매수의 50%를 추가 매수
3)7%상승시 청산50%
15%상승시 청산25%
20%청산시 청산25%
4)4~6.99%상승후 4%이하시 20% 청산
7%상승시 청산30%
15%상승시 청산25%
20%청산시 청산25%
5)-5%에서 손절 50%
손절 50%이후 -5~-9.99%사이에서 더하락하다가 -5%이상 상승시 손절한량만큼 재매수
0~4.99% 상승하다가 0%이하로 재하락시 완전청산
5%상승시 청산50%
10%상승시 청산25%
15%청산시 청산25%
다음글
이전글