커뮤니티

문의

프로필 이미지
높이
2011-06-27 20:03:49
578
글번호 40223
답변완료
복합함수가 구성되어 있고 각 함수에는 여러가지 조건으로 청산식으로 구성된경우 매수/매도 한사이클이 지나고 나면 다시 그함수가 동일조건이 되어도 안나타나는 경우가 있는데 청산조건명마다 condition 함수등이 추가해야 하는지요? 정확히 설명과 이유를 표현하기 힘든데요, 비슷한 예제등으로 설명 부탁드립니다 if 조건1 then buy("b"); if entryname("b") then { if 조건2 then exitlong("s2"); if 조건3 then exitlong("s3"); if 조건4 then exitlong("s4"); if 조건5 then exitlong("s5");} if 조건a then buy("q"); if entryname("q") then { if 조건22 then exitlong("s22"); if 조건33 then exitlong("s33"); if 조건44 then exitlong("s44"); if 조건55 then exitlong("s55"); condition55=true;} if marketposition==0 then condition55=false; if 조건a then{ if 조건2 then buy("q"); condition1=true;} if condition1==true then { if 조건22 then exitlong("s22"); if 조건33 then exitlong("s33"); if 조건44 then exitlong("s44"); if 조건55 then exitlong("s55");} if marketposition==0 then condition1=false;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-06-28 09:42:22

안녕하세요 예스스탁입니다. 작성하신 내용으로 보면 청산식에 진입명칭을 가져오는 함수를 사용하셨으므로 따로 condition 변수는 필요가 없습니다. 다만 entryname함수는 entryname == "b"와 같이 사용하셔야 합니다. 함수안에 직접 이름을 지정하고자 하시면 isentryname함수를 이용하셔야 합니다. 단지 진입명에 따라 청산이시면 아래와 같이만 작성하시면 됩니다. if 조건1 then buy("b"); if entryname("b") then { if 조건2 then exitlong("s2"); if 조건3 then exitlong("s3"); if 조건4 then exitlong("s4"); if 조건5 then exitlong("s5");} b라는 진입이 들어갔을 경우만 발동하게 되고 피라미딩이 아닌경우에는 위와 같이만 작성하시면 됩니다. 만약 피라미딩이라면 식에따라 아래와 같이 지정해 주셔야 할 경우도 발생하게 됩니다. if 조건a then{ if 조건2 then buy("q"); condition1=true;} if condition1==true then { if 조건22 then exitlong("s22"); if 조건33 then exitlong("s33"); if 조건44 then exitlong("s44"); if 조건55 then exitlong("s55");} if marketposition==0 then condition1=false; 즐거운 하루되세요 > 높이 님이 쓴 글입니다. > 제목 : 문의 > 복합함수가 구성되어 있고 각 함수에는 여러가지 조건으로 청산식으로 구성된경우 매수/매도 한사이클이 지나고 나면 다시 그함수가 동일조건이 되어도 안나타나는 경우가 있는데 청산조건명마다 condition 함수등이 추가해야 하는지요? 정확히 설명과 이유를 표현하기 힘든데요, 비슷한 예제등으로 설명 부탁드립니다 if 조건1 then buy("b"); if entryname("b") then { if 조건2 then exitlong("s2"); if 조건3 then exitlong("s3"); if 조건4 then exitlong("s4"); if 조건5 then exitlong("s5");} if 조건a then buy("q"); if entryname("q") then { if 조건22 then exitlong("s22"); if 조건33 then exitlong("s33"); if 조건44 then exitlong("s44"); if 조건55 then exitlong("s55"); condition55=true;} if marketposition==0 then condition55=false; if 조건a then{ if 조건2 then buy("q"); condition1=true;} if condition1==true then { if 조건22 then exitlong("s22"); if 조건33 then exitlong("s33"); if 조건44 then exitlong("s44"); if 조건55 then exitlong("s55");} if marketposition==0 then condition1=false;