커뮤니티

setstoptrailing 관련

프로필 이미지
brucehan
2010-07-21 12:24:00
729
글번호 31040
답변완료
수고 많으십니다. 꾸벅! setstoptrailing을 코딩으로 직접 표현하여 주시면 고맙겠습니다. SetStopTrailing([drop price],[floor],[method],[trailing_method])에서 진입후 고점(저점)과 floor와의 관계를 알고 싶어서.... 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-07-21 18:36:22

안녕하세요 예스스탁입니다. 1. # SetStopTrailing(1,2,PointStop) # DropPrice = 1 # Floor = 2 # Method = PointStop # trailing_method (PointStop에서는 trailing_method 의 구분이 의미없습니다.) input : Floorv(2),dropPrice(1); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+Floorv Then exitlong("bx1",AtStop,highest(H,BarsSinceEntry)-DropPrice); } 2. #SetStopTrailing(50,10,PointStop,0) # DropPrice = 1 # Floor = 2 # Method = PercentStop # trailing_method = (0,수익금액대비) input : Floorv(10),dropPrice(50) if MarketPosition == 1 Then{ var1 = highest(H,BarsSinceEntry);#진입이후 최고가 if var1 >= EntryPrice+(1+Floorv/100) Then #진입이후 10%이상 수익이 발생하고 exitlong("bx1",AtStop,highest(H,BarsSinceEntry)-(var1-EntryPrice)*DropPrice/100);#그 수익의 50%가 감소하면 청산 } 3. # SetStopTrailing(50,10,PointStop,0) # DropPrice = 1 # Floor = 2 # Method = PercentStop # trailing_method = (1, 최고가격대비) input : Floorv(10),dropPrice(3) if MarketPosition == 1 Then{ var1 = highest(H,BarsSinceEntry);#진입이후 최고가 if var1 >= EntryPrice+(1+Floorv/100) Then #진입이후 10%이익이 발생하고 exitlong("bx1",AtStop,highest(H,BarsSinceEntry)*(1-DropPrice/100));#진입이후 최고가에서 3%하락하면 청산 } 즐거운 하루되세요 > brucehan 님이 쓴 글입니다. > 제목 : setstoptrailing 관련 > 수고 많으십니다. 꾸벅! setstoptrailing을 코딩으로 직접 표현하여 주시면 고맙겠습니다. SetStopTrailing([drop price],[floor],[method],[trailing_method])에서 진입후 고점(저점)과 floor와의 관계를 알고 싶어서.... 감사합니다.