커뮤니티
부탁드립니다
2014-03-31 07:59:10
172
글번호 73960
if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수2");
}
if CrossDown(c,s1 and stime >= 090100 and stime < 145000 and s1=DayOpen-0.45 and s1=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도1);
}
if CrossDown(c,s2 and stime >= 090100 and stime < 145000 and s2=DayOpen-0.45 and s2=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도2);
}
위의식은 fr[2]이상에는 매수조건,fr[4]이하에서는 매도조건으로 됩니다
그런데 같은자리값의 fr[2],fr[4]에서 재진입이 될시 휩소가 발생되어 이를
조금이나마 해소하고자 다음과 같이 조건문을 연결하여 주시면 감사하겠습니다.
만약 .......
위의 식대로 진입후 청산결과가 손실이면 같은자리값인 fr[2],fr[4]에서는
더이상 위의 진입식에 의한 재진입이 일어나지 않도록 하고싶습니다.
청산결과가 익절이면 재진입발생은 허용하구요,,,
단지 손절처리되면 더이상 같은자리값인 fr[2],fr[4]에서는 재진입신호가 발생치
않도록 하고싶습니다...
각각의 매수와 매도의 진입식에 조건문을 연결하여 주시면 감사하겠습니다,,,
즐거운 하루되십시요....
답변 2
예스스탁 예스스탁 답변
2014-03-31 17:58:30
안녕하세요
예스스탁입니다.
if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수2");
}
if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도1");
}
if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도2");
}
즐거운 하루되세요
> 오동도물개 님이 쓴 글입니다.
> 제목 : 부탁드립니다
> if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수2");
}
if CrossDown(c,s1 and stime >= 090100 and stime < 145000 and s1=DayOpen-0.45 and s1=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도1);
}
if CrossDown(c,s2 and stime >= 090100 and stime < 145000 and s2=DayOpen-0.45 and s2=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도2);
}
위의식은 fr[2]이상에는 매수조건,fr[4]이하에서는 매도조건으로 됩니다
그런데 같은자리값의 fr[2],fr[4]에서 재진입이 될시 휩소가 발생되어 이를
조금이나마 해소하고자 다음과 같이 조건문을 연결하여 주시면 감사하겠습니다.
만약 .......
위의 식대로 진입후 청산결과가 손실이면 같은자리값인 fr[2],fr[4]에서는
더이상 위의 진입식에 의한 재진입이 일어나지 않도록 하고싶습니다.
청산결과가 익절이면 재진입발생은 허용하구요,,,
단지 손절처리되면 더이상 같은자리값인 fr[2],fr[4]에서는 재진입신호가 발생치
않도록 하고싶습니다...
각각의 매수와 매도의 진입식에 조건문을 연결하여 주시면 감사하겠습니다,,,
즐거운 하루되십시요....
예스스탁 예스스탁 답변
2014-03-31 18:24:11
안녕하세요
예스스탁입니다.
수정한 식입니다.
if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) > 0) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) <= 0 and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) > 0) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) <= 0 and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수2");
}
if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도1");
}
if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도2");
}
즐거운 하루되세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 부탁드립니다
>
안녕하세요
예스스탁입니다.
if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[2] != Fr[2][BarsSinceEntry(1)]) Then
buy("매수2");
}
if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도1");
}
if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == 1) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == false) or
(count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and IsExitName("StopLoss",1) == true and
Fr[4] != Fr[4][BarsSinceEntry(1)]) Then
Sell("매도2");
}
즐거운 하루되세요
> 오동도물개 님이 쓴 글입니다.
> 제목 : 부탁드립니다
> if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수1");
}
if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{
if count == 0 or (count >= 1 and C > ExitPrice(1)) Then
buy("매수2");
}
if CrossDown(c,s1 and stime >= 090100 and stime < 145000 and s1=DayOpen-0.45 and s1=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도1);
}
if CrossDown(c,s2 and stime >= 090100 and stime < 145000 and s2=DayOpen-0.45 and s2=fr[4] and count < N Then{
if count == 0 or (count >= 1 and C < ExitPrice(1)) Then
Sell("매도2);
}
위의식은 fr[2]이상에는 매수조건,fr[4]이하에서는 매도조건으로 됩니다
그런데 같은자리값의 fr[2],fr[4]에서 재진입이 될시 휩소가 발생되어 이를
조금이나마 해소하고자 다음과 같이 조건문을 연결하여 주시면 감사하겠습니다.
만약 .......
위의 식대로 진입후 청산결과가 손실이면 같은자리값인 fr[2],fr[4]에서는
더이상 위의 진입식에 의한 재진입이 일어나지 않도록 하고싶습니다.
청산결과가 익절이면 재진입발생은 허용하구요,,,
단지 손절처리되면 더이상 같은자리값인 fr[2],fr[4]에서는 재진입신호가 발생치
않도록 하고싶습니다...
각각의 매수와 매도의 진입식에 조건문을 연결하여 주시면 감사하겠습니다,,,
즐거운 하루되십시요....
다음글
이전글