커뮤니티
수식 검증 부탁드립니다.
2014-04-22 19:43:51
203
글번호 74606
예제를 토대로 작성 하였느데
10시 이전에만 거래되야 되는데 아무때나 거래가 됩니다.
무었이 문제인지 도움 부탁드려요
Input : shortperiod(20),longperiod(60);
var : short(0),long(0);
short = ma(c,shortperiod);
long = ma(c,longperiod);
if sTime <=100000 and c > short and short > long Then
var1 = c;
buy("buy",atlimit,var1 - 0.2);
if CrossDown (c,short) Then
ExitLong("exitlong",AtMarket);
if sTime <= 100000 and c < short and short < long Then
var2 = c;
sell("sell",AtLimit,var2 + 0.20);
if CrossUp (c,short) Then
ExitShort("ExitShort",AtMarket);
답변 1
그리움
2014-04-23 15:39:24
Input : shortperiod(20),longperiod(60);
var : short(0),long(0);
short = ma(c,shortperiod);
long = ma(c,longperiod);
if sTime <=100000 and c > short and short > long Then
{
var1 = c;
buy("buy",atlimit,var1 - 0.2);
}
if CrossDown (c,short) Then
ExitLong("exitlong",AtMarket);
if sTime <= 100000 and c < short and short < long Then
{
var2 = c;
sell("sell",AtLimit,var2 + 0.20);
}
if CrossUp (c,short) Then
ExitShort("ExitShort",AtMarket);
> HI_ca****** 님이 쓴 글입니다.
> 제목 : 수식 검증 부탁드립니다.
> 예제를 토대로 작성 하였느데
10시 이전에만 거래되야 되는데 아무때나 거래가 됩니다.
무었이 문제인지 도움 부탁드려요
Input : shortperiod(20),longperiod(60);
var : short(0),long(0);
short = ma(c,shortperiod);
long = ma(c,longperiod);
if sTime <=100000 and c > short and short > long Then
var1 = c;
buy("buy",atlimit,var1 - 0.2);
if CrossDown (c,short) Then
ExitLong("exitlong",AtMarket);
if sTime <= 100000 and c < short and short < long Then
var2 = c;
sell("sell",AtLimit,var2 + 0.20);
if CrossUp (c,short) Then
ExitShort("ExitShort",AtMarket);