1.
var1 = c-o;
Var2 = AccumN(var1,7);
input : starttime(120000),endtime(60000),n(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Var2 < 0 Then
Buy();
if var2 > 0 Then
Sell();
2.
var1 = c-o;
Var2 = AccumN(var1,7);
input : starttime(120000),endtime(60000),n(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Var2 > 0 Then
Buy();
if var2 < 0 Then
Sell();
위 2가지는 서로가 반대방향의 수식어입니다.
1,2번 수식어에 각각 추가할것은 익절 60틱 손절 20틱
15분선 위에서는 buy신호후 청산 , 15분선 아래에서는 sell신호후 청산되는
수식어로 변경을 부탁드리고 2가지 수식어를 하나로 가능하다면
매수나 매도가 같은 시간대 진입및 체결이 가능한지요 ?
아니면 피라미딩설정에서 모든진입신호 허용시 매수,매도가 동일시간에 체결이
되는지 문의드립니다.
그리고 위 수식어가 매매시간과 종가청산관련 수식어가 맞는지도 궁금합니다.
답변 1
예스스탁
예스스탁 답변
2022-11-29 10:47:08
안녕하세요
예스스탁입니다.
수식에 starttime,endtime에 대한 외부변수만 있고
지정한 시간사이에만 신호가 발생하는 내용이 없었습니다.
해당 부분도 수정해 드립니다.
계좌는 양포지션을 모두 가질수 없습니다.
수식은 하나로 가능하지 않습니다.
1
input : 익절틱수(60),손절틱수(20);
input : starttime(120000),endtime(60000),n(0),P(15);
var : Tcond(False);
var1 = c-o;
Var2 = AccumN(var1,7);
Var3 = ma(C,P);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = False;
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Tcond == true Then
{
if Var2 < 0 and c > Var3 Then
Buy();
if var2 > 0 and C < Var3 Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 익절틱수(60),손절틱수(20);
input : starttime(120000),endtime(60000),n(0),P(15);
var : Tcond(False);
var1 = c-o;
Var2 = AccumN(var1,7);
Var3 = ma(c,P);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = False;
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Tcond == true Then
{
if Var2 > 0 and c < Var3 Then
Buy();
if var2 < 0 and c > Var3 Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 1.
var1 = c-o;
Var2 = AccumN(var1,7);
input : starttime(120000),endtime(60000),n(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Var2 < 0 Then
Buy();
if var2 > 0 Then
Sell();
2.
var1 = c-o;
Var2 = AccumN(var1,7);
input : starttime(120000),endtime(60000),n(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if Var2 > 0 Then
Buy();
if var2 < 0 Then
Sell();
위 2가지는 서로가 반대방향의 수식어입니다.
1,2번 수식어에 각각 추가할것은 익절 60틱 손절 20틱
15분선 위에서는 buy신호후 청산 , 15분선 아래에서는 sell신호후 청산되는
수식어로 변경을 부탁드리고 2가지 수식어를 하나로 가능하다면
매수나 매도가 같은 시간대 진입및 체결이 가능한지요 ?
아니면 피라미딩설정에서 모든진입신호 허용시 매수,매도가 동일시간에 체결이
되는지 문의드립니다.
그리고 위 수식어가 매매시간과 종가청산관련 수식어가 맞는지도 궁금합니다.