커뮤니티

반대포지션 확인

프로필 이미지
요타
2018-10-05 13:24:46
153
글번호 122467
답변완료
* 매매시 손실이 20틱 이상이면 바로 반대 포지션 매매할수 있도록 부탁 드립니다. 즉 손실이 커지면 20틱에서 반대로 포지션 취하고 싶습니다. * Input : Period(20), Percent(0.2); var : center(0),UPline(0),DNline(0); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); VAR1 = Dnline+(UPline-Dnline)*0.9; if crossup(c,Dnline) Then Buy("매수"); if CrossDown(c,UPline) Then sell("매도"); SetStopProfittarget(PriceScale*60,PointStop); SetStopLoss(PriceScale*30,PointStop); * 고맙 습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-10-05 15:59:04

안녕하세요 예스스탁입니다. Input : Period(20), Percent(0.2); var : center(0),UPline(0),DNline(0); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); VAR1 = Dnline+(UPline-Dnline)*0.9; if crossup(c,Dnline) Then Buy("매수"); if CrossDown(c,UPline) Then sell("매도"); SetStopProfittarget(PriceScale*60,PointStop); if MarketPosition == 1 Then sell("bs",AtStop,EntryPrice-PriceScale*20); if MarketPosition == -1 Then buy("sb",AtStop,EntryPrice+PriceScale*20); 즐거운 하루되세요 > 요타 님이 쓴 글입니다. > 제목 : 반대포지션 확인 > * 매매시 손실이 20틱 이상이면 바로 반대 포지션 매매할수 있도록 부탁 드립니다. 즉 손실이 커지면 20틱에서 반대로 포지션 취하고 싶습니다. * Input : Period(20), Percent(0.2); var : center(0),UPline(0),DNline(0); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); VAR1 = Dnline+(UPline-Dnline)*0.9; if crossup(c,Dnline) Then Buy("매수"); if CrossDown(c,UPline) Then sell("매도"); SetStopProfittarget(PriceScale*60,PointStop); SetStopLoss(PriceScale*30,PointStop); * 고맙 습니다.