커뮤니티

수식 좀 변경해 주십시요.

프로필 이미지
쌀사비팔
2010-02-04 08:57:34
634
글번호 27863
답변완료
수식 변경 부탁드립니다. *첫 매수부터 추가 매수를 포함하여, 평균 5% 상승시 수익 청산하는 식인데요... -다른 것은 모두 같고, 최초 매수 후 수익 청산을 10% 상승시로 바꿔 주십시오. 즉, 최초 매수후 추가 매수 없는 상태(20% 하락하지 않은 상태)에서는 10% 상승시 매수 청산이고, 최초 매수후 20%이상 하락하여, 추가매수가 된 상태에서는 매수가 평균 5% 수익시 청산. 감사합니다. input : 전일날짜(20100114); if stime == 150000 and MarketPosition == 0 and sdate == 전일날짜 Then buy("b1",AtMarket); if MarketPosition == 1 Then{ if CurrentEntries == 1 Then buy("b2",atlimit,EntryPrice*0.8); if CurrentEntries == 2 Then buy("b3",atlimit,EntryPrice*0.6); if CurrentEntries == 3 Then buy("b4",atlimit,EntryPrice*0.4); if CurrentEntries == 4 Then buy("b5",atlimit,EntryPrice*0.2); exitlong("bx",atlimit,AvgEntryPrice*1.05); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-02-04 13:20:09

안녕하세요 예스스탁입니다. input : 전일날짜(20100114); if stime == 150000 and MarketPosition == 0 and sdate == 전일날짜 Then buy("b1",AtMarket); if MarketPosition == 1 Then{ if CurrentEntries == 1 Then buy("b2",atlimit,EntryPrice*0.8); if CurrentEntries == 2 Then buy("b3",atlimit,EntryPrice*0.6); if CurrentEntries == 3 Then buy("b4",atlimit,EntryPrice*0.4); if CurrentEntries == 4 Then buy("b5",atlimit,EntryPrice*0.2); if CurrentEntries == 1 Then exitlong("bx1",atlimit,EntryPrice*1.1); Else exitlong("bx2",atlimit,AvgEntryPrice*1.05); } 즐거운 하루되세요 > 쌀사비팔 님이 쓴 글입니다. > 제목 : 수식 좀 변경해 주십시요. > 수식 변경 부탁드립니다. *첫 매수부터 추가 매수를 포함하여, 평균 5% 상승시 수익 청산하는 식인데요... -다른 것은 모두 같고, 최초 매수 후 수익 청산을 10% 상승시로 바꿔 주십시오. 즉, 최초 매수후 추가 매수 없는 상태(20% 하락하지 않은 상태)에서는 10% 상승시 매수 청산이고, 최초 매수후 20%이상 하락하여, 추가매수가 된 상태에서는 매수가 평균 5% 수익시 청산. 감사합니다. input : 전일날짜(20100114); if stime == 150000 and MarketPosition == 0 and sdate == 전일날짜 Then buy("b1",AtMarket); if MarketPosition == 1 Then{ if CurrentEntries == 1 Then buy("b2",atlimit,EntryPrice*0.8); if CurrentEntries == 2 Then buy("b3",atlimit,EntryPrice*0.6); if CurrentEntries == 3 Then buy("b4",atlimit,EntryPrice*0.4); if CurrentEntries == 4 Then buy("b5",atlimit,EntryPrice*0.2); exitlong("bx",atlimit,AvgEntryPrice*1.05); }