커뮤니티

재질문드립니다..

프로필 이미지
100억원
2010-08-26 15:11:12
628
글번호 31871
답변완료
input : P(0.5),loss(1.5); if dayindex == 0 then{ if C > O Then buy("b"); if C < O Then sell("s"); } if MarketPosition == 1 Then{ if CurrentEntries < 3 Then buy("bb",atlimit,EntryPrice*((1-((P*CurrentEntries)/100)))); exitlong("bx",AtStop,EntryPrice*(1-(Loss/100))); } if MarketPosition == -1 Then{ if CurrentEntries < 3 Then Sell("ss",atlimit,EntryPrice*((1+((P*CurrentEntries)/100)))); ExitShort("sx",AtStop,EntryPrice*(1+(Loss/100))); } 위에서 처음에 진입시 1계약이었다면 재진입시에는 2계약 다시재진입시에3계약 이렇게 만들고 싶은데 어떻게 해야하죠? 부탁드립니다.. 감사합니다..
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-08-26 17:23:30

안녕하세요 예스스탁입니다. input : P(0.5),loss(1.5); if dayindex == 0 then{ if C > O Then buy("b"); if C < O Then sell("s"); } if MarketPosition == 1 Then{ var1 = 1+CurrentEntries; if CurrentEntries < 3 Then buy("bb",atlimit,EntryPrice*((1-((P*CurrentEntries)/100))),var1); exitlong("bx",AtStop,EntryPrice*(1-(Loss/100))); } if MarketPosition == -1 Then{ var2 = 1+CurrentEntries; if CurrentEntries < 3 Then Sell("ss",atlimit,EntryPrice*((1+((P*CurrentEntries)/100))),var2); ExitShort("sx",AtStop,EntryPrice*(1+(Loss/100))); } 즐거운 하루되세요 > 100억원 님이 쓴 글입니다. > 제목 : 재질문드립니다.. > input : P(0.5),loss(1.5); if dayindex == 0 then{ if C > O Then buy("b"); if C < O Then sell("s"); } if MarketPosition == 1 Then{ if CurrentEntries < 3 Then buy("bb",atlimit,EntryPrice*((1-((P*CurrentEntries)/100)))); exitlong("bx",AtStop,EntryPrice*(1-(Loss/100))); } if MarketPosition == -1 Then{ if CurrentEntries < 3 Then Sell("ss",atlimit,EntryPrice*((1+((P*CurrentEntries)/100)))); ExitShort("sx",AtStop,EntryPrice*(1+(Loss/100))); } 위에서 처음에 진입시 1계약이었다면 재진입시에는 2계약 다시재진입시에3계약 이렇게 만들고 싶은데 어떻게 해야하죠? 부탁드립니다.. 감사합니다..