커뮤니티
수정바랍니다...
2013-06-22 16:02:15
190
글번호 64610
안녕하세요..아래와 같이 식을 만들었는데요..
일단 장시작때 급락장때 대응하기 위해 피봇을 이용해서 만들었는데
문제는 처음 진입은 그런대로 마음에 드는데
재진입을 별로 원하지 않아서요...
진입 청산후 1시간 후에 다시 재진입을 식으로 했는데
제가 실력이 부족해서 그런지 잘 작동이 안돼네요,,,
1시간이 아니고 아침에 거래가 있은후 40분간은 재진입을 막았으면 좋겠구요...
재진입도 10시 30분 까지만으로 재진입이 가능한걸로 제한했으면 합니다...
오후에 들어가면 판판이 깨져서요...
부탁드립니다...
==================================================================
var:피봇(0),저항1(0),저항2(0),지지1(0),지지2(0),atrv(0),atrstop(0);
피봇 = (DayHigh(1)+daylow(1)+dayclose(1))/3 ;
저항1 = 2 * 피봇 - daylow(1);
저항2 = 피봇 + DayHigh(1)-DayLow(1);
지지1 = 2 * 피봇 - DayHigh(1);
지지2 = 피봇 - DayHigh(1) + DayLow(1);
atrv=atr(15);
atrstop=iff(adxv>25 and adxv>adxv[1],atrv*2.8,atrv*4);
if stime>=090000 and stime<=093000 and o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] then Sell("십이번sell");
var1 = Highest(h,BarsSinceEntry+1);
var2 = Lowest(L,BarsSinceEntry+1);
if IsEntryName("십이번sell") Then
{ ExitShort("십이번ES",AtStop, Var2+ATRstop);
if (ADX(14)<ADX(14)[1]) then ExitShort("십이번2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then ExitShort("십이번3ES");
if MarketPosition == -1 then ExitShort("익절", atlimit, EntryPrice-1);
}
Condition1 = (MarketPosition == 0 and ExitDate(1) != sdate) or
(ExitDate(1) == sdate and MarketPosition == 0 and
TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+60);
if Condition1 == true and o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] Then
sell("재진입");
if IsEntryName("재진입") Then
{ ExitShort("재진입ES",AtStop, Var2+ATRstop);
if (ADX(27)<ADX(27)[1]) then ExitShort("재진입2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then ExitShort("재진입3ES");
if MarketPosition == -1 then ExitShort("재익절", atlimit, EntryPrice-1);
}
SetStopEndofday(1445);
답변 1
예스스탁 예스스탁 답변
2013-06-24 11:01:33
안녕하세요
예스스탁입니다.
var:피봇(0),저항1(0),저항2(0),지지1(0),지지2(0),atrv(0),atrstop(0);
피봇 = (DayHigh(1)+daylow(1)+dayclose(1))/3 ;
저항1 = 2 * 피봇 - daylow(1);
저항2 = 피봇 + DayHigh(1)-DayLow(1);
지지1 = 2 * 피봇 - DayHigh(1);
지지2 = 피봇 - DayHigh(1) + DayLow(1);
atrv=atr(15);
atrstop=iff(adxv>25 and adxv>adxv[1],atrv*2.8,atrv*4);
if stime>=090000 and stime<=093000 and
o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] then Sell("십이번sell");
var1 = Highest(h,BarsSinceEntry+1);
var2 = Lowest(L,BarsSinceEntry+1);
if IsEntryName("십이번sell") Then
{ ExitShort("십이번ES",AtStop, Var2+ATRstop);
if (ADX(14)<ADX(14)[1]) then ExitShort("십이번2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then ExitShort("십이번3ES");
if MarketPosition == -1 then ExitShort("익절", atlimit, EntryPrice-1);
}
if ExitDate(1) == sdate and
MarketPosition == 0 and
TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+40 and
stime < 103000 and
o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] Then
sell("재진입");
if IsEntryName("재진입") Then
{
ExitShort("재진입ES",AtStop, Var2+ATRstop);
if (ADX(27)<ADX(27)[1]) then
ExitShort("재진입2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then
ExitShort("재진입3ES");
if MarketPosition == -1 then
ExitShort("재익절", atlimit, EntryPrice-1);
}
SetStopEndofday(1445);
식상 adxv라는 선언되지 않은 변수가 사용되어 있습니다.
해당 부분 추가하시기 바랍니다.
즐거운 하루되세요
> 머니사이언스 님이 쓴 글입니다.
> 제목 : 수정바랍니다...
> 안녕하세요..아래와 같이 식을 만들었는데요..
일단 장시작때 급락장때 대응하기 위해 피봇을 이용해서 만들었는데
문제는 처음 진입은 그런대로 마음에 드는데
재진입을 별로 원하지 않아서요...
진입 청산후 1시간 후에 다시 재진입을 식으로 했는데
제가 실력이 부족해서 그런지 잘 작동이 안돼네요,,,
1시간이 아니고 아침에 거래가 있은후 40분간은 재진입을 막았으면 좋겠구요...
재진입도 10시 30분 까지만으로 재진입이 가능한걸로 제한했으면 합니다...
오후에 들어가면 판판이 깨져서요...
부탁드립니다...
==================================================================
var:피봇(0),저항1(0),저항2(0),지지1(0),지지2(0),atrv(0),atrstop(0);
피봇 = (DayHigh(1)+daylow(1)+dayclose(1))/3 ;
저항1 = 2 * 피봇 - daylow(1);
저항2 = 피봇 + DayHigh(1)-DayLow(1);
지지1 = 2 * 피봇 - DayHigh(1);
지지2 = 피봇 - DayHigh(1) + DayLow(1);
atrv=atr(15);
atrstop=iff(adxv>25 and adxv>adxv[1],atrv*2.8,atrv*4);
if stime>=090000 and stime<=093000 and o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] then Sell("십이번sell");
var1 = Highest(h,BarsSinceEntry+1);
var2 = Lowest(L,BarsSinceEntry+1);
if IsEntryName("십이번sell") Then
{ ExitShort("십이번ES",AtStop, Var2+ATRstop);
if (ADX(14)<ADX(14)[1]) then ExitShort("십이번2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then ExitShort("십이번3ES");
if MarketPosition == -1 then ExitShort("익절", atlimit, EntryPrice-1);
}
Condition1 = (MarketPosition == 0 and ExitDate(1) != sdate) or
(ExitDate(1) == sdate and MarketPosition == 0 and
TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+60);
if Condition1 == true and o< 지지2 and c<지지2 and (ADX(14)>ADX(14)[1]) and StochasticsD(15,9,9) < StochasticsD(15,9,9)[1] Then
sell("재진입");
if IsEntryName("재진입") Then
{ ExitShort("재진입ES",AtStop, Var2+ATRstop);
if (ADX(27)<ADX(27)[1]) then ExitShort("재진입2ES");
if StochasticsD(15,9,9) > StochasticsD(15,9,9)[1] then ExitShort("재진입3ES");
if MarketPosition == -1 then ExitShort("재익절", atlimit, EntryPrice-1);
}
SetStopEndofday(1445);