예스스탁
예스스탁 답변
2022-12-26 11:38:24
안녕하세요
예스스탁입니다.
1
abs(C-EntryPrice) <= PriceScale*20
청산식에 위 조건을 추가하시면 되지만
현재식에 위 내용을 추가하는 것은 의미가 없습니다.
현재 올리신 식에 청산과 반대진입이 동일 조건입니다.
각 진입함수는 발동하면 반대포지션을 청산하고 자기 진입에 들어가게 되므로
청산식에만 위 조건을 추가해도 동일조건의 반대진입들이 발동하면서 청산하기에
해당 내용을 추가해도 효과가 없습니다.
2
진입전 50개봉의 평균몸통길이의 16%라는 의미입니다.
즉 종가에 50개봉 평균몸통길이의 16%를 +- 해서 매수나 매도 기준값으로 사용하는 식입니다.
3
수식에서 하나의 buy,sell은 한봉에 한번만 동작합니다.
한봉에 여러번 진입하게 작성하시려면 올려주신 수식과 같이
총 55번을 이름을 달리해서 나열해 작성하셔야 합니다.
현재 사용하시는 주기에서 여러번 진입청산을 감지해서 해당 내용을 구현하는 것은 불가능합니다.
해당 수식적으로 가능하지 않으므로 저희가 추가로 답변드릴수 없습니다.
4
수식에 StartTime,EndTime으로 시간을 지정하게 되어 있습니다.
시간값만 아래와 같이 변경하시면 됩니다.
input : StartTime(101000),EndTime(153000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(220000),EndTime(40000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
-----------------------------
1.
위 내용이 청산 가능한 수식어인지 궁금하네요.
절대값 abs함수를 넣으면 진입후 20틱내 청산금지의
수식어가 가능하다고 말씀하셨길래 자료를 찾아봐도 아래 내용 뿐입니다.
수정 편집이 가능한지 문의 드립니다.
plot1(data2(abs(C))+data3(abs(c)));
abs(K-Y)
K와 Y가 가중이평선이시면
var : K(0),Y(0);
K = wma(c,5);
Y = wma(C,20);
plot1(abs(K-Y));
2.
Inputs: VtyPercent(0.16),ATRperiod(50);
위 수식어의 해석이 "진입전 캔들 50봉의 상하단 16% 에서 진입신호"가
맞는지 문의 드립니다.
3.
위 첫번째 수식어는 진입신호의 방향성을 인지하기 위해 익절,손절을 넣지않았는데
손실 20틱일때 청산후 반대 포지션으로 진입하며 그 횟수는 55회로 한정하는
수식어를 부탁드립니다.
예전에 작성하신 수식어는 신호가 1회만 나오는듯해서 다시금 문의 드립니다.
-----------------------------------
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
위수식어의 매매시간을 항생매매시간인 10시10분부터 당일 15시 30분까지로
변경을 부탁드립니다.
많은 도움 감사 드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의 드립니다
> 안녕하세요
예스스탁입니다.
1
abs(C-EntryPrice) <= PriceScale*20
청산식에 위 조건을 추가하시면 되지만
현재식에 위 내용을 추가하는 것은 의미가 없습니다.
현재 올리신 식에 청산과 반대진입이 동일 조건입니다.
각 진입함수는 발동하면 반대포지션을 청산하고 자기 진입에 들어가게 되므로
청산식에만 위 조건을 추가해도 동일조건의 반대진입들이 발동하면서 청산하기에
해당 내용을 추가해도 효과가 없습니다.
2
진입전 50개봉의 평균몸통길이의 16%라는 의미입니다.
즉 종가에 50개봉 평균몸통길이의 16%를 +- 해서 매수나 매도 기준값으로 사용하는 식입니다.
3
수식에서 하나의 buy,sell은 한봉에 한번만 동작합니다.
한봉에 여러번 진입하게 작성하시려면 올려주신 수식과 같이
총 55번을 이름을 달리해서 나열해 작성하셔야 합니다.
현재 사용하시는 주기에서 여러번 진입청산을 감지해서 해당 내용을 구현하는 것은 불가능합니다.
해당 수식적으로 가능하지 않으므로 저희가 추가로 답변드릴수 없습니다.
4
수식에 StartTime,EndTime으로 시간을 지정하게 되어 있습니다.
시간값만 아래와 같이 변경하시면 됩니다.
input : StartTime(101000),EndTime(153000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(220000),EndTime(40000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
-----------------------------
1.
위 내용이 청산 가능한 수식어인지 궁금하네요.
절대값 abs함수를 넣으면 진입후 20틱내 청산금지의
수식어가 가능하다고 말씀하셨길래 자료를 찾아봐도 아래 내용 뿐입니다.
수정 편집이 가능한지 문의 드립니다.
plot1(data2(abs(C))+data3(abs(c)));
abs(K-Y)
K와 Y가 가중이평선이시면
var : K(0),Y(0);
K = wma(c,5);
Y = wma(C,20);
plot1(abs(K-Y));
2.
Inputs: VtyPercent(0.16),ATRperiod(50);
위 수식어의 해석이 "진입전 캔들 50봉의 상하단 16% 에서 진입신호"가
맞는지 문의 드립니다.
3.
위 첫번째 수식어는 진입신호의 방향성을 인지하기 위해 익절,손절을 넣지않았는데
손실 20틱일때 청산후 반대 포지션으로 진입하며 그 횟수는 55회로 한정하는
수식어를 부탁드립니다.
예전에 작성하신 수식어는 신호가 1회만 나오는듯해서 다시금 문의 드립니다.
-----------------------------------
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
위수식어의 매매시간을 항생매매시간인 10시10분부터 당일 15시 30분까지로
변경을 부탁드립니다.
일봉설정없음
input : 익절틱수(00),손절틱수(60);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen > C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx",AtMarket);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx1",AtMarket);
if NextBarOpen < C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx1",AtMarket);
if NextBarSdate != sDate Then
{
if NextBarOpen == C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx2",AtMarket);
if NextBarOpen == C Then
{
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx2",AtMarket);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
-----------------------------
차기수식어
input:length(5),a틱(20),b틱(20),c틱(5);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),Text1(0),process(0),T(0);
Array:HH[10,2](0),LL[10,2](0);
input : StartTime(200000),EndTime(60000);
var : Tcond(false);
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);
}
}
process = 0;
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If LL[1,1] > L Then process = -1;
If HH[1,1] < H Then process = 1;
}
Else If Highest(H,length) == H and lastHiVal <> H Then process = 1;
Else If Lowest(L,length) == L and lastLoVal <> L Then process = -1;
If process == 1 Then
{
T = 1;
lastHiVal = H;
If HH[1,2] < LL[1,2] Then
{
For j = 10 DownTo 2
{
HH[j,1] = HH[j-1,1];
HH[j,2] = HH[j-1,2];
}
}
If HH[1,2] < LL[1,2] or HH[1,1] < H Then
{
HH[1,1] = H;
HH[1,2] = Index;
sBar = Index - LL[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if LL[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],LL[1,1],sDate[eBar],sTime[eBar],HH[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 1);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,2));
Text_SetStyle(Text1, 2, 1);
}
Text_SetStyle(Text1, 2, 1);
}
if MarketPosition <= 0 and
HH[2,1] >= LL[2,1]+PriceScale*a틱 and
LL[1,1] <= HH[2,1]-PriceScale*b틱 and
Tcond == true Then
Buy("b",AtStop,HH[2,1]+PriceScale*c틱);
}
If process == -1 Then
{
T = -1;
lastLoVal = L;
If LL[1,2] < HH[1,2] Then
{
For j = 10 DownTo 2
{
LL[j,1] = LL[j-1,1];
LL[j,2] = LL[j-1,2];
}
}
If LL[1,2] < HH[1,2] or LL[1,1] > L Then
{
LL[1,1] = L;
LL[1,2] = Index;
sBar = Index - HH[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if HH[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],HH[1,1],sDate[eBar],sTime[eBar],LL[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
}
if MarketPosition >= 0 and
LL[2,1] <= HH[2,1]-PriceScale*a틱 and
HH[1,1] >= LL[2,1]+PriceScale*b틱 and
Tcond == true Then
Sell("s",AtStop,LL[2,1]-PriceScale*c틱);
}
if MarketPosition == 1 and IsEntryName("b") == true Then
Sell("bs",AtStop,EntryPrice-PriceScale*15);
if MarketPosition == -1 and IsEntryName("s") == true Then
Buy("sb",AtStop,EntryPrice+PriceScale*15);
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의 드립니다
> 안녕하세요
예스스탁입니다.
1
abs(C-EntryPrice) <= PriceScale*20
청산식에 위 조건을 추가하시면 되지만
현재식에 위 내용을 추가하는 것은 의미가 없습니다.
현재 올리신 식에 청산과 반대진입이 동일 조건입니다.
각 진입함수는 발동하면 반대포지션을 청산하고 자기 진입에 들어가게 되므로
청산식에만 위 조건을 추가해도 동일조건의 반대진입들이 발동하면서 청산하기에
해당 내용을 추가해도 효과가 없습니다.
2
진입전 50개봉의 평균몸통길이의 16%라는 의미입니다.
즉 종가에 50개봉 평균몸통길이의 16%를 +- 해서 매수나 매도 기준값으로 사용하는 식입니다.
3
수식에서 하나의 buy,sell은 한봉에 한번만 동작합니다.
한봉에 여러번 진입하게 작성하시려면 올려주신 수식과 같이
총 55번을 이름을 달리해서 나열해 작성하셔야 합니다.
현재 사용하시는 주기에서 여러번 진입청산을 감지해서 해당 내용을 구현하는 것은 불가능합니다.
해당 수식적으로 가능하지 않으므로 저희가 추가로 답변드릴수 없습니다.
4
수식에 StartTime,EndTime으로 시간을 지정하게 되어 있습니다.
시간값만 아래와 같이 변경하시면 됩니다.
input : StartTime(101000),EndTime(153000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(220000),EndTime(40000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
-----------------------------
1.
위 내용이 청산 가능한 수식어인지 궁금하네요.
절대값 abs함수를 넣으면 진입후 20틱내 청산금지의
수식어가 가능하다고 말씀하셨길래 자료를 찾아봐도 아래 내용 뿐입니다.
수정 편집이 가능한지 문의 드립니다.
plot1(data2(abs(C))+data3(abs(c)));
abs(K-Y)
K와 Y가 가중이평선이시면
var : K(0),Y(0);
K = wma(c,5);
Y = wma(C,20);
plot1(abs(K-Y));
2.
Inputs: VtyPercent(0.16),ATRperiod(50);
위 수식어의 해석이 "진입전 캔들 50봉의 상하단 16% 에서 진입신호"가
맞는지 문의 드립니다.
3.
위 첫번째 수식어는 진입신호의 방향성을 인지하기 위해 익절,손절을 넣지않았는데
손실 20틱일때 청산후 반대 포지션으로 진입하며 그 횟수는 55회로 한정하는
수식어를 부탁드립니다.
예전에 작성하신 수식어는 신호가 1회만 나오는듯해서 다시금 문의 드립니다.
-----------------------------------
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
Inputs: VtyPercent(0.16),ATRperiod(50);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
위수식어의 매매시간을 항생매매시간인 10시10분부터 당일 15시 30분까지로
변경을 부탁드립니다.