커뮤니티

디버깅 문의

프로필 이미지
훈sys
2014-03-24 23:09:38
184
글번호 73792
답변완료
터틀예제 작성 중인데 피라미딩이 제대로 작동되지 않아 atr값을 확인해보고자 messagelog함수를 사용했습니다 하지만 디버깅창에 시간만 출력되고 디버깅 내용이 출력되지 않습니다. 잘못된 부분 수정해주시면 감사하겠습니다. input : capital(100000000), len(20), len2(10); var : unit(0), mp(0); unit=capital*0.02/atr(len); if unit<1 then unit=1; mp=MarketPosition; if mp==0 then { buy("buy",atstop,highest(h,len),unit); } if mp==1 and CurrentEntries<5 then { buy("bp",atstop,EntryPrice+atr(len)*CurrentEntries); } if mp==1 then { exitlong("ex",atstop,lowest(l,len2)); exitlong("ex_tr",atstop,entryprice*CurrentEntries-atr(len)); } messagelog("%.2",atr(len));
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-03-25 16:10:57

안녕하세요 예스스탁입니다. 메세지로그에서 숫자를 출력하실&#46468; 자리수를 지정하셔야 하며 자리수뒤에 %.2f와 같이 f(소문자)가 붙어야 합니다. 참고로 스트링은 %s라고 하시면 됩니다. input : capital(100000000), len(20), len2(10); var : unit(0), mp(0); unit = capital*0.02/atr(len); if unit<1 then unit=1; mp=MarketPosition; if mp==0 then { buy("buy",atstop,highest(h,len),unit); } if mp==1 and CurrentEntries<5 then { buy("bp",atstop,EntryPrice+atr(len)*CurrentEntries); } if mp==1 then { exitlong("ex",atstop,lowest(l,len2)); exitlong("ex_tr",atstop,entryprice*CurrentEntries-atr(len)); } messagelog("%.2f",atr(len)); 즐거운 하루되세요 > 훈sys 님이 쓴 글입니다. > 제목 : 디버깅 문의 > 터틀예제 작성 중인데 피라미딩이 제대로 작동되지 않아 atr값을 확인해보고자 messagelog함수를 사용했습니다 하지만 디버깅창에 시간만 출력되고 디버깅 내용이 출력되지 않습니다. 잘못된 부분 수정해주시면 감사하겠습니다. input : capital(100000000), len(20), len2(10); var : unit(0), mp(0); unit=capital*0.02/atr(len); if unit<1 then unit=1; mp=MarketPosition; if mp==0 then { buy("buy",atstop,highest(h,len),unit); } if mp==1 and CurrentEntries<5 then { buy("bp",atstop,EntryPrice+atr(len)*CurrentEntries); } if mp==1 then { exitlong("ex",atstop,lowest(l,len2)); exitlong("ex_tr",atstop,entryprice*CurrentEntries-atr(len)); } messagelog("%.2",atr(len));