커뮤니티

한번더부탁해요

프로필 이미지
큰바위얼굴
2014-04-08 18:20:12
149
글번호 74255
답변완료
#이평크로스식 Input : shortPeriod(1), longPeriod(76) ; Var : value(0); value = OSCP(shortPeriod, longPeriod); # 매수/매도청산 If CrossUP(value, 0) Then { Buy(); Exitshort(); } # 매도/매수청산 If CrossDown(value,0)Then { Sell(); Exitlong(); } # 추적청산 input : AtrMult(2.1), AtrPeriod(20); var : AtrVal(0), posHigh(0), posLow(0); # ATR 추적청산 ATRVal = ATR(AtrPeriod) * AtrMult; PosHigh = Highest(H,BarssinceEntry+1); PosLow = Lowest(L,BarsSinceEntry+1); If MarketPosition == 1 Then sell("ATR1", AtStop, PosHigh - ATRVal); If MarketPosition == -1 Then buy("ATR2", AtStop, PosLow + ATRVal); #강제청상시간별 if stime >= 090000 and stime < 092800 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(3,PointStop); } if stime >= 090000 and stime < 095600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.2,PointStop); } if stime >= 090000 and stime < 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.0,PointStop); } if stime >= 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(1.0,PointStop); } 시간별강제청산식을위수식에적용해도 적용이안되네요 확인부탁합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-04-08 18:33:32

안녕하세요 예스스탁입니다. 시간설정이 잘못된 부분이 있었습니다. 수정한 식입니다. #이평크로스식 Input : shortPeriod(1), longPeriod(76) ; Var : value(0); value = OSCP(shortPeriod, longPeriod); # 매수/매도청산 If CrossUP(value, 0) Then { Buy(); Exitshort(); } # 매도/매수청산 If CrossDown(value,0)Then { Sell(); Exitlong(); } # 추적청산 input : AtrMult(2.1), AtrPeriod(20); var : AtrVal(0), posHigh(0), posLow(0); # ATR 추적청산 ATRVal = ATR(AtrPeriod) * AtrMult; PosHigh = Highest(H,BarssinceEntry+1); PosLow = Lowest(L,BarsSinceEntry+1); If MarketPosition == 1 Then sell("ATR1", AtStop, PosHigh - ATRVal); If MarketPosition == -1 Then buy("ATR2", AtStop, PosLow + ATRVal); #강제청상시간별 if stime >= 090000 and stime < 092800 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(3,PointStop); } if stime >= 092800 and stime < 095600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.2,PointStop); } if stime >= 095600 and stime < 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.0,PointStop); } if stime >= 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(1.0,PointStop); } 즐거운 하루되세요 > 큰바위얼굴 님이 쓴 글입니다. > 제목 : 한번더부탁해요 > #이평크로스식 Input : shortPeriod(1), longPeriod(76) ; Var : value(0); value = OSCP(shortPeriod, longPeriod); # 매수/매도청산 If CrossUP(value, 0) Then { Buy(); Exitshort(); } # 매도/매수청산 If CrossDown(value,0)Then { Sell(); Exitlong(); } # 추적청산 input : AtrMult(2.1), AtrPeriod(20); var : AtrVal(0), posHigh(0), posLow(0); # ATR 추적청산 ATRVal = ATR(AtrPeriod) * AtrMult; PosHigh = Highest(H,BarssinceEntry+1); PosLow = Lowest(L,BarsSinceEntry+1); If MarketPosition == 1 Then sell("ATR1", AtStop, PosHigh - ATRVal); If MarketPosition == -1 Then buy("ATR2", AtStop, PosLow + ATRVal); #강제청상시간별 if stime >= 090000 and stime < 092800 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(3,PointStop); } if stime >= 090000 and stime < 095600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.2,PointStop); } if stime >= 090000 and stime < 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.5,PointStop); SetStopLoss(1.0,PointStop); } if stime >= 143600 Then{ SetStopTrailing(0.4,1.0,PointStop,0); SetStopProfittarget(6.0,PointStop); SetStopLoss(1.0,PointStop); } 시간별강제청산식을위수식에적용해도 적용이안되네요 확인부탁합니다