커뮤니티
수식부탁합니다.
2013-03-27 18:34:19
209
글번호 61330
30mbo와 양봉세개후 매수진입(또는 음봉세개연속 후 매도진입)을 함께 쓰는 경우
손절 0.5 익절1.5 일때
패턴이 먼저 나오면 30mbo는 무시하고
30mbo가 먼저 진입되서 포지션이 있는경우 패턴이 나오면 반대방향의 경우는 리버스하고 mbo와 패턴이 동일 방향일 경우 패턴의 진입시점에서 부터 손절 과 익절을 다시 계산 할 수 있는 식 부탁합니다
예를 들어 30mbo매수 250.30 매수 진입후 250.80에 패턴진입이 나오면 250.80에서 손절0.5 익절1.5를 계산하려고 합니다. 실진입가는 250.30이지만 250.80으로 진입가가 변경되는 것입니다.
답변 1
예스스탁 예스스탁 답변
2013-03-28 10:30:20
안녕하세요
예스스탁입니다.
if stime < 93000 Then{
var1 = dayhigh;
var2 = daylow;
}
if MarketPosition == 0 and stime >= 93000 and stime < 150000 Then{
buy("b1",AtStop,var1);
sell("s1",AtStop,var2);
}
Condition1 = dayindex+1 >= 3 and countif(C>O,3) == 3;
Condition2 = dayindex+1 >= 3 and countif(C>O,3) == 3;
if date != date[1] Then
var1 = 0;
if MarketPosition <= 0 and Condition1 == true and Condition1[1] == false Then{
buy("b2");
}
if MarketPosition >= 0 and Condition2 == true and Condition2[1] == false Then{
sell("s2");
}
if MarketPosition == 1 and IsEntryName("b1") == true Then{
if Condition1 == true and Condition1[1] == false Then{
value1 = C;
}
if countif(Condition1 == true and Condition1[1] == false,BarsSinceEntry) == 0 Then{
ExitLong("bx1",AtStop,EntryPrice-0.5);
ExitLong("bx2",AtStop,EntryPrice+1.5);
}
if countif(Condition1 == true and Condition1[1] == false,BarsSinceEntry) >= 1 Then{
ExitLong("bx11",AtStop,value1-0.5);
ExitLong("bx22",AtStop,value1+1.5);
}
}
if MarketPosition == -1 and IsEntryName("s1") == true Then{
if Condition2 == true and Condition2[1] == false Then{
value2 = C;
}
if countif(Condition2 == true and Condition2[1] == false,BarsSinceEntry) == 0 Then{
ExitShort("sx1",AtStop,EntryPrice-0.5);
ExitShort("sx2",AtStop,EntryPrice+1.5);
}
if countif(Condition2 == true and Condition2[1] == false,BarsSinceEntry) >= 1 Then{
ExitShort("sx11",AtStop,value2-0.5);
ExitShort("sx22",AtStop,value2+1.5);
}
}
SetStopEndofday(150000);
즐거운 하루되세요
> 엉기 님이 쓴 글입니다.
> 제목 : 수식부탁합니다.
> 30mbo와 양봉세개후 매수진입(또는 음봉세개연속 후 매도진입)을 함께 쓰는 경우
손절 0.5 익절1.5 일때
패턴이 먼저 나오면 30mbo는 무시하고
30mbo가 먼저 진입되서 포지션이 있는경우 패턴이 나오면 반대방향의 경우는 리버스하고 mbo와 패턴이 동일 방향일 경우 패턴의 진입시점에서 부터 손절 과 익절을 다시 계산 할 수 있는 식 부탁합니다
예를 들어 30mbo매수 250.30 매수 진입후 250.80에 패턴진입이 나오면 250.80에서 손절0.5 익절1.5를 계산하려고 합니다. 실진입가는 250.30이지만 250.80으로 진입가가 변경되는 것입니다.
다음글
이전글