커뮤니티

함수수정 요청

프로필 이미지
통큰베팅
2015-09-24 23:34:09
127
글번호 90709
답변완료
if MarketPosition <= 0 Then buy("b",AtStop,highest(H,10)+priceScale); if MarketPosition >= 0 Then sell("s",AtStop,Lowest(L,10)-PriceScale); 1. 위 함수에서 전거래 손실시에 당거래 매매 함수를 추가하고 싶습니다. 2. 위 함수에서 전전거래와 전거래에 연속 손실시 당거래 매매 함수를 추가하고 싶습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-09-25 11:24:42

안녕하세요 예스스탁입니다. 1. if MarketPosition <= 0 Then{ if MarketPosition == 0 and (TotalTrades == 0 or PositionProfit(1) < 0) Then buy("b1",AtStop,highest(H,10)+priceScale); if MarketPosition == -1 and PositionProfit < 0 Then buy("b2",AtStop,highest(H,10)+priceScale); } if MarketPosition >= 0 Then{ if MarketPosition == 0 and (TotalTrades == 0 or PositionProfit(1) <= 0) Then sell("s1",AtStop,Lowest(L,10)-PriceScale); if MarketPosition == 1 and PositionProfit(1) < 0 Then sell("s2",AtStop,Lowest(L,10)-PriceScale); } 2. if MarketPosition <= 0 Then{ if MarketPosition == 0 and (TotalTrades == 0 or (PositionProfit(1) < 0 and PositionProfit(1) < 0)) Then buy("b1",AtStop,highest(H,10)+priceScale); if MarketPosition == -1 and PositionProfit < 0 and PositionProfit(1) < 0 Then buy("b2",AtStop,highest(H,10)+priceScale); } if MarketPosition >= 0 Then{ if MarketPosition == 0 and (TotalTrades == 0 or (PositionProfit(1) <= 0 and PositionProfit(2) < 0)) Then sell("s1",AtStop,Lowest(L,10)-PriceScale); if MarketPosition == 1 and PositionProfit(1) < 0 and PositionProfit(1) < 0 Then sell("s2",AtStop,Lowest(L,10)-PriceScale); } 즐거운 한가위 되시기 바랍니다. > 통큰베팅 님이 쓴 글입니다. > 제목 : 함수수정 요청 > if MarketPosition <= 0 Then buy("b",AtStop,highest(H,10)+priceScale); if MarketPosition >= 0 Then sell("s",AtStop,Lowest(L,10)-PriceScale); 1. 위 함수에서 전거래 손실시에 당거래 매매 함수를 추가하고 싶습니다. 2. 위 함수에서 전전거래와 전거래에 연속 손실시 당거래 매매 함수를 추가하고 싶습니다.