커뮤니티
새벽에는 진입이 안되게 해주세요~
2019-06-04 08:57:47
256
글번호 129164
아래수식을 변형해서 활용하고 있는데...
제가 원하는 진입은 유동성이 많을때 추세잡힐때 진입하는 것이 의도인데
가끔씩 새벽 3-4시에도 진입하는 경우가 있습니다.
해외선물이구요 ( 쿠르드, 나스닥) 새벽 2시 - 장종료까지 진입이 되지 않게 부탁드림니다.
물론 그전에 진입한 것에 대한 청산은 유효하고요
되도록이면 이런 간단한 질문은 혼자 해결하려고 하는데...
검색해서 적용해 보왔는데... 뭔가 잘못되었는지 자꾸 오류가 발생되네요..
감사합니다.
사용하고 있는 수식
--------------------------------------------------------------------------
Input : af(0.02), maxAF(0.2);
Input : P1(22000);
Input : 거래량평균일수1(15),거래량급등률1(0.7);
Input : Period(20), Percent1(0.6);
Input : 음봉틱수1(9);
Input : 청산양봉틱수1(1);
Input : M1(2);
input : 즉시익절1(180),즉시손절1(160),봉완성손절1(85);
input : 압도적이익실현률1(5.8),압도적손절1(160);
Input : 전일상승률(1.05);
Var : S1(0,data1),S2(0,data2); # 5분봉:S1 10분봉:S2
var : center(0,data1),UPline(0,data1),DNline(0,data1); # 엔벨로프
var : T(0,data1);
center = data1(ma(C, Period));
UPline = data1(EnvelopeUp(Period, Percent1));
S1 = data1(CSar(af,maxAF));
S2 = data2(CSar(af,maxAF));
if data1(crossup(c,S1)) Then
T = 1;
if data1(CrossDown(c,S1)) Then
T = -1;
if T == 1 and data1(C>upline and V >= P1 and V > ma(V,거래량평균일수1)*거래량급등률1 and c > dayopen) and data2(C > S2) Then
{
T = 3;
if data1(c < dayclose(1)*전일상승률) Then # 일봉 5%이하일때만 활성화
buy("매수",AtLimit,C-PriceScale*음봉틱수1);
}
if MarketPosition == 1 then
{
ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1);
if BarsSinceEntry >= M1 and c[1]>c[2] Then
ExitLong("봉완성익절1",AtLimit,C+PriceScale*청산양봉틱수1);
ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1);
if c <= EntryPrice-PriceScale*봉완성손절1 Then
ExitLong("봉완성손절1");
SetStopProfittarget(압도적이익실현률1);
SetStopLoss(PriceScale*압도적손절1,PointStop);
}
if bdate != bdate[1] Then
SetStopEndofday(0);
if sdate != sdate[1] and DayOfWeek(sdate) == 6 Then
SetStopEndofday(050000);
답변 1
예스스탁 예스스탁 답변
2019-06-04 16:53:55
안녕하세요
예스스탁입니다.
Input : af(0.02), maxAF(0.2);
Input : P1(22000);
Input : 거래량평균일수1(15),거래량급등률1(0.7);
Input : Period(20), Percent1(0.6);
Input : 음봉틱수1(9);
Input : 청산양봉틱수1(1);
Input : M1(2);
input : 즉시익절1(180),즉시손절1(160),봉완성손절1(85);
input : 압도적이익실현률1(5.8),압도적손절1(160);
Input : 전일상승률(1.05);
Var : S1(0,data1),S2(0,data2); # 5분봉:S1 10분봉:S2
var : center(0,data1),UPline(0,data1),DNline(0,data1); # 엔벨로프
var : T(0,data1),Tcond(false,data1);
center = data1(ma(C, Period));
UPline = data1(EnvelopeUp(Period, Percent1));
S1 = data1(CSar(af,maxAF));
S2 = data2(CSar(af,maxAF));
#새로운영업일 시작하면 Tcond는 true
if bdate != bdate[1] Then
Tcond = true;
#새벽2시가 되면 Tcond는 false
if (sdate != sdate[1] and stime >= 020000) or
(sdate == sdate[1] and stime >= 020000 and stime[1] < 020000) Then
Tcond = false;
if data1(crossup(c,S1)) Then
T = 1;
if data1(CrossDown(c,S1)) Then
T = -1;
if T == 1 and data1(C>upline and V >= P1 and V > ma(V,거래량평균일수1)*거래량급등률1 and c > dayopen) and data2(C > S2) Then
{
T = 3;
#Tcond가 true일때만 조건만족시 매수
if Tcond == true and data1(c < dayclose(1)*전일상승률) Then # 일봉 5%이하일때만 활성화
buy("매수",AtLimit,C-PriceScale*음봉틱수1);
}
if MarketPosition == 1 then
{
ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1);
if BarsSinceEntry >= M1 and c[1]>c[2] Then
ExitLong("봉완성익절1",AtLimit,C+PriceScale*청산양봉틱수1);
ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1);
if c <= EntryPrice-PriceScale*봉완성손절1 Then
ExitLong("봉완성손절1");
SetStopProfittarget(압도적이익실현률1);
SetStopLoss(PriceScale*압도적손절1,PointStop);
}
if bdate != bdate[1] Then
SetStopEndofday(0);
if sdate != sdate[1] and DayOfWeek(sdate) == 6 Then
SetStopEndofday(050000);
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 새벽에는 진입이 안되게 해주세요~
>
아래수식을 변형해서 활용하고 있는데...
제가 원하는 진입은 유동성이 많을때 추세잡힐때 진입하는 것이 의도인데
가끔씩 새벽 3-4시에도 진입하는 경우가 있습니다.
해외선물이구요 ( 쿠르드, 나스닥) 새벽 2시 - 장종료까지 진입이 되지 않게 부탁드림니다.
물론 그전에 진입한 것에 대한 청산은 유효하고요
되도록이면 이런 간단한 질문은 혼자 해결하려고 하는데...
검색해서 적용해 보왔는데... 뭔가 잘못되었는지 자꾸 오류가 발생되네요..
감사합니다.
사용하고 있는 수식
--------------------------------------------------------------------------
Input : af(0.02), maxAF(0.2);
Input : P1(22000);
Input : 거래량평균일수1(15),거래량급등률1(0.7);
Input : Period(20), Percent1(0.6);
Input : 음봉틱수1(9);
Input : 청산양봉틱수1(1);
Input : M1(2);
input : 즉시익절1(180),즉시손절1(160),봉완성손절1(85);
input : 압도적이익실현률1(5.8),압도적손절1(160);
Input : 전일상승률(1.05);
Var : S1(0,data1),S2(0,data2); # 5분봉:S1 10분봉:S2
var : center(0,data1),UPline(0,data1),DNline(0,data1); # 엔벨로프
var : T(0,data1);
center = data1(ma(C, Period));
UPline = data1(EnvelopeUp(Period, Percent1));
S1 = data1(CSar(af,maxAF));
S2 = data2(CSar(af,maxAF));
if data1(crossup(c,S1)) Then
T = 1;
if data1(CrossDown(c,S1)) Then
T = -1;
if T == 1 and data1(C>upline and V >= P1 and V > ma(V,거래량평균일수1)*거래량급등률1 and c > dayopen) and data2(C > S2) Then
{
T = 3;
if data1(c < dayclose(1)*전일상승률) Then # 일봉 5%이하일때만 활성화
buy("매수",AtLimit,C-PriceScale*음봉틱수1);
}
if MarketPosition == 1 then
{
ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1);
if BarsSinceEntry >= M1 and c[1]>c[2] Then
ExitLong("봉완성익절1",AtLimit,C+PriceScale*청산양봉틱수1);
ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1);
if c <= EntryPrice-PriceScale*봉완성손절1 Then
ExitLong("봉완성손절1");
SetStopProfittarget(압도적이익실현률1);
SetStopLoss(PriceScale*압도적손절1,PointStop);
}
if bdate != bdate[1] Then
SetStopEndofday(0);
if sdate != sdate[1] and DayOfWeek(sdate) == 6 Then
SetStopEndofday(050000);