커뮤니티
부탁드립니다
2013-06-19 20:46:53
147
글번호 64524
var: n지표(0),cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if date != date[1] Then
n지표 = 0;
If dayindex > 0 Then
{
If Close[0] > Close[1] Then
n지표= n지표[1] + Volume;
Else
If Close[0] < Close[1] Then
n지표= n지표[1] - Volume;
Else
n지표= n지표[1];
}
var1 = highest(n지표,dayindex+1);
var2 = Lowest(n지표,dayindex+1);
if dayindex > 0 and count == 0 and MarketPosition == 0 Then{
if C >= dayopen+PriceScale*1 Then
buy("b1");
if C <= dayopen-PriceScale*1 Then
sell("s1");
}
1.
시뮬레이션을 돌리면
ExitLong_#1이 자꾸 나옵니다 수정부탁드립니다
답변 1
예스스탁 예스스탁 답변
2013-06-20 11:18:53
안녕하세요
예스스탁입니다.
작성된 식은 종가가 시초가보다 1틱이상 크면 매수
1틱이상 작으면 매도하는 식입니다.
선물옵션에서 buy와 sell은 반대포지션 상태에서는 스위칭이 되므로
스위칭이 될때 반대포지션에 대한 청산은 ExitLong_#1와 같이 표현되고
진입명은 지정한 이름이 표시가 됩니다.
해당 부분은 리포트에 자동으로 적혀지는 이름이라 안나오게 할수는 없고
아래와 같이 작성하시면 지정한 이름으로 청산이 표시가 됩니다.
if dayindex > 0 and count == 0 and MarketPosition == 0 Then{
if C >= dayopen+PriceScale*1 Then{
ExitShort("Sellx");
buy("b1");
}
if C <= dayopen-PriceScale*1 Then{
Exitlong("buyx");
sell("s1");
}
}
즐거운 하루되세요
> 1231241 님이 쓴 글입니다.
> 제목 : 부탁드립니다
> var: n지표(0),cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if date != date[1] Then
n지표 = 0;
If dayindex > 0 Then
{
If Close[0] > Close[1] Then
n지표= n지표[1] + Volume;
Else
If Close[0] < Close[1] Then
n지표= n지표[1] - Volume;
Else
n지표= n지표[1];
}
var1 = highest(n지표,dayindex+1);
var2 = Lowest(n지표,dayindex+1);
if dayindex > 0 and count == 0 and MarketPosition == 0 Then{
if C >= dayopen+PriceScale*1 Then
buy("b1");
if C <= dayopen-PriceScale*1 Then
sell("s1");
}
1.
시뮬레이션을 돌리면
ExitLong_#1이 자꾸 나옵니다 수정부탁드립니다
다음글
이전글