커뮤니티
청산 적략 부탁드립니다.
2014-10-10 04:02:42
187
글번호 79223
1
전략 청산 부탁 드립니다.
12틱 상승 이후 현재가와 매수가가 같으면 본정
20틱 상승 이후 현재가 매수가 + 3틱 이면 청산
25틱 상승 이후 현재가 매수가 + 5틱 이면 청산
2
전략 청산 이후 15개봉 이내에 진입금지
목표가 SetStopProfittarget 이후 15개봉 이내에 진입금지
손절후 15개봉 이내에 재매수 금지 또는 15분 이내 매수 금지
3
하루 수익 50틱 이상인경우 매매종료
하루 손해 30틱 이상인경우 매매 종료
하루 5번 이상 진입금지.
4
특정 요일/시간때 무포지션 및 진입 금지
ex) 2014/10/18 02시20분 ~ 40분 무포지션 및 진입 금지
부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2014-10-10 15:29:02
안녕하세요
예스스탁입니다.
1.
if MarketPosition == 1 Then{
var1 = Highest(H,BarsSinceEntry);
if var1 >= EntryPrice+PriceScale*12 and var1 < EntryPrice+PriceScale*20 Then
ExitLong("bx1",AtStop,EntryPrice);
if var1 >= EntryPrice+PriceScale*20 and var1 < EntryPrice+PriceScale*25 Then
ExitLong("bx2",AtStop,EntryPrice+PriceScale*3);
if var1 >= EntryPrice+PriceScale*25 Then
ExitLong("bx3",AtStop,EntryPrice+PriceScale*5);
}
if MarketPosition == -0 Then{
var2 = Lowest(L,BarsSinceEntry);
if var2 <= EntryPrice-PriceScale*12 and var2 > EntryPrice-PriceScale*20 Then
ExitShort("sx1",AtStop,EntryPrice);
if var2 <= EntryPrice-PriceScale*20 and var2 > EntryPrice-PriceScale*25 Then
ExitShort("sx2",AtStop,EntryPrice-PriceScale*3);
if var2 <= EntryPrice-PriceScale*25 Then
ExitShort("sx3",AtStop,EntryPrice-PriceScale*5);
}
2.
if (MarketPosition == 0 and (IsExitName("StopLoss",1) == false or IsExitName("StopProfittarget",1) == false)) Or
(MarketPosition == 0 and BarsSinceExit(1) >= 15 and (IsExitName("StopLoss",1) == true or IsExitName("StopProfittarget",1) == true)) Or
(MarketPosition != 0) Then{
if 매수진입조건 Then
buy();
if 매도진입조건 Then
sell();
}
3.
var : NP(0),PreNP(0),dayPL(0),EntryCount(0);
NP = NetProfit;
if date != date[1] Then{
PreNP = NP[1];
EntryCount = 0;
}
dayPL = NP-PreNP;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
EntryCount = EntryCount+1;
if dayPL < PriceScale*50 and dayPL > -PriceScale*20 and EntryCount < 5 Then{
if 매수진입조건 Then
buy();
if 매도진입조건 Then
sell();
}
4.
input : 일정날짜(20141018),시작시간(22000),끝시간(24000);
var : EntryX(false);
if sdate == 20141018 and stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
EntryX = true;
if sdate == 20141018 and stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
EntryX = False;
if EntryX == false Then{
if 매수진입조건 Then
buy();
if 매도진입조건 Then
sell();
}
즐거운 하루되세요
> 바람의투자자 님이 쓴 글입니다.
> 제목 : 청산 적략 부탁드립니다.
> 1
전략 청산 부탁 드립니다.
12틱 상승 이후 현재가와 매수가가 같으면 본정
20틱 상승 이후 현재가 매수가 + 3틱 이면 청산
25틱 상승 이후 현재가 매수가 + 5틱 이면 청산
2
전략 청산 이후 15개봉 이내에 진입금지
목표가 SetStopProfittarget 이후 15개봉 이내에 진입금지
손절후 15개봉 이내에 재매수 금지 또는 15분 이내 매수 금지
3
하루 수익 50틱 이상인경우 매매종료
하루 손해 30틱 이상인경우 매매 종료
하루 5번 이상 진입금지.
4
특정 요일/시간때 무포지션 및 진입 금지
ex) 2014/10/18 02시20분 ~ 40분 무포지션 및 진입 금지
부탁드립니다.
이전글