커뮤니티
지그재그 지표 추가하고 싶습니다
2019-06-24 14:25:55
337
글번호 129689
예스 글로벌 사용중입니다
지그재그 지표를 추가하고 싶은데요
어떻게 해야하는지 자세히좀 알려주시면 감사하겠습니다
수식을 어디에 넣는 것인지도 자세히 부탁드립니다
답변 1
예스스탁 예스스탁 답변
2019-06-25 15:58:02
안녕하세요
예스스탁입니다.
1
지그재그 수식은 아래 내용 참고하시기 바랍니다.
2
프로그램 상단메뉴 >> 시스템트레이딩 >> 예스랭귀지(Yes Language)
시스템 트레이딩 메뉴에서 예스랭귀지 편집기 여신 후에
상단메뉴 중 파일 --> 새로만들기 --> 새로만들기 창의 일반탭에서 지표
--> 지표새로작성창에서 이름지정후 확인클릭 --> 수식내용 작성
--> f4키 눌러 검증 --> 검증 완료후 f5키를 누르면 지표속성창이 나타납니다.
지표속성에서 Y축표시를 가격으로 설정 후 --> 차트에 적용 하시면 됩니다.
자세한 수식 작성법은 예스랭귀지 도움말 참고하시기 바랍니다.
3
Input:chngRate(0.1);
Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0);
Array:valArr[10](0),barArr[10](0),turnPntArr[10]("");
For j = 0 To 9
{
barArr[j] = barArr[j] + 1;
}
Condition1 = Min(valArr[1],valArr[2]) * (1 + (chngRate/100)) < H and lastHiVal < H;
Condition2 = Max(valArr[1],valArr[2]) * (1 - (chngRate/100)) > L and (lastLoVal > L || lastLoVal == 0);
If Condition1 Then { lastHiVal = H; lastLoVal = 0; }
If Condition2 Then { lastLoVal = L; lastHiVal = 0; }
turnPntBit = "";
If Condition1 and Condition2 Then
{
If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then
turnPntBit = "HiLo";
Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi";
Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo";
}
Else If Condition1 Then turnPntBit = "Hi";
Else If Condition2 Then turnPntBit = "Lo";
If turnPntBit <> "" Then
{
If turnPntBit == "HiLo" Then
{
valArr[1] = IFF(turnPntArr[1] == "Hi",H,L);
barArr[1] = 0;
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
If turnPntArr[1] == "Hi" Then
turnPntBit = "Lo";
Else
turnPntBit = "Hi";
}
If turnPntBit <> turnPntArr[1] Then
{
for j = 8 downto 1
{
valArr[j+1] = valArr[j];
barArr[j+1] = barArr[j];
turnPntArr[j+1] = turnPntArr[j];
}
}
If turnPntBit <> turnPntArr[1] or
(turnPntBit == turnPntArr[1] and
((turnPntBit == "Hi" and valArr[1] < H) or
(turnPntBit == "Lo" and valArr[1] > L))) Then
{
valArr[1] = IFF(turnPntBit == "Hi",H,L);
barArr[1] = 0;
turnPntArr[1] = turnPntBit;
If turnPntArr[1][1] <> turnPntArr[1][0] Then{
TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
Else
TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]);
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,black);
> 고양이2 님이 쓴 글입니다.
> 제목 : 지그재그 지표 추가하고 싶습니다
> 예스 글로벌 사용중입니다
지그재그 지표를 추가하고 싶은데요
어떻게 해야하는지 자세히좀 알려주시면 감사하겠습니다
수식을 어디에 넣는 것인지도 자세히 부탁드립니다
다음글
이전글