커뮤니티
진입 후 청산가격을 지표로 나타내고 싶습니다.
2014-03-27 21:21:09
157
글번호 73907
아래 터틀예제에서 매수신호 발생하여 진입 후
손절 설정 가격 중 하나인 entryprice*CurrentEntries-atr(len)에 해당하는
지표를 나타내는 것이 가능할까요??
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));
답변 1
예스스탁 예스스탁 답변
2014-03-28 09:59:50
안녕하세요
예스스탁입니다.
지표식에서는 시스템식의 내용으로 지표출력이 가능하지 않습니다.
또한 시스템식에서는 plot명령어 사용이 되지 않아
문의하신 내용은 가능하면 추세선함수를 이용해서 그려보는 방법뿐이 없습니다.
추세선의 특성상 봉이 완성되어야만 그려지고
가장 마지막 거래만 그려지게 됩니다.
추세선 함수는 예스트레이더4.0에만 제공되고 있습니다.
3.1버전인 우리트레이더에서는 사용할수 없습니다.
input : capital(100000000), len(20), len2(10);
var : unit(0), mp(0), TL1(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));
TL_Delete(TL1);
TL1 = TL_New(EntryDate,EntryTime,entryprice*CurrentEntries-atr(len),sdate,stime,entryprice*CurrentEntries-atr(len));
}
messagelog("%.2f",atr(len));
즐거운 하루되세요
> 훈sys 님이 쓴 글입니다.
> 제목 : 진입 후 청산가격을 지표로 나타내고 싶습니다.
> 아래 터틀예제에서 매수신호 발생하여 진입 후
손절 설정 가격 중 하나인 entryprice*CurrentEntries-atr(len)에 해당하는
지표를 나타내는 것이 가능할까요??
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));