커뮤니티

수식 문의

프로필 이미지
에구머니
2015-06-16 12:00:35
94
글번호 87228
답변완료
안녕하세요? 간단한 질문과 수식 문의 드립니다. 늘 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-06-16 11:42:39

안녕하세요 예스스탁입니다. 1. 예 0.0002 주시면 됩니다. 2. var :cnt(0), Lcnt(0); Lcnt = 0; if MarketPosition == 0 Then{ for cnt = 1 to 3{ if PositionProfit(cnt) < 0 Then Lcnt = Lcnt+1; } } Else{ for cnt = 0 to 2{ if PositionProfit(cnt) < 0 Then Lcnt = Lcnt+1; } } if buycond Then buy("b",OnClose,def,iff(Lcnt == 3,MaxContracts(1)*2,1)); if Sellcond Then sell("s",OnClose,def,iff(Lcnt == 3,MaxContracts(1)*2,1)); 3. input : N(3),n1(1),n2(1),TP1(1),TP2(1),SL1(1),SL2(1); var :cnt(0), Lcnt(0); Lcnt = 0; for cnt = 1 to 3{ if IsExitName("BL",cnt) == true or IsExitName("SL",cnt) == true Then Lcnt = Lcnt+1; } if MarketPosition == 0 and Buycond Then buy("b",OnClose,def,iff(Lcnt == 3,MaxContracts(1)*1,n1)); if MarketPosition == 1 Then{ if MaxEntries == 1 then{ ExitLong("BP1",atlimit,EntryPrice+TP1); buy("b2nd",atlimit,EntryPrice-SL1,n2); } if MaxEntries == 2 then{ ExitLong("BP2",atlimit,LatestEntryPrice+TP2); ExitLong("BL",AtStop,latestEntryPrice-SL2); } } if MarketPosition == 0 and Sellcond Then sell("s",OnClose,def,iff(Lcnt == 3,MaxContracts(1)*1,n1)); if MarketPosition == -1 Then{ if MaxEntries == 1 then{ ExitShort("SP1",atlimit,EntryPrice-TP1); sell("s2nd",AtStop,EntryPrice+SL1,n2); } if MaxEntries == 2 then{ ExitShort("SP2",atlimit,LatestEntryPrice-TP2); ExitShort("SL",AtStop,latestEntryPrice+SL2); } } mart는 어떤 내용을 의미하신는지 모르겠습니다. 해당 부분은 따로 처리하시기 바랍니다. 즐거운 하루되세요 > 에구머니 님이 쓴 글입니다. > 제목 : 수식 문의 > 안녕하세요? 간단한 질문과 수식 문의 드립니다. 늘 감사드립니다.