커뮤니티

시스탬 재수정 요청

프로필 이미지
대두
2011-08-08 21:36:18
655
글번호 41759
답변완료
Inputs: StartTme(120000), R66(False), R50(True), R33(True); Variables: NewHigh(0), NewLow(0), NewHighTime(0), NewLowTime(0), Price66(0), Price50(0), Price33(0), NoTradesToday(True), MP(0), LExitPrice(0), SExitPrice(0); #{New Session Reset} If Date <> Date[1] Then Begin NewHigh= High; NewLow = Low; NewHighTime = TimeToMinutes(sTime); NewLowTime = TimeToMinutes(sTime); NoTradesToday = True; End; MP = MarketPosition; Condition1 = TimeToMinutes(sTime) > TimeToMinutes(StartTme); If MP == 1 OR MP ==-1 Then NoTradesToday = False; If Condition1 == False Then Begin #{Highest High time and price} If High > NewHigh Then Begin NewHigh = High; NewHighTime = TimeToMinutes(Time); End; #{Lowest Low time and price} If Low < NewLow Then Begin NewLow = Low; NewLowTime = TimeToMinutes(Time); End; #{EntryPrice Setup} Price66 = NewLow + (NewHigh - NewLow) * .66; Price50 = (NewLow + NewHigh) / 2; Price33 = NewLow + (NewHigh - NewLow) * .33; End; If Condition1 AND NoTradesToday Then Begin #{Long Entry} If NewHighTime > NewLowTime Then Begin If r66 Then Buy ("L66", AtLimit, Price66); If r50 Then Buy ("L50", AtLimit, Price50); If r33 Then Buy ("L33", atlimit, Price33); End Else Begin #{Short Entry} If r66 Then Sell ("S66", AtLimit, Price66); If r50 Then Sell ("S50", atlimit, Price50); If r33 Then Sell ("S33", AtLimit, Price33); End; End; #{Long Exit} If MP == 1 Then Begin If MP[1] <> 1 Then LExitPrice = EntryPrice - Average(Range, 4) * 2; Else LExitPrice = LExitPrice + (Low - LExitPrice) / 2; ExitLong("bx",AtStop,LExitPrice); End; #{Short Exit} If MP == -1 Then Begin If MP[1] <> -1 Then SExitPrice = EntryPrice + Average(Range, 4) * 2; Else SExitPrice = SExitPrice - (SExitPrice - High) / 2; ExitShort("sx",AtStop, SExitPrice); End; 논리값이 참거짓이 와야&#46093;니다라고 창이뜨네요 어떻게 해야 하나요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-08-09 11:42:00

