커뮤니티
문의드립니다.
2015-05-13 13:00:13
221
글번호 85983
먼저 항상 감사드립니다.
100틱 차트에서 다른 200틱이나 300틱의 파라볼릭을 보고 싶습니다.
아래 두가지 지표에 수정 부탁드립니다.
(다른 틱수는 변수로 놓아 변경할수 있게 부탁드려요.)
1.일반 파라 볼릭(종가)
2.갭보정 파라볼릭
1.일반 파라 볼릭(종가)-------------------------
Input : af(0.02), maxAF(0.2);
var1 = CSar(af,maxAF);
if var1 > C Then
Plot1(var1, "CSAR",Blue);
Else
Plot1(var1, "CSAR",Red);
------------------------------------------------
2.갭보정 파라볼릭-------------------------------
Input: AF(0.004), AFMAX(0.04);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),GCSAR(0);
var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0);
if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = Open-Close[1]; // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = O - sumGap;// 갭보정 시가
GH = H - sumGap;// 갭보정 고가
GL = L - sumGap;// 갭보정 저가
GC = C - sumGap; // 갭보정 종가
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = Gl;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = GH;
}
}
GCSar = SAR_Value;
}
else
{
if SAR_Value != 0 && EP == 0 then
{
if Direction == 1 then
{
EP = HighValue;
AF_Value = AF;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
else
{
EP = LowValue;
AF_Value = Af;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
GCSar = SAR_Value;
}
else
{
if Direction == 0 then
{
if GC > GC[1] then Direction = 1;
else
if GC < GC[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if GC < GC[1] then
{
Direction = -1;
SAR_Value = HighValue;
GCSar = SAR_Value;
}
}
if Direction == -1 then
{
if GC > GC[1] then
{
Direction = 1;
SAR_Value = LowValue;
GCSar = SAR_Value;
}
}
}
LowValue = min(GL,LowValue);
HighValue = max(GH,HighValue);
}
}
if GC > GCSar[1] then
plot1(GCSar,"갭보정파라볼릭",RED);
Else
plot1(GCSar,"갭보정파라볼릭",blue);
--------------------------------------------------------------------
답변 1
예스스탁 예스스탁 답변
2015-05-13 14:01:55
안녕하세요
예스스탁입니다.
문의하신 지표는 수식안에서 다른주기계산이 되지 않습니다.
참조데이터를 이용하셔야 합니다.
100틱 차트에 원하시는 다른 주기의 차트를 참조데이터(data2)로 추가하신후에
아래식 적용해서 사용하셔야 합니다.
참조데이터는 차트왼쪽 상단의 종목선택버튼 중 오른쪽 클릭하시면
선택해 추가할수 있고 주종목과 같은 종목으로 다른주기도 가능합니다.
1.
Input : af(0.02), maxAF(0.2);
var : para(0,data2);
para = data2(CSar(af,maxAF));
if para > data2(C) Then
Plot1(para, "CSAR",Blue);
Else
Plot1(para, "CSAR",Red);
2.
Input: AF(0.004), AFMAX(0.04);
Var : Direction(0,data2), SAR_Value(Close,data2), AF_Value(.02,data2);
var : HighValue(High,data2), LowValue(Low,data2), EP(0,data2),GCSAR(0,data2);
var : gap(0,data2),sumgap(0,data2),GO(0,data2),GH(0,data2),GL(0,data2),GC(0,data2);
if data2(date!=date[1]) then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = data2(Open-Close[1]); // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = data2(O) - sumGap;// 갭보정 시가
GH = data2(H) - sumGap;// 갭보정 고가
GL = data2(L) - sumGap;// 갭보정 저가
GC = data2(C) - sumGap; // 갭보정 종가
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = Gl;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = GH;
}
}
GCSar = SAR_Value;
}
else
{
if SAR_Value != 0 && EP == 0 then
{
if Direction == 1 then
{
EP = HighValue;
AF_Value = AF;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
else
{
EP = LowValue;
AF_Value = Af;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
GCSar = SAR_Value;
}
else
{
if Direction == 0 then
{
if GC > GC[1] then Direction = 1;
else
if GC < GC[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if GC < GC[1] then
{
Direction = -1;
SAR_Value = HighValue;
GCSar = SAR_Value;
}
}
if Direction == -1 then
{
if GC > GC[1] then
{
Direction = 1;
SAR_Value = LowValue;
GCSar = SAR_Value;
}
}
}
LowValue = min(GL,LowValue);
HighValue = max(GH,HighValue);
}
}
if GC > GCSar[1] then
plot1(GCSar,"갭보정파라볼릭",RED);
Else
plot1(GCSar,"갭보정파라볼릭",blue);
즐거운 하루되세요
> 비류천 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 먼저 항상 감사드립니다.
100틱 차트에서 다른 200틱이나 300틱의 파라볼릭을 보고 싶습니다.
아래 두가지 지표에 수정 부탁드립니다.
(다른 틱수는 변수로 놓아 변경할수 있게 부탁드려요.)
1.일반 파라 볼릭(종가)
2.갭보정 파라볼릭
1.일반 파라 볼릭(종가)-------------------------
Input : af(0.02), maxAF(0.2);
var1 = CSar(af,maxAF);
if var1 > C Then
Plot1(var1, "CSAR",Blue);
Else
Plot1(var1, "CSAR",Red);
------------------------------------------------
2.갭보정 파라볼릭-------------------------------
Input: AF(0.004), AFMAX(0.04);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),GCSAR(0);
var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0);
if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = Open-Close[1]; // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = O - sumGap;// 갭보정 시가
GH = H - sumGap;// 갭보정 고가
GL = L - sumGap;// 갭보정 저가
GC = C - sumGap; // 갭보정 종가
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = Gl;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if GC > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = GH;
}
}
GCSar = SAR_Value;
}
else
{
if SAR_Value != 0 && EP == 0 then
{
if Direction == 1 then
{
EP = HighValue;
AF_Value = AF;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GH > HighValue then
{
HighValue = GH;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
else
{
EP = LowValue;
AF_Value = Af;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if GL < LowValue then
{
LowValue = GL;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
GCSar = SAR_Value;
}
else
{
if Direction == 0 then
{
if GC > GC[1] then Direction = 1;
else
if GC < GC[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if GC < GC[1] then
{
Direction = -1;
SAR_Value = HighValue;
GCSar = SAR_Value;
}
}
if Direction == -1 then
{
if GC > GC[1] then
{
Direction = 1;
SAR_Value = LowValue;
GCSar = SAR_Value;
}
}
}
LowValue = min(GL,LowValue);
HighValue = max(GH,HighValue);
}
}
if GC > GCSar[1] then
plot1(GCSar,"갭보정파라볼릭",RED);
Else
plot1(GCSar,"갭보정파라볼릭",blue);
--------------------------------------------------------------------