커뮤니티

iff(positionprofit(1)0,n,currentcontracts[barssi

프로필 이미지
기초부터다시
2011-04-12 18:23:42
712
글번호 37555
답변완료
/*손실이나면 그다음엔수량추가를 제가 원하는 수량을 추가할려고합니다. 1개추가,또손실나면 2개추가,이런식으로 수량을 제 마음대로 조절할려고 하는데 아래와같이 하면 될까요?*/ if totaltrades = 1 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+1); if totaltrades =2 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+2); if totaltrades =3 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+3); if totaltrades =4 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+4);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-04-13 09:20:42

안녕하세요 예스스탁입니다. buy("이름",신호타입,가격조건,수량); buy와 sell에서는 네번째 매개변수가 수량입니다. 시스템 함수를 아래와 같이 구성하시면 됩니다. 수익수량과 손실수량을 지정하시면 직전포지션 손익으로 다른 수량을 사용하실수 있습니다. buy(""bn",onclose,def,iff(positionprofit(1)>0,수익수량,손실수량); 즐거운 하루되세요 > 기초부터다시 님이 쓴 글입니다. > 제목 : iff(positionprofit(1)0,n,currentcontracts[barssi > /*손실이나면 그다음엔수량추가를 제가 원하는 수량을 추가할려고합니다. 1개추가,또손실나면 2개추가,이런식으로 수량을 제 마음대로 조절할려고 하는데 아래와같이 하면 될까요?*/ if totaltrades = 1 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+1); if totaltrades =2 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+2); if totaltrades =3 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+3); if totaltrades =4 then if entriestoday < count then buy(""bn",atstop,iff(positionprofit(1)>,수량,currentcontracts[barssinceentry(1)]+4);