커뮤니티
질문입니다^^
2009-11-29 20:43:46
598
글번호 26378
SetStopTrailing(0.1,0.5);
setstopendofday(1500);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if MarketPosition() == 0 and count == 0 Then{
if stime >=090800 and stime <= 150000 then
Buy("b",atstop,H[1]+0.25);
}
if MarketPosition() != 0 Then{
if stime >=090800 and stime <= 150000 then
ExitLong ("청산", AtStop, highest(H,barssinceentry+1)-1.0);
if MarketPosition() == 0 and count >= 1 Then{
if stime >=090800 and stime <= 150000 then
Buy("b1",atstop,H[1]+0.3);
}
원식입니다 이걸참조로 옵션매매를 할려면
Buy("b",atstop,data2(H[1]+0.25));<---이렇게 바꾸는거 아닌가요?^^;;
이렇게 바꾸어서 해봤는데 SetStopTrailing(0.1,0.5); <---이거때문에 청산이 꼬이는거 같아요 방법이 없을까요?^^;
답변 1
예스스탁 예스스탁 답변
2009-11-30 11:30:04
안녕하세요
예스스탁입니다.
참조차트의 식으로 변경하실 경우
모두 onclose타입으로 변경하셔야 합니다.
실시간의 시세를 감시하는 강제청산이나
atstop,atlimit은 주종목에 관한 내용으로
Buy("b",atstop,data2(H[1]+0.25));
와 같이 작성하시면 주종목의 시세가 data2(H[1]+0.25)이상이면
매수한다는 내용으로 의도와는 다르게 작동하게 됩니다.
참조종목을 이용하는 식으로 변경한 내용입니다.
참고하시기 바랍니다.
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if MarketPosition() == 0 and count == 0 Then{
if stime >=090800 and stime <= 150000 and
data2(H) >= data2(H[1])+0.25 then
Buy("b");
}
if MarketPosition() == 0 and count >= 1 Then{
if stime >=090800 and stime <= 150000 and
data2(H) >= data2(H[1]) +0.3 then
Buy("b1");
}
var1 = data2(c);
var3 = data2(H);
if MarketPosition() != 0 Then{
if stime >=090800 and stime <= 150000 and
data2(L) <= highest(var3,barssinceentry+1)-1.0 then
ExitLong ("청산");
}
#SetStopTrailing(0.1,0.5);
if MarketPosition == 1 then{
if highest(var3,BarsSinceEntry) > var1[BarsSinceEntry]*1.005 and
data3(L) <= highest(var3,BarsSinceEntry)-(highest(var3,BarsSinceEntry)-var1[BarsSinceEntry])*0.001 Then
exitlong();
}
setstopendofday(1500);
즐거운 하루되세요
> 반포동 님이 쓴 글입니다.
> 제목 : 질문입니다^^
> SetStopTrailing(0.1,0.5);
setstopendofday(1500);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if MarketPosition() == 0 and count == 0 Then{
if stime >=090800 and stime <= 150000 then
Buy("b",atstop,H[1]+0.25);
}
if MarketPosition() != 0 Then{
if stime >=090800 and stime <= 150000 then
ExitLong ("청산", AtStop, highest(H,barssinceentry+1)-1.0);
if MarketPosition() == 0 and count >= 1 Then{
if stime >=090800 and stime <= 150000 then
Buy("b1",atstop,H[1]+0.3);
}
원식입니다 이걸참조로 옵션매매를 할려면
Buy("b",atstop,data2(H[1]+0.25));<---이렇게 바꾸는거 아닌가요?^^;;
이렇게 바꾸어서 해봤는데 SetStopTrailing(0.1,0.5); <---이거때문에 청산이 꼬이는거 같아요 방법이 없을까요?^^;
다음글
이전글