커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-02-06 14:57:52
279
글번호 116368
답변완료
매번감사합니다. 1. 기타 코드 예스코드로 수정 부탁드립니다. 1-1 지표 inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; 1-2 시스템 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if PB crosses over -RMS then Buy next bar at Market else if PB crosses under RMS then Sell Short next bar at Market ; if UseZeroLineTarget then begin if PB crosses over 0 then Sell next bar at Market else if PB crosses under 0 then Buy to cover next bar at Market ; end ; If UseReversalStop then begin if PB crosses under -RMS then Sell next bar at Market else if PB crosses over RMS then Buy to cover next bar at Market ; end ;
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2018-02-06 15:17:55

안녕하세요 예스스탁입니다. 1. inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 Then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; } 2 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if crossup(PB,-RMS) then Buy("b",AtMarket); if CrossDown(PB,RMS) then sell("s",atMarket); if UseZeroLineTarget then begin if CrossUp(PB,0) then ExitLong("bx1",AtMarket); if CrossDown(PB,0) then ExitShort("sx1",atMarket); end ; If UseReversalStop then begin if crossup(PB,-RMS) then ExitLong("bx2",AtMarket); if CrossDown(PB,RMS) then ExitShort("sx2",AtMarket); end ; } 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 매번감사합니다. 1. 기타 코드 예스코드로 수정 부탁드립니다. 1-1 지표 inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; 1-2 시스템 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if PB crosses over -RMS then Buy next bar at Market else if PB crosses under RMS then Sell Short next bar at Market ; if UseZeroLineTarget then begin if PB crosses over 0 then Sell next bar at Market else if PB crosses under 0 then Buy to cover next bar at Market ; end ; If UseReversalStop then begin if PB crosses under -RMS then Sell next bar at Market else if PB crosses over RMS then Buy to cover next bar at Market ; end ;
프로필 이미지

잡다백수

2018-02-06 15:34:20

코딩 감사합니다. 시스템 코드는 실행해보니 아무런 결과가 없이 그냥 코드가 꺼지던데요(검증은 됩니다. 이런 증상은 또 처음이네요. 신호가 없어서 결과가 없는 게 아니라 결과 창이 안나왔습니다.) 혹시 코드가 문법은 맞지만 잘못된 코드인지요. 연결선물로 실험해봤습니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다. > 안녕하세요 예스스탁입니다. 1. inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 Then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; } 2 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if crossup(PB,-RMS) then Buy("b",AtMarket); if CrossDown(PB,RMS) then sell("s",atMarket); if UseZeroLineTarget then begin if CrossUp(PB,0) then ExitLong("bx1",AtMarket); if CrossDown(PB,0) then ExitShort("sx1",atMarket); end ; If UseReversalStop then begin if crossup(PB,-RMS) then ExitLong("bx2",AtMarket); if CrossDown(PB,RMS) then ExitShort("sx2",AtMarket); end ; } 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 매번감사합니다. 1. 기타 코드 예스코드로 수정 부탁드립니다. 1-1 지표 inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; 1-2 시스템 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if PB crosses over -RMS then Buy next bar at Market else if PB crosses under RMS then Sell Short next bar at Market ; if UseZeroLineTarget then begin if PB crosses over 0 then Sell next bar at Market else if PB crosses under 0 then Buy to cover next bar at Market ; end ; If UseReversalStop then begin if PB crosses under -RMS then Sell next bar at Market else if PB crosses over RMS then Buy to cover next bar at Market ; end ;
프로필 이미지

예스스탁 예스스탁 답변

2018-02-06 15:50:14

안녕하세요 예스스탁입니다. 코드가 꺼지신다닌 어떤 내용인지 모르겠습니다. 첨부된 그림과 같이 지표와 시스템이 적용됩니다. 시스템은 청산의 상향돌파, 하향이탈이 반대로작성된 부분이 있어 수정했습니다. inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if crossup(PB,-RMS) then Buy("b",AtMarket); if CrossDown(PB,RMS) then sell("s",atMarket); if UseZeroLineTarget then begin if CrossUp(PB,0) then ExitLong("bx1",AtMarket); if CrossDown(PB,0) then ExitShort("sx1",atMarket); end ; If UseReversalStop then begin if CrossDown(PB,-RMS) then ExitLong("bx2",AtMarket); if CrossUp(PB,RMS) then ExitShort("sx2",AtMarket); end ; } 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : Re : Re : 문의드립니다. > 코딩 감사합니다. 시스템 코드는 실행해보니 아무런 결과가 없이 그냥 코드가 꺼지던데요(검증은 됩니다. 이런 증상은 또 처음이네요. 신호가 없어서 결과가 없는 게 아니라 결과 창이 안나왔습니다.) 혹시 코드가 문법은 맞지만 잘못된 코드인지요. 연결선물로 실험해봤습니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다. > 안녕하세요 예스스탁입니다. 1. inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 Then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; } 2 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; if CurrentBar >= 1 then{ PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if crossup(PB,-RMS) then Buy("b",AtMarket); if CrossDown(PB,RMS) then sell("s",atMarket); if UseZeroLineTarget then begin if CrossUp(PB,0) then ExitLong("bx1",AtMarket); if CrossDown(PB,0) then ExitShort("sx1",atMarket); end ; If UseReversalStop then begin if crossup(PB,-RMS) then ExitLong("bx2",AtMarket); if CrossDown(PB,RMS) then ExitShort("sx2",AtMarket); end ; } 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 매번감사합니다. 1. 기타 코드 예스코드로 수정 부탁드립니다. 1-1 지표 inputs: Period1( 40 ), Period2( 60 ) ; variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; Plot1( PB, "Super PB" ) ; Plot2( 0, "Zero Line" ) ; Plot3( RMS, "+RMB" ) ; Plot7(-RMS, "-RMS" ) ; 1-2 시스템 inputs: Period1( 40 ), Period2( 60 ), UseZeroLineTarget( true ), UseReversalStop( true ); variables: a1( 0 ), a2( 0 ), PB( 0 ), count( 0 ), RMS( 0 ) ; a1 = 5 / Period1 ; a2 = 5 / Period2 ; PB = (a1 - a2) * Close + (a2*(1 - a1) - a1 * (1 - a2)) * Close[1] + ((1 - a1) + (1 - a2))*PB[1] - (1 - a1) * (1 - a2)*PB[2] ; RMS = 0; for count = 0 to 49 begin RMS = RMS + PB[count]*PB[count] ; end ; RMS = SquareRoot( RMS / 50 ) ; if PB crosses over -RMS then Buy next bar at Market else if PB crosses under RMS then Sell Short next bar at Market ; if UseZeroLineTarget then begin if PB crosses over 0 then Sell next bar at Market else if PB crosses under 0 then Buy to cover next bar at Market ; end ; If UseReversalStop then begin if PB crosses under -RMS then Sell next bar at Market else if PB crosses over RMS then Buy to cover next bar at Market ; end ;