커뮤니티

문의드립니다.

프로필 이미지
숯불아줌마
2024-04-26 15:50:40
787
글번호 178972
답변완료
input : P1(20),P2(30),P3(60),P4(175),ss1(0),ss2(0); Input : Period(80), D(120); Input : RSIPeriod(20); input : 손절틱수(50); var : mav1(0),mav2(0),mav3(0),mav4(0); var : BBdown(0),BBUp(0),BandB(0),RSIV(0); mav1 = ema(c,P1); mav2 = ema(c,P2); mav3 = ema(c,P3); mav4 = ema(c,P4); BBDown = BollBandDown(Period,D); BBUp = BollBandUp(Period,D); BandB = ((C-BBDown)/(BBUp-BBDown))*100; RSIV = RSI(RSIPeriod); if BandB > 50 and crossup(BandB,rsiv) Then Buy("b",AtLimit,C-(H-L)*0.5); if BandB < 50 and crossdown(BandB,rsiv) Then Sell("s",AtLimit,C+(H-L)*0.5); if MarketPosition == 1 Then { ExitLong("bx",AtStop,C[BarsSinceEntry+1]-PriceScale*손절틱수); } if MarketPosition == -1 Then { ExitShort("sx",AtStop,C[BarsSinceEntry+1]+PriceScale*손절틱수); } 위 식에서 익절도 부탁 드립니다. (86869 문의 연계) ★그런데 익절도 똑같이 전봉(신호 발생봉) 대비 틱수로 해주세요.. 손절 반대로 하니깐 안되더라구요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-04-26 16:23:52

안녕하세요 예스스탁입니다. input : P1(20),P2(30),P3(60),P4(175),ss1(0),ss2(0); Input : Period(80), D(120); Input : RSIPeriod(20); input : 손절틱수(50),익절틱수(50); var : mav1(0),mav2(0),mav3(0),mav4(0); var : BBdown(0),BBUp(0),BandB(0),RSIV(0); mav1 = ema(c,P1); mav2 = ema(c,P2); mav3 = ema(c,P3); mav4 = ema(c,P4); BBDown = BollBandDown(Period,D); BBUp = BollBandUp(Period,D); BandB = ((C-BBDown)/(BBUp-BBDown))*100; RSIV = RSI(RSIPeriod); if BandB > 50 and crossup(BandB,rsiv) Then Buy("b",AtLimit,C-(H-L)*0.5); if BandB < 50 and crossdown(BandB,rsiv) Then Sell("s",AtLimit,C+(H-L)*0.5); if MarketPosition == 1 Then { ExitLong("BL",AtStop,C[BarsSinceEntry+1]-PriceScale*손절틱수); ExitLong("BP",AtLimit,C[BarsSinceEntry+1]+PriceScale*익절틱수); } if MarketPosition == -1 Then { ExitShort("SL",AtStop,C[BarsSinceEntry+1]+PriceScale*손절틱수); ExitShort("SP",AtLimit,C[BarsSinceEntry+1]-PriceScale*익절틱수); } 즐거운 하루되세요 > 숯불아줌마 님이 쓴 글입니다. > 제목 : 문의드립니다. > input : P1(20),P2(30),P3(60),P4(175),ss1(0),ss2(0); Input : Period(80), D(120); Input : RSIPeriod(20); input : 손절틱수(50); var : mav1(0),mav2(0),mav3(0),mav4(0); var : BBdown(0),BBUp(0),BandB(0),RSIV(0); mav1 = ema(c,P1); mav2 = ema(c,P2); mav3 = ema(c,P3); mav4 = ema(c,P4); BBDown = BollBandDown(Period,D); BBUp = BollBandUp(Period,D); BandB = ((C-BBDown)/(BBUp-BBDown))*100; RSIV = RSI(RSIPeriod); if BandB > 50 and crossup(BandB,rsiv) Then Buy("b",AtLimit,C-(H-L)*0.5); if BandB < 50 and crossdown(BandB,rsiv) Then Sell("s",AtLimit,C+(H-L)*0.5); if MarketPosition == 1 Then { ExitLong("bx",AtStop,C[BarsSinceEntry+1]-PriceScale*손절틱수); } if MarketPosition == -1 Then { ExitShort("sx",AtStop,C[BarsSinceEntry+1]+PriceScale*손절틱수); } 위 식에서 익절도 부탁 드립니다. (86869 문의 연계) ★그런데 익절도 똑같이 전봉(신호 발생봉) 대비 틱수로 해주세요.. 손절 반대로 하니깐 안되더라구요.