답변완료
피보30분 130 10 30
input:length(5),a틱(30),b틱(30),c틱(5);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),Text1(0),process(0),T(0);
Array:HH[10,2](0),LL[10,2](0);
input : StartTime(100000),EndTime(50000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
process = 0;
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If LL[1,1] > L Then process = -1;
If HH[1,1] < H Then process = 1;
}
Else If Highest(H,length) == H and lastHiVal <> H Then process = 1;
Else If Lowest(L,length) == L and lastLoVal <> L Then process = -1;
If process == 1 Then
{
T = 1;
lastHiVal = H;
If HH[1,2] < LL[1,2] Then
{
For j = 10 DownTo 2
{
HH[j,1] = HH[j-1,1];
HH[j,2] = HH[j-1,2];
}
}
If HH[1,2] < LL[1,2] or HH[1,1] < H Then
{
HH[1,1] = H;
HH[1,2] = Index;
sBar = Index - LL[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if LL[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],LL[1,1],sDate[eBar],sTime[eBar],HH[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 1);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,2));
Text_SetStyle(Text1, 2, 1);
}
Text_SetStyle(Text1, 2, 1);
}
if MarketPosition <= 0 and
HH[2,1] >= LL[2,1]+PriceScale*a틱 and
LL[1,1] <= HH[2,1]-PriceScale*b틱 and
Tcond == true Then
Buy("b",AtStop,HH[2,1]+PriceScale*c틱);
}
If process == -1 Then
{
T = -1;
lastLoVal = L;
If LL[1,2] < HH[1,2] Then
{
For j = 10 DownTo 2
{
LL[j,1] = LL[j-1,1];
LL[j,2] = LL[j-1,2];
}
}
If LL[1,2] < HH[1,2] or LL[1,1] > L Then
{
LL[1,1] = L;
LL[1,2] = Index;
sBar = Index - HH[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if HH[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],HH[1,1],sDate[eBar],sTime[eBar],LL[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
}
if MarketPosition >= 0 and
LL[2,1] <= HH[2,1]-PriceScale*a틱 and
HH[1,1] >= LL[2,1]+PriceScale*b틱 and
Tcond == true Then
Sell("s",AtStop,LL[2,1]-PriceScale*c틱);
}
if MarketPosition == 1 and IsEntryName("b") == true Then
Sell("bs",AtStop,EntryPrice-PriceScale*20);
if MarketPosition == -1 and IsEntryName("s") == true Then
Buy("sb",AtStop,EntryPrice+PriceScale*20);
2025-01-12
561
글번호 187061
시스템
답변완료
풋 옵션의 지표가 찌그러져 보입니다.
사용한 수식은
var : V_J1(0),V_J2(0);
var : sumGap(0), gap(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; // 갭보정 종가
var1 = wma(GC,20)/(wma(GC,5)/100);
var2 = wma(GC,5)/(wma(GC,20)/100);
value1 = max(var1,var2);
value2 = min(var1,var2);
value3 = value1-value2;#폭
if value3 > value3[1] Then#폭이 커질때
{
if var1 > var2 Then
{
plot1(var1,"1",BLUE,def,2);#굵기 2
plot2(var2,"2",BLUE,def,2);#굵기 2
}
else
{#역배열
plot1(var1,"1",RED,def,2);#굵기 2
plot2(var2,"2",RED,def,2);#굵기 2
}
}
Else#폭이 좁아지거나 유지될때
{
if var1> var2[1] Then
{#정배열
plot1(var1,"1",BLUE,def,0.5);#굵기 0.5
plot2(var2,"2",BLUE,def,0.5);#굵기 0.5
}
else #역배열
{
plot1(var1,"1",RED,def,0.5);#굵기 0.5
plot2(var2,"2",RED,def,0.5);#굵기 0.5
}
}
입니다.
예를 들어 첨부한 그림파일의 동그라미에서 처럼 풋 옵션의 2월 330 의 5분 옵션은 정상으로 나옵니다.
하지만 10분 20분 30분 40분은 찌그러져 보입니다. 물론 1월물도 그렇게 보이는 것이 많습니다
심지어 P2502 327.5 같은 경우는 거꾸로 보입니다.
예스트레이더의 옵션 장기 분봉(10분봉 이상) 들이 저렇게 찌그러져 보이는게 오래 되었습니다.
제가 정확히는 모르지만 아마도 옵션의 파라미터의 폭을 너무 좁게 주어서 이런 현상이 생기는게 아닌가 사료됩니다. 수정 좀 부탁 드립니다. 감사합니다.
2025-01-09
531
글번호 187038
지표