안녕하세요 예스스탁입니다. 시뮬레이션 차트에 외부변수가 true나 false값이 있을 경우 적용시 해당 메세지가 출력됩니다. 시뮬레이션 차트는 변수최적화가 가능하고 최적화는 숫자형만 가능하기 때문에 발생되는 메세지 입니다. 식을 수정했습니다. true는 1로 false는 0으로 입력하시게 변경했습니다. Inputs: StartTme(120000), R66(0), R50(1), R33(1); Variables: NewHigh(0), NewLow(0), NewHighTime(0), NewLowTime(0), Price66(0), Price50(0), Price33(0), NoTradesToday(True), MP(0), LExitPrice(0), SExitPrice(0); #{New Session Reset} If Date <> Date[1] Then Begin NewHigh= High; NewLow = Low; NewHighTime = TimeToMinutes(sTime); NewLowTime = TimeToMinutes(sTime); NoTradesToday = True; End; MP = MarketPosition; Condition1 = TimeToMinutes(sTime) > TimeToMinutes(StartTme); If MP == 1 OR MP ==-1 Then NoTradesToday = False; If Condition1 == False Then Begin #{Highest High time and price} If High > NewHigh Then Begin NewHigh = High; NewHighTime = TimeToMinutes(Time); End; #{Lowest Low time and price} If Low < NewLow Then Begin NewLow = Low; NewLowTime = TimeToMinutes(Time); End; #{EntryPrice Setup} Price66 = NewLow + (NewHigh - NewLow) * .66; Price50 = (NewLow + NewHigh) / 2; Price33 = NewLow + (NewHigh - NewLow) * .33; End; If Condition1 AND NoTradesToday Then Begin #{Long Entry} If NewHighTime > NewLowTime Then Begin If r66 == 1 Then Buy ("L66", AtLimit, Price66); If r50 == 1 Then Buy ("L50", AtLimit, Price50); If r33 == 1 Then Buy ("L33", atlimit, Price33); End Else Begin #{Short Entry} If r66 == 1 Then Sell ("S66", AtLimit, Price66); If r50 == 1 Then Sell ("S50", atlimit, Price50); If r33 == 1 Then Sell ("S33", AtLimit, Price33); End; End; #{Long Exit} If MP == 1 Then Begin If MP[1] <> 1 Then LExitPrice = EntryPrice - Average(Range, 4) * 2; Else LExitPrice = LExitPrice + (Low - LExitPrice) / 2; ExitLong("bx",AtStop,LExitPrice); End; #{Short Exit} If MP == -1 Then Begin If MP[1] <> -1 Then SExitPrice = EntryPrice + Average(Range, 4) * 2; Else SExitPrice = SExitPrice - (SExitPrice - High) / 2; ExitShort("sx",AtStop, SExitPrice); End; 즐거운 하루되세요 > 대두 님이 쓴 글입니다. > 제목 : 시스탬 재수정 요청 > Inputs: StartTme(120000), R66(False), R50(True), R33(True); Variables: NewHigh(0), NewLow(0), NewHighTime(0), NewLowTime(0), Price66(0), Price50(0), Price33(0), NoTradesToday(True), MP(0), LExitPrice(0), SExitPrice(0); #{New Session Reset} If Date <> Date[1] Then Begin NewHigh= High; NewLow = Low; NewHighTime = TimeToMinutes(sTime); NewLowTime = TimeToMinutes(sTime); NoTradesToday = True; End; MP = MarketPosition; Condition1 = TimeToMinutes(sTime) > TimeToMinutes(StartTme); If MP == 1 OR MP ==-1 Then NoTradesToday = False; If Condition1 == False Then Begin #{Highest High time and price} If High > NewHigh Then Begin NewHigh = High; NewHighTime = TimeToMinutes(Time); End; #{Lowest Low time and price} If Low < NewLow Then Begin NewLow = Low; NewLowTime = TimeToMinutes(Time); End; #{EntryPrice Setup} Price66 = NewLow + (NewHigh - NewLow) * .66; Price50 = (NewLow + NewHigh) / 2; Price33 = NewLow + (NewHigh - NewLow) * .33; End; If Condition1 AND NoTradesToday Then Begin #{Long Entry} If NewHighTime > NewLowTime Then Begin If r66 Then Buy ("L66", AtLimit, Price66); If r50 Then Buy ("L50", AtLimit, Price50); If r33 Then Buy ("L33", atlimit, Price33); End Else Begin #{Short Entry} If r66 Then Sell ("S66", AtLimit, Price66); If r50 Then Sell ("S50", atlimit, Price50); If r33 Then Sell ("S33", AtLimit, Price33); End; End; #{Long Exit} If MP == 1 Then Begin If MP[1] <> 1 Then LExitPrice = EntryPrice - Average(Range, 4) * 2; Else LExitPrice = LExitPrice + (Low - LExitPrice) / 2; ExitLong("bx",AtStop,LExitPrice); End; #{Short Exit} If MP == -1 Then Begin If MP[1] <> -1 Then SExitPrice = EntryPrice + Average(Range, 4) * 2; Else SExitPrice = SExitPrice - (SExitPrice - High) / 2; ExitShort("sx",AtStop, SExitPrice); End; 논리값이 참거짓이 와야&#46093;니다라고 창이뜨네요 어떻게 해야 하나요