예스스탁
예스스탁 답변
2024-01-23 14:18:48
안녕하세요
예스스탁입니다.
틱봉은 수식에서 지정하신 시간으로 끝나는 봉이 없습니다.
지정한 시간 이후의 첫봉으로 수정해 드립니다.
if (sDate != sDate[1] and stime >= 151000) or (sDate == sDate[1] and sTime >= 151000 and sTime < 151000) Then
{
if MarketPosition == 1 Then
ExitLong("bx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if (sDate != sDate[1] and stime >= 151500) or (sDate == sDate[1] and sTime >= 151500 and sTime < 151500) Then
{
if MarketPosition == 1 Then
ExitLong("bx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if (sDate != sDate[1] and stime >= 152000) or (sDate == sDate[1] and sTime >= 152000 and sTime < 152000) Then
{
if MarketPosition == 1 Then
ExitLong("bx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if (sDate != sDate[1] and stime >= 152500) or (sDate == sDate[1] and sTime >= 152500 and sTime < 152500) Then
{
if MarketPosition == 1 Then
ExitLong("bx4",AtMarket);
if MarketPosition == -1 Then
ExitShort("sx4",AtMarket);
}
즐거운 하루되세요
> huhboo99 님이 쓴 글입니다.
> 제목 : 분할 엑시트
> 안녕하세요,
아래의 수식이 분봉에서는 작동하는데 틱(10또는 20)챠트에서 작동하지 않는데 부탁드립니다.
if stime == 151000 Then
{
if MarketPosition == 1 Then
ExitLong("bx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx1",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 151500 Then
{
if MarketPosition == 1 Then
ExitLong("bx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx2",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 152000 Then
{
if MarketPosition == 1 Then
ExitLong("bx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
if MarketPosition == -1 Then
ExitShort("sx3",AtMarket,def,"",Floor(MaxContracts*0.25),1);
}
if stime == 152500 Then
{
if MarketPosition == 1 Then
ExitLong("bx4",AtMarket);
if MarketPosition == -1 Then
ExitShort("sx4",AtMarket);
}