커뮤니티

문의

프로필 이미지
erwe343
2014-04-09 11:24:02
175
글번호 74268
답변완료
아래식을 변형해 주세요 매수: AvgEntryPrice +1% 상승시 상승per(1), 상승투자금액1(1000000) 추가매수 AvgEntryPrice -3% 하락시 하락per(3), 하락투자금액2(2000000) 추가매수 매도: AvgEntryPrice가 +2.5%일때 Profit(2.5), 매도청산 ------------------------------------------------------------------------------ Input : 상승투자금액1(1000000), 하락투자금액2(2000000), 상승per(1), 하락per(3), Profit(2.5), 시작날짜(20100503); Var : Vol(0); if CodeCategoryEx == 11 and BasePrice > 500 Then vol = floor(int(투자금액/C)/10)*10; Else vol = Floor(투자금액/C); if MarketPosition == 0 and C > 0 and sdate >= 시작날짜 Then buy("b",OnClose,def,vol); if MarketPosition == 1 Then{ ExitLong("bx",atlimit,AvgEntryPrice*(1+Profit/100)); buy("bb",atlimit,EntryPrice*(1-(상승Per*CurrentEntries)/100),Vol); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-04-09 14:37:37

안녕하세요 예스스탁입니다. Input : 상승투자금액1(1000000), 하락투자금액2(2000000), 상승per(1), 하락per(3), Profit(2.5), 시작날짜(20100503); Var : Vol1(0),vol2(0); if CodeCategoryEx == 11 and BasePrice > 500 Then{ vol1 = floor(int(상승투자금액1/C)/10)*10; vol2 = floor(int(하락투자금액2/C)/10)*10; } Else{ vol1 = Floor(상승투자금액1/C); vol2 = Floor(하락투자금액2/C); } if MarketPosition == 0 and C > O and sdate >= 시작날짜 Then buy("b",OnClose,def,vol1); if MarketPosition == 1 Then{ ExitLong("bx",atlimit,AvgEntryPrice*(1+Profit/100)); buy("b1",atlimit,AvgEntryPrice*(1+상승Per/100),Vol1); buy("b2",atlimit,AvgEntryPrice*(1-하락Per/100),Vol2); } 즐거운 하루되세요 > erwe343 님이 쓴 글입니다. > 제목 : 문의 > 아래식을 변형해 주세요 매수: AvgEntryPrice +1% 상승시 상승per(1), 상승투자금액1(1000000) 추가매수 AvgEntryPrice -3% 하락시 하락per(3), 하락투자금액2(2000000) 추가매수 매도: AvgEntryPrice가 +2.5%일때 Profit(2.5), 매도청산 ------------------------------------------------------------------------------ Input : 상승투자금액1(1000000), 하락투자금액2(2000000), 상승per(1), 하락per(3), Profit(2.5), 시작날짜(20100503); Var : Vol(0); if CodeCategoryEx == 11 and BasePrice > 500 Then vol = floor(int(투자금액/C)/10)*10; Else vol = Floor(투자금액/C); if MarketPosition == 0 and C > 0 and sdate >= 시작날짜 Then buy("b",OnClose,def,vol); if MarketPosition == 1 Then{ ExitLong("bx",atlimit,AvgEntryPrice*(1+Profit/100)); buy("bb",atlimit,EntryPrice*(1-(상승Per*CurrentEntries)/100),Vol); }