커뮤니티

피보나치 신호

프로필 이미지
고성
2026-02-13 11:16:12
111
글번호 230556
답변완료

신호 셋중  첫 신호가 9시8분경에 미리서 나옵니다. 두번째,세번째는 정상입니다.

선물 50틱 이하 차트는 정상인데, 50틱 이상에서 오류.   검토 부탁드립니다.

input : 고점(814.45),시작시간(095000);

var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0);

var : Tcond(False),LL(0),D1(0),T1(0);

if (sdate != sDate[1] and sTime >= 시작시간) or

(sdate == sDate[1] and sTime >= 시작시간 and sTime[1] < 시작시간) Then

{

Tcond = true;

d1 = sDate;

t1 = sTime;

LL = L;

}

if (sdate != sDate[1] and sTime >= 154500) or

(sdate == sDate[1] and sTime >= 154500 and sTime[1] < 154500) Then

{

Tcond = False;

}

if tcond == true Then

{

if L < LL Then

LL = L;

var1 = LL;

Var2 = 고점;

Var3 = 고점+(고점-LL)*0.587;

Var4 = 고점+(고점-LL)*0.95;

Var5 = 고점+(고점-LL)*1.537;

if tcond == true and tcond != tcond[1] Then

{

TL_Delete(TL1);

TL_Delete(TL2);

TL_Delete(TL3);

TL_Delete(TL4);

TL_Delete(TL5);

TL1 = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1);

TL2 = TL_New(sDate,sTime,var2,NextBarSdate,NextBarStime,var2);

TL3 = TL_New(sDate,sTime,var3,NextBarSdate,NextBarStime,var3);

TL4 = TL_New(sDate,sTime,var4,NextBarSdate,NextBarStime,var4);

TL5 = TL_New(sDate,sTime,var5,NextBarSdate,NextBarStime,var5);

TL_SetExtRight(TL1,true);

TL_SetExtRight(TL2,true);

TL_SetExtRight(TL3,true);

TL_SetExtRight(TL4,true);

TL_SetExtRight(TL5,true);

TL_SetColor(TL1,Red);

TL_SetColor(TL2,Green);

TL_SetColor(TL3,Red);

TL_SetColor(TL4,Blue);

TL_SetColor(TL5,Magenta);

TL_SetSize(TL5,1);

}

Else

{

TL_SetBegin(TL1,d1,t1,var1);

TL_SetBegin(TL2,d1,t1,var2);

TL_SetBegin(TL3,d1,t1,var3);

TL_SetBegin(TL4,d1,t1,var4);

TL_SetBegin(TL5,d1,t1,var5);

TL_SetEnd(TL1,NextBarSdate,NextBarStime,var1);

TL_SetEnd(TL2,NextBarSdate,NextBarStime,var2);

TL_SetEnd(TL3,NextBarSdate,NextBarStime,var3);

TL_SetEnd(TL4,NextBarSdate,NextBarStime,var4);

TL_SetEnd(TL5,NextBarSdate,NextBarStime,var5);

}

}

if Bdate != Bdate[1] Then

{

Condition1 = False;

Condition2 = False;

Condition3 = False;

}

if Tcond == true Then

{

if MarketPosition == 1 Then

{

if IsEntryName("b3") == true Then

Condition1 = true;

if IsEntryName("b4") == true Then

Condition2 = true;

if IsEntryName("b5") == true Then

Condition3 = true;

}

if Condition1 == False and H < var3 and NextBarBdate == Bdate Then

Buy("b3",AtStop,var3);

if Condition2 == False and H < var4 and NextBarBdate == Bdate Then

Buy("b4",AtStop,var4);

if Condition3 == False and H < var5 and NextBarBdate == Bdate Then

Buy("b5",AtStop,var5);

if MarketPosition == 1 and BarsSinceEntry == 1 Then

ExitLong("bx");

}



시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-02-13 17:04:23

안녕하세요 예스스탁입니다. 사용하시는 주기에 따라 stime으로 154500으로 시작하는 봉이 없을 수 있습니다.
즉 마지막봉 stime이 문제가 됩니다. Tcond의 종료시간을 time으로 체크하고 영업일 변경시에도 false 로 초기화 되게 수정해 드립니다. input : 고점(814.45),시작시간(095000); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0); var : Tcond(False),LL(0),D1(0),T1(0); if Bdate != Bdate[1] Then { Tcond = False; } if (sdate != sDate[1] and sTime >= 시작시간) or (sdate == sDate[1] and sTime >= 시작시간 and sTime[1] < 시작시간) Then { Tcond = true; d1 = sDate; t1 = sTime; LL = L; } if (sdate != sDate[1] and Time >= 154500) or (sdate == sDate[1] and Time >= 154500 and Time[1] < 154500) Then { Tcond = False; } if tcond == true Then { if L < LL Then LL = L; var1 = LL; Var2 = 고점; Var3 = 고점+(고점-LL)*0.587; Var4 = 고점+(고점-LL)*0.95; Var5 = 고점+(고점-LL)*1.537; if tcond == true and tcond != tcond[1] Then { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL1 = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); TL2 = TL_New(sDate,sTime,var2,NextBarSdate,NextBarStime,var2); TL3 = TL_New(sDate,sTime,var3,NextBarSdate,NextBarStime,var3); TL4 = TL_New(sDate,sTime,var4,NextBarSdate,NextBarStime,var4); TL5 = TL_New(sDate,sTime,var5,NextBarSdate,NextBarStime,var5); TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetColor(TL1,Red); TL_SetColor(TL2,Green); TL_SetColor(TL3,Red); TL_SetColor(TL4,Blue); TL_SetColor(TL5,Magenta); TL_SetSize(TL5,1); } Else { TL_SetBegin(TL1,d1,t1,var1); TL_SetBegin(TL2,d1,t1,var2); TL_SetBegin(TL3,d1,t1,var3); TL_SetBegin(TL4,d1,t1,var4); TL_SetBegin(TL5,d1,t1,var5); TL_SetEnd(TL1,NextBarSdate,NextBarStime,var1); TL_SetEnd(TL2,NextBarSdate,NextBarStime,var2); TL_SetEnd(TL3,NextBarSdate,NextBarStime,var3); TL_SetEnd(TL4,NextBarSdate,NextBarStime,var4); TL_SetEnd(TL5,NextBarSdate,NextBarStime,var5); } } if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; Condition3 = False; } if Tcond == true Then { if MarketPosition == 1 Then { if IsEntryName("b3") == true Then Condition1 = true; if IsEntryName("b4") == true Then Condition2 = true; if IsEntryName("b5") == true Then Condition3 = true; } if Condition1 == False and H < var3 and NextBarBdate == Bdate Then Buy("b3",AtStop,var3); if Condition2 == False and H < var4 and NextBarBdate == Bdate Then Buy("b4",AtStop,var4); if Condition3 == False and H < var5 and NextBarBdate == Bdate Then Buy("b5",AtStop,var5); if MarketPosition == 1 and BarsSinceEntry == 1 Then ExitLong("bx"); } 새해 복 많이 받으시고 즐거운 명절 보내시기 바랍니다.