커뮤니티

아.. 도저히 감이안오네요..

프로필 이미지
도감서생
2008-10-15 20:27:52
1034
글번호 17551
답변완료
TS 로 로직을 짠것인데. 이것을 YS로 바꿀려고 하는데.. 감이안옵니다. 염치없지만 조금 힌트를 좀 주십시옹~ 아래는 TS 로직을 바꿀려 노력한 것입니다 //spring input: N(11),Strength(5),ClosePercentage(25),RangePercentage(150),EntryPercentofRange(50); Var: PivotLow(0),Length(0),ATRLengthLimit(20),MinLength(3),EnterPrice(0),PriceToExit(0),Spring(False); Condition10 = SwingLow(1,Low,Strength,Strength+1,N)<>-1 If Condition10 Then Pivotlow = Low[strength]; Length = Strength; If Length<AtrLengthLimit Then Length = Length+1 Else Spring = False; Condition1 = Low < PivotLow; Condition2 = Close > PivotLow; Condition3 = Close >= High-(Range*(ClosePercentage/100)); Condition4 = Range >= AvgTrueRange(MaxList(Length,MinLength))*RangePercentage/100; IF Condition1 AND Condition2 AND condition3 AND Condition4 Then { Spring = True; EnterPrice = Open of tomorrow + (Range*(EntryPercentofRange/100)); PriceToExit = PivotLow - 1point; } If Spring Then { Buy next bar at EnterPeice Stop; } If MarketPosition == 1 Then { Spring = False; ExitLong("Risk") next bar at PriceToExit Stop; } {Commentary(condition10, condition1,Condition2,Condition4,Newline); Commentary(Spring, EnterPrice,PricetoExit,newline);}
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2008-10-16 09:12:42

안녕하세요 예스스탁입니다. 식을 수정했습니다. input: N(11),Strength(5),ClosePercentage(25),RangePercentage(150),EntryPercentofRange(50); Var: PivotLow(0),Length(0),ATRLengthLimit(20),MinLength(3),EnterPrice(0),PriceToExit(0),Spring(False); Condition10 = SwingLow(1,Low,Strength,Strength,Strength*2+1)<>-1; If Condition10 Then { Pivotlow = Low[strength]; Length = Strength; } If Length<AtrLengthLimit Then Length = Length+1; Else Spring = False; Condition1 = Low < PivotLow; Condition2 = Close > PivotLow; Condition3 = Close >= High-(Range*(ClosePercentage/100)); Condition4 = Range >= ATR(MaxList(Length,MinLength))*RangePercentage/100; IF Condition1 AND Condition2 AND condition3 AND Condition4 Then { Spring = True; EnterPrice = NextBarOpen + (Range*(EntryPercentofRange/100)); PriceToExit = PivotLow - 1; } If Spring Then { Buy("매수",atstop,EnterPrice); } If MarketPosition == 1 Then { Spring = False; ExitLong("Risk",atstop,PriceToExit); } // {Commentary(condition10, condition1,Condition2,Condition4,Newline); // Commentary(Spring, EnterPrice,PricetoExit,newline);} 즐거운 하루되세요 > 도감서생 님이 쓴 글입니다. > 제목 : 아.. 도저히 감이안오네요.. > TS 로 로직을 짠것인데. 이것을 YS로 바꿀려고 하는데.. 감이안옵니다. 염치없지만 조금 힌트를 좀 주십시옹~ 아래는 TS 로직을 바꿀려 노력한 것입니다 //spring input: N(11),Strength(5),ClosePercentage(25),RangePercentage(150),EntryPercentofRange(50); Var: PivotLow(0),Length(0),ATRLengthLimit(20),MinLength(3),EnterPrice(0),PriceToExit(0),Spring(False); Condition10 = SwingLow(1,Low,Strength,Strength+1,N)<>-1 If Condition10 Then Pivotlow = Low[strength]; Length = Strength; If Length<AtrLengthLimit Then Length = Length+1 Else Spring = False; Condition1 = Low < PivotLow; Condition2 = Close > PivotLow; Condition3 = Close >= High-(Range*(ClosePercentage/100)); Condition4 = Range >= AvgTrueRange(MaxList(Length,MinLength))*RangePercentage/100; IF Condition1 AND Condition2 AND condition3 AND Condition4 Then { Spring = True; EnterPrice = Open of tomorrow + (Range*(EntryPercentofRange/100)); PriceToExit = PivotLow - 1point; } If Spring Then { Buy next bar at EnterPeice Stop; } If MarketPosition == 1 Then { Spring = False; ExitLong("Risk") next bar at PriceToExit Stop; } {Commentary(condition10, condition1,Condition2,Condition4,Newline); Commentary(Spring, EnterPrice,PricetoExit,newline);}