커뮤니티
문의
2019-04-12 15:31:57
191
글번호 127817
회신하여 주신 수식 중 역순으로 익절하는 수식을 예를 듭니다.
연결선물 10틱봉
피라미딩누적 5개
피라미딩간격 0.15포인트
익절1 1.00
익절2 1.50
익절3 2.00
익절4 2.50
익절5 3.00
위 기준으로 시뮬레이션해보니 아래 내용이 발견되었습니다.
첫째, 첨부파일 2019년 4월 3일 b1 3회 진입(b1 b1 b2 b1 b5 )
피라미딩 간격을 유지하며 b1 b2 b3 b4 b5 순으로 진입을 원함
둘째, 첨부파일 2019년 1월25일 (b1 b2 b3 b4 b5 ) 순서대로 진입되었습니다.
익절이 1.00 1.65 2.30 2.95 3.60 으로 청산되는데
10틱봉 치고는 세팅값과 차이가 큰데 봉완성 기준이라 그런 것인지요
세째, 하단에 진입순 청산 수식도 위와 같은 결과가 도출되오니 함께 검토바랍니다.
1. 역순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b5");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b4");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b2");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b1");
}
}
2. 진입순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b1");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b2");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b4");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b5");
}
}
- 1. b1_3회_진입.jpg (0.47 MB)
- 2. 간격_0.15포인트로_5개_누적_진입하나_익절내용이_다름.jpg (0.46 MB)
답변 2
예스스탁 예스스탁 답변
2019-04-15 10:43:53
안녕하세요
예스스탁입니다.
차트의 시간은 초단위만 있고 그이하가 없습니다.
그러므로 10틱과 같은 작은 주기에는 초까지 같은 봉이 여러개 발생할수 있습니다.
첫진입을 무포지션에서만 시간 체크방법을 수정해 드립니다.
각 수식의 첫진입 내용을 아래내용으로 변경하시면 됩니다.
if MarketPosition == 0 and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
buy("b1");
2
청산의 시간으로 보시면 모두 마지막 진입가격을 기준으로
일정 가격 상승시에 청산합니다. 이때 청산하는 진입신호만 역순이나 진입순으로 지정한것일 뿐입니다.
청산은 정상적으로 발생했습니다.
리포트의 청산은 각 청산이 청산한 진입신호의 아래에 표기가 됩니다.
진입역순청산이므로 b5->b4->b3->b2->b1 순으로 청산하고
b1는 bx5, b4는 bx, b3는 bx3, b4는 bx2, b5는 bx1신호로 청산되었습니다.
청산의 시간을 확인하시기 바랍니다. bx1이 가장 빠르고, bx5가 가장 늦은 시간입니다.
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 회신하여 주신 수식 중 역순으로 익절하는 수식을 예를 듭니다.
연결선물 10틱봉
피라미딩누적 5개
피라미딩간격 0.15포인트
익절1 1.00
익절2 1.50
익절3 2.00
익절4 2.50
익절5 3.00
위 기준으로 시뮬레이션해보니 아래 내용이 발견되었습니다.
첫째, 첨부파일 2019년 4월 3일 b1 3회 진입(b1 b1 b2 b1 b5 )
피라미딩 간격을 유지하며 b1 b2 b3 b4 b5 순으로 진입을 원함
둘째, 첨부파일 2019년 1월25일 (b1 b2 b3 b4 b5 ) 순서대로 진입되었습니다.
익절이 1.00 1.65 2.30 2.95 3.60 으로 청산되는데
10틱봉 치고는 세팅값과 차이가 큰데 봉완성 기준이라 그런 것인지요
세째, 하단에 진입순 청산 수식도 위와 같은 결과가 도출되오니 함께 검토바랍니다.
1. 역순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b5");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b4");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b2");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b1");
}
}
2. 진입순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b1");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b2");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b4");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b5");
}
}
목마와숙녀
2019-04-16 16:47:15
익절 세팅값과 결과 차이에 대한 답변은?
10틱/ 1분 / 5분 차트에서도 익절 세팅값과 결과 차이가 큽니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의
>
안녕하세요
예스스탁입니다.
차트의 시간은 초단위만 있고 그이하가 없습니다.
그러므로 10틱과 같은 작은 주기에는 초까지 같은 봉이 여러개 발생할수 있습니다.
첫진입을 무포지션에서만 시간 체크방법을 수정해 드립니다.
각 수식의 첫진입 내용을 아래내용으로 변경하시면 됩니다.
if MarketPosition == 0 and
((sdate != sdate[1] and stime >= ntime) or
(sdate == sdate[1] and stime >= ntime and stime[1] < ntime)) Then
buy("b1");
2
청산의 시간으로 보시면 모두 마지막 진입가격을 기준으로
일정 가격 상승시에 청산합니다. 이때 청산하는 진입신호만 역순이나 진입순으로 지정한것일 뿐입니다.
청산은 정상적으로 발생했습니다.
리포트의 청산은 각 청산이 청산한 진입신호의 아래에 표기가 됩니다.
진입역순청산이므로 b5->b4->b3->b2->b1 순으로 청산하고
b1는 bx5, b4는 bx, b3는 bx3, b4는 bx2, b5는 bx1신호로 청산되었습니다.
청산의 시간을 확인하시기 바랍니다. bx1이 가장 빠르고, bx5가 가장 늦은 시간입니다.
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 회신하여 주신 수식 중 역순으로 익절하는 수식을 예를 듭니다.
연결선물 10틱봉
피라미딩누적 5개
피라미딩간격 0.15포인트
익절1 1.00
익절2 1.50
익절3 2.00
익절4 2.50
익절5 3.00
위 기준으로 시뮬레이션해보니 아래 내용이 발견되었습니다.
첫째, 첨부파일 2019년 4월 3일 b1 3회 진입(b1 b1 b2 b1 b5 )
피라미딩 간격을 유지하며 b1 b2 b3 b4 b5 순으로 진입을 원함
둘째, 첨부파일 2019년 1월25일 (b1 b2 b3 b4 b5 ) 순서대로 진입되었습니다.
익절이 1.00 1.65 2.30 2.95 3.60 으로 청산되는데
10틱봉 치고는 세팅값과 차이가 큰데 봉완성 기준이라 그런 것인지요
세째, 하단에 진입순 청산 수식도 위와 같은 결과가 도출되오니 함께 검토바랍니다.
1. 역순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b5");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b4");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b2");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b1");
}
}
2. 진입순 익절 수식
input : ntime(090000);
input : pyra(0.50);
input : 익절1(0.50),익절2(1.00),익절3(1.50),익절4(2.00),익절5(2.50);
if stime == ntime or (stime > ntime and stime[1] < ntime) Then
buy("b1");
if MarketPosition == 1 Then
{
if MaxContracts == 1 Then
buy("b2",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 2 Then
buy("b3",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 3 Then
buy("b4",AtStop,LatestEntryPrice(0)+Pyra);
if MaxContracts == 4 Then
buy("b5",AtStop,LatestEntryPrice(0)+Pyra);
if MaxEntries == 5 then
{
ExitLong("bx1",atlimit,LatestEntryPrice(0)+익절1,"b1");
ExitLong("bx2",atlimit,LatestEntryPrice(0)+익절2,"b2");
ExitLong("bx3",atlimit,LatestEntryPrice(0)+익절3,"b3");
ExitLong("bx4",atlimit,LatestEntryPrice(0)+익절4,"b4");
ExitLong("bx5",atlimit,LatestEntryPrice(0)+익절5,"b5");
}
}