커뮤니티

SetStopTrailing

프로필 이미지
외국인
2012-04-17 14:57:11
316
글번호 50150
답변완료
안녕하세요 같은이름으로 SetStopTrailing(0.5,1,point) 4번이익청산이되면 반대매매식을 어떻게하는지요 if 조건식 then buy(); SetStopTrailing(0.5,1,point)
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-04-17 16:42:07

안녕하세요 예스스탁입니다. 아래와 같이 각 진입에 이름을 부여하시고 해당 내용 판단하는 식을 작성해야 합니다. b1cnt는 b1으로 진입하고 SetStopTrailing으로 청산된 횟수 b2cnt는 b2으로 진입하고 SetStopTrailing으로 청산된 횟수 b3cnt는 b3으로 진입하고 SetStopTrailing으로 청산된 횟수 입니다. var : cnt(0),B1cnt(0),B2cnt(0),B3cnt(0); B1cnt = 0; B2cnt = 0; B3cnt = 0; for cnt = 1 to 30{ if ExitDate(1) == sdate then{ if IsEntryName("b1",cnt) == true and IsExitName("StopTrailing",cnt) == true Then B1cnt = B1cnt +1; if IsEntryName("b2",cnt) == true and IsExitName("StopTrailing",cnt) == true Then B2cnt = B2cnt +1; if IsEntryName("b3",cnt) == true and IsExitName("StopTrailing",cnt) == true Then B3cnt = B3cnt +1; } } if B1cnt < 4 and 조건식1 then buy("b1"); if B2cnt < 4 and 조건식2 then buy("b2"); if B3cnt < 4 and 조건식3 then buy("b3"); SetStopTrailing(0.5,1,PointStop); 즐거운 하루되세요 > 외국인 님이 쓴 글입니다. > 제목 : SetStopTrailing > 안녕하세요 같은이름으로 SetStopTrailing(0.5,1,point) 4번이익청산이되면 반대매매식을 어떻게하는지요 if 조건식 then buy(); SetStopTrailing(0.5,1,point)