커뮤니티

수정해주세요----------

프로필 이미지
leekss1
2012-05-03 16:36:45
296
글번호 50759
답변완료
Condition1 = False; Condition3 = False; if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and h > (goldjisu+var1)+1 and cvcha > -900 then { plot8(h+0.0,"색매도"); } if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and ( countif (h >= h[40]+0.15 and goldt <goldt[40] - 0.05,20) >=20 and dayindex > 40) then { Condition1 = True; } if( Condition1 == true and cvcha > -900 ) Then { Condition3 = True; } if Condition3 == True //and goldjisutem < goldjisutem[1] then { plot9(h+0.0,"골드매도"); PlaySound("C:₩예스트레이더31₩Data₩alert.wav"); } 중괄호 정리한다고 했습니다(나름) Condition3 == True;면 기다렸다가 goldjisutem < goldjisutem[1] 될때 plot9(h+0.0,"골드매도"); 하게해주세요 부탁드립니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-05-03 18:59:04

안녕하세요 예스스탁입니다. 식상에 어떤 if조건없이 아래와 같이만 작성이 되어 있으면 Condition1 = False; Condition3 = False; 매봉 두개의 변수는 false로 초기화 됩니다. condition1이나 condition3이 true가 되고 바로 다음봉에 false가 되버립니다. condition1이나 condition3의 초기화를 할 조건을 만드신 후에 특정조건이 만족할때 초기화가 되게 작성하셔야 합니다. 가령 아래와 같이 작성하시면 condition3가 true가 되고 goldjisutem < goldjisutem[1] 조건을 만족하면 plot9가 출력되고 해당 봉에서 바로 false로 초기화 됩니다. 특별히 초기화되는 조건에 대한 언급이 없어 출력되고 바로 초기화되게 했습니다. 아래 내용이 아니시면 어떤 조건에 초기화가 되어야할지 조건식을 만들어서 특정조건 만족할때 초기화하게 해야 합니다 if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and h > (goldjisu+var1)+1 and cvcha > -900 then { plot8(h+0.0,"색매도"); } if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and ( countif (h >= h[40]+0.15 and goldt <goldt[40] - 0.05,20) >=20 and dayindex > 40) then { Condition1 = True; } if( Condition1 == true and cvcha > -900 ) Then { Condition3 = True; } if Condition3 == True and and goldjisutem < goldjisutem[1] then { plot9(h+0.0,"골드매도"); PlaySound("C:₩예스트레이더31₩Data₩alert.wav"); Condition1 = False; Condition3 = False; } 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 수정해주세요---------- > Condition1 = False; Condition3 = False; if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and h > (goldjisu+var1)+1 and cvcha > -900 then { plot8(h+0.0,"색매도"); } if dayindex > 10 and stime > 090000 and stime < 144500 and( c[3] < c[1] and c[1] > c ) and ( countif (h >= h[40]+0.15 and goldt <goldt[40] - 0.05,20) >=20 and dayindex > 40) then { Condition1 = True; } if( Condition1 == true and cvcha > -900 ) Then { Condition3 = True; } if Condition3 == True //and goldjisutem < goldjisutem[1] then { plot9(h+0.0,"골드매도"); PlaySound("C:₩예스트레이더31₩Data₩alert.wav"); } 중괄호 정리한다고 했습니다(나름) Condition3 == True;면 기다렸다가 goldjisutem < goldjisutem[1] 될때 plot9(h+0.0,"골드매도"); 하게해주세요 부탁드립니다