커뮤니티

부탁드립니다.

프로필 이미지
라떼처럼
2020-03-03 22:12:08
173
글번호 136541
답변완료
감사합니다. 당일목표수익(100) --> 당일목표손실(100) 아래식을 당일목표수익에서 멈추는 것을 당일목표손실에서 멈추는 것으로 수정부탁드립니다. if MarketPosition == 1 then { SetStopTrailing(1,익절,PointStop); if AI == True and daypl+PositionProfit(0) >= PriceScale*당일목표수익 Then { ExitLong("BB목표",atlimit,EntryPrice+((PriceScale*당일목표수익-daypl)/CurrentContracts)); } if MarketPosition == -1 Then { SetStopTrailing(1,30,PointStop); if AI == True and daypl+PositionProfit(0) >= PriceScale*당일목표수익 Then { ExitShort("SS목표",atlimit,EntryPrice-((PriceScale*당일목표수익-daypl)/CurrentContracts)); } SetStopLoss(손절,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-03-04 14:24:17

안녕하세요 예스스탁입니다. 아래와 같은 구조로 식을 작성하셔야 합니다. Input : 당일목표손실(100); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); 당일손실 = PriceScale*당일목표손실; if Bdate != Bdate[1] Then { Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl <= -당일손실 Then Xcond = true; if IsExitName("BB손실",1) == true or IsExitName("SS손실",1) == true then Xcond = true; } if Xcond == false then { if /*매수진입조건*/Then { buy("b"); } if /*매도진입조건*/Then { sell("s"); } } if MarketPosition == 1 then { SetStopTrailing(1,익절,PointStop); ExitLong("BB손실",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then { SetStopTrailing(1,30,PointStop); ExitShort("SS손실",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } SetStopLoss(손절,PointStop); 즐거운 하루되세요 > 라떼처럼 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 감사합니다. 당일목표수익(100) --> 당일목표손실(100) 아래식을 당일목표수익에서 멈추는 것을 당일목표손실에서 멈추는 것으로 수정부탁드립니다. if MarketPosition == 1 then { SetStopTrailing(1,익절,PointStop); if AI == True and daypl+PositionProfit(0) >= PriceScale*당일목표수익 Then { ExitLong("BB목표",atlimit,EntryPrice+((PriceScale*당일목표수익-daypl)/CurrentContracts)); } if MarketPosition == -1 Then { SetStopTrailing(1,30,PointStop); if AI == True and daypl+PositionProfit(0) >= PriceScale*당일목표수익 Then { ExitShort("SS목표",atlimit,EntryPrice-((PriceScale*당일목표수익-daypl)/CurrentContracts)); } SetStopLoss(손절,PointStop);