커뮤니티
진입 후 시가 훼손
2011-09-14 13:28:14
550
글번호 42638
질문 드립니다.
아래 식에서 프라핏이 두 번 나고 나면 열 봉을 쉬고 난 후 다시 신호가 발생하려면 어떻게 식을 세워야 할까요?
또, 매수진입 후 신호 발생한 봉의 시가를 하회하는 음봉 발생 시 청산시킨 후 신규 매도신호 시까지 신호가 발생하지 않으려면 어떤 식을 세우면 될까요?(매도 진입 시에는 신호난 봉의 시가겠죠..)
========== 아래 식 ==============
input : thankyou(2),losscut(2);
value1 = (highest(H,9)+lowest(L,9))/2; //var1
value2 = (highest(H,26)+lowest(L,26))/2; //var2
If value1 > value2 Then
{
Buy ("buy") ;
}
If value1 < value2 Then
{
Sell ("sell");
SetStopProfittarget(thankyou,PointStop);
SetStopLoss(losscut,PointStop);
setStopEndofday();
}
답변 1
예스스탁 예스스탁 답변
2011-09-14 16:13:09
안녕하세요
예스스탁입니다.
input : thankyou(2),losscut(2);
Condition1 = IsExitName("StopProfittarget",1) == true and IsExitName("StopProfittarget",2) == true;
value1 = (highest(H,9)+lowest(L,9))/2; //var1
value2 = (highest(H,26)+lowest(L,26))/2; //var2
If MarketPosition == -1 or #매수포지션 진행중이거나
(MarketPosition == 0 and Condition1 == false) or#무포지션 상태인데 두번연속 SetStopProfittarget으로 청산된 것이 아니거나
(MarketPosition == 0 and Condition1 == true and BarsSinceExit(1) >= 10) or #무포지션 상태인데 두번연속 SetStopProfittarget으로 청산되었다면 10봉이후
(MarketPosition == 0 and IsExitName("sx",1) ==true) then{ #무포지션상태인데 직전청산이 sx일때
if value1 > value2 Then
{
Buy ("buy") ;
}
}
If MarketPosition == 1 or #매도포지션 진행중이거나
(MarketPosition == 0 and Condition1 == false) or #무포지션 상태인데 두번연속 SetStopProfittarget으로 청산된 것이 아니거나
(MarketPosition == 0 and Condition1 == true and BarsSinceExit(1) >= 10) or #무포지션 상태인데 두번연속 SetStopProfittarget으로 청산되었다면 10봉이후
(MarketPosition == 0 and IsExitName("bx",1) == true) then{#무포지션상태인데 직전청산이 bx일때
If value1 < value2 Then
{
Sell ("sell");
}
}
#매수후 매수봉의 시가 아래이고 음봉이면 청산
if MarketPosition == 1 and C < O and C < O[BarsSinceEntry] Then
exitlong("bx");
#매도후 매도봉의 시가 위이고 양봉이면 청산
if MarketPosition == -1 and C > O and C > O[BarsSinceEntry] Then
ExitShort("sx");
SetStopProfittarget(thankyou,PointStop);
SetStopLoss(losscut,PointStop);
setStopEndofday();
즐거운 하루되세요
> WT_ohjeon66 님이 쓴 글입니다.
> 제목 : 진입 후 시가 훼손
> 질문 드립니다.
아래 식에서 프라핏이 두 번 나고 나면 열 봉을 쉬고 난 후 다시 신호가 발생하려면 어떻게 식을 세워야 할까요?
또, 매수진입 후 신호 발생한 봉의 시가를 하회하는 음봉 발생 시 청산시킨 후 신규 매도신호 시까지 신호가 발생하지 않으려면 어떤 식을 세우면 될까요?(매도 진입 시에는 신호난 봉의 시가겠죠..)
========== 아래 식 ==============
input : thankyou(2),losscut(2);
value1 = (highest(H,9)+lowest(L,9))/2; //var1
value2 = (highest(H,26)+lowest(L,26))/2; //var2
If value1 > value2 Then
{
Buy ("buy") ;
}
If value1 < value2 Then
{
Sell ("sell");
SetStopProfittarget(thankyou,PointStop);
SetStopLoss(losscut,PointStop);
setStopEndofday();
}