커뮤니티

질문

프로필 이미지
이주엽
2017-11-02 15:23:34
161
글번호 113840
답변완료
좋은 답변 감사드립니다. 아래수식은 추세매매수식인데 이것을 진입후 0.5pt수익이며는 청산하는 수식으로 변형부탁드립니다. 재 진입은 반대포지션진입조건이 뜨며는 진입합니다. 여기서 0.5pt는 변수처리 부탁드립니다.감사합니다. 1. var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and H < var1+PriceScale*1) Then buy("b",AtStop,var1+PriceScale*1); } SetStopLoss(PriceScale*5,PointStop); 2 var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and L > var1-PriceScale*1) Then sell("s",AtStop,var1-PriceScale*1); } SetStopLoss(PriceScale*5,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-11-02 16:00:43

안녕하세요 예스스탁입니다. 1. var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and MarketPosition == 0 and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and H < var1+PriceScale*1) Then{ if ExitDate(1) != sdate then buy("b1",AtStop,var1+PriceScale*1); if ExitDate(1) == sdate and countif(L <= var1-PriceScale*2,BarsSinceExit(1)) >= 1 then buy("b2",AtStop,var1+PriceScale*1); } } SetStopProfittarget(PriceScale*5,PointStop); 2 var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and MarketPosition == 0 and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and L > var1-PriceScale*1) Then{ if ExitDate(1) != sdate then sell("s1",AtStop,var1-PriceScale*1); if ExitDate(1) == sdate and countif(H >= var1+PriceScale*2,BarsSinceExit(1)) >= 1 then sell("s2",AtStop,var1-PriceScale*1); } } SetStopProfittarget(PriceScale*5,PointStop); 즐거운 하루되세요 > 이주엽 님이 쓴 글입니다. > 제목 : 질문 > 좋은 답변 감사드립니다. 아래수식은 추세매매수식인데 이것을 진입후 0.5pt수익이며는 청산하는 수식으로 변형부탁드립니다. 재 진입은 반대포지션진입조건이 뜨며는 진입합니다. 여기서 0.5pt는 변수처리 부탁드립니다.감사합니다. 1. var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and H < var1+PriceScale*1) Then buy("b",AtStop,var1+PriceScale*1); } SetStopLoss(PriceScale*5,PointStop); 2 var : Xcnt(0); if bdate != bdate[1] Then Xcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then Xcnt = Xcnt+1; var1 = (DayHigh+daylow)/2; if NextBarSdate == sdate and Xcnt < 3 Then { if Bdate != Bdate[1] or (Bdate == Bdate[1] and L > var1-PriceScale*1) Then sell("s",AtStop,var1-PriceScale*1); } SetStopLoss(PriceScale*5,PointStop);