예스스탁
예스스탁 답변
2021-01-04 14:13:15
안녕하세요
예스스탁입니다.
익절과 손절에에서 12나 14등으로 지정한 값이 수익률인지 가격인지 모르겠습니다.
1번은 수익률, 2번은 가격으로 처리해 드립니다.
1
var : A1.3Price(0),A1.3high(0);
#A1.3진입
if CurrentContrActs > CurrentContrActs[1] And LAtestEntryNAme(0) == "A1.3" Then
{
A1.3Price = LAtestEntryPrice(0);
A1.3high = H;
}
if A1.3high > 0 And H > A1.3high Then
A1.3high = H;
if A1.3Price > 0 Then
{
if Highest(H,2)[1] >= A1.3Price*1.12 and C < A1.3Price*1.14 Then
ExitLong("A1.3.P1",AtLimit,A1.3Price*1.16,"A1.3");
if Highest(H,2)[1] >= A1.3Price*1.12 and C >= A1.3Price*1.14 and C < A1.3Price*1.16 Then
ExitLong("A1.3.P2",AtLimit,A1.3Price*1.14,"A1.3");
if Highest(H,2)[1] >= A1.3Price*1.12 and C >= A1.3Price*1.16 and C < A1.3Price*1.18 Then
ExitLong("A1.3.P3",AtLimit,A1.3Price*1.12,"A1.3");
if Highest(H,2)[1] < 12 Then
ExitLong("A1.3.P4",AtLimit,A1.3Price*1.12,"A1.3");
if A1.3high >= A1.3Price*1.04 and A1.3high < A1.3Price*1.06 Then
ExitLong("A1.3.tr1",AtStop,A1.3high*0.96,"A1.3");
if A1.3high >= A1.3Price*1.06 Then
ExitLong("A1.3.tr2",AtStop,C-abs(A1.3high-C)*0.3,"A1.3");
if Highest(H,2)[1] >= A1.3Price*1.12 Then
ExitLong("A1.3.l1",AtStop,A1.3Price*0.96,"A1.3");
if Highest(H,2)[1] < A1.3Price*1.12 Then
ExitLong("A1.3.l2",AtStop,A1.3Price*0.97,"A1.3");
}
2
var : A1.3Price(0),A1.3high(0);
#A1.3진입
if CurrentContrActs > CurrentContrActs[1] And LAtestEntryNAme(0) == "A1.3" Then
{
A1.3Price = LAtestEntryPrice(0);
A1.3high = H;
}
if A1.3high > 0 And H > A1.3high Then
A1.3high = H;
if A1.3Price > 0 Then
{
if Highest(H,2)[1] >= 12 and C < 14 Then
ExitLong("A1.3.P1",AtLimit,A1.3Price*1.16,"A1.3");
if Highest(H,2)[1] >= 12 and C >= 14 and C < 16 Then
ExitLong("A1.3.P2",AtLimit,A1.3Price*1.14,"A1.3");
if Highest(H,2)[1] >= 12 and C >= 16 and C < 18 Then
ExitLong("A1.3.P3",AtLimit,A1.3Price*1.12,"A1.3");
if Highest(H,2)[1] < 12 Then
ExitLong("A1.3.P4",AtLimit,A1.3Price*1.12,"A1.3");
if A1.3high >= A1.3Price*1.04 and A1.3high < A1.3Price*1.06 Then
ExitLong("A1.3.tr1",AtStop,A1.3high*0.96,"A1.3");
if A1.3high >= A1.3Price*1.06 Then
ExitLong("A1.3.tr2",AtStop,C-abs(A1.3high-C)*0.3,"A1.3");
if Highest(H,2)[1] >= 12 Then
ExitLong("A1.3.l1",AtStop,A1.3Price*0.96,"A1.3");
if Highest(H,2)[1] < 12 Then
ExitLong("A1.3.l2",AtStop,A1.3Price*0.97,"A1.3");
}
즐거운 하루되세요
> 말라 님이 쓴 글입니다.
> 제목 : 매도 부분에 관해 질문올립니다.
> 안녕하세요 시스템에서 매도에 관한 질문좀 올릴게요
아래는 제가 쓰고있는 하나의 매도식입니다.
#A1.3진입
if CurrentContrActs > CurrentContrActs[1] And LAtestEntryNAme(0) == "A1.3" Then
{
A1.3Price = LAtestEntryPrice(0);
A1.3high = H;
}
if A1.3high > 0 And H > A1.3high Then
A1.3high = H;
if A1.3Price > 0 Then
{
ExitLong("A1.3.1",AtLimit,A1.3Price*1.16,"A1.3");
if A1.3high >= A1.3Price*1.01 Then
ExitLong("A1.3.2",AtStop,A1.3high*0.93,"A1.3");
ExitLong("A1.3.3",AtStop,A1.3Price*0.97,"A1.3");
여기서 몇가지좀 추가하고싶은데요
고가와 종가에 따른 매도부분을 수정하고싶습니다.
C[1] . Highest(H,2)[2] 조건에 따라 달라지게 만들고 싶습니다
즉, 익절부분은 4개로
-Highest(H,2)[2]이 12이상 and C[1]이 14미만 일때는 A1.3Price*1.16 익절
-Highest(H,2)[2]이 12이상 and C[1]이 14이상 16미만 일때는 A1.3Price*1.14 익절
-Highest(H,2)[2]이 12이상 and C[1]이 16이상 18미만 일떄는 A1.3Price*1.12 익절
-Highest(H,2)[2]이 12미만 일때는 A1.3Price*1.12 익절
슬라이딩 부분은 2개로
-매수후 고가가 4프로이상 6프로미만인 경우는 (=A1.3high >= A1.3Price*1.04 and A1.3high < A1.3Price*1.06)
시세가 A1.3high 대비 0.96퍼센트 보다 낮으면 매도
-매수후 고가가 6프로이상인 경우는 (=A1.3high >= A1.3Price*1.06)
시세가 (A1.3high-C[1])*0.3+C[1] 보다 낮으면 매도
손절부분은 2개로
-Highest(H,2)[2]이 12이상 일때는 0.96
-Highest(H,2)[2]이 12이하 일때는 0.97
이렇게 수정을 하고싶습니다.
신호명은 아무거나 임의로 작성해주셔도됩니다
(위에 작성된 것처럼 식좀 써주세요 ㅜ.ㅜ 완전초보라..
제가 수정 및 대입을 하기가 힘드네요)
감사합니다