예스스탁
예스스탁 답변
2022-05-19 10:31:28
안녕하세요
예스스탁입니다.
input : n(3),x(50);
input : Period(20);
input : StartTime(90000),EndTime(030000);
Input : 당일수익틱수(100),당일손실틱수(100);
var : bbmd(0),Tcond(false);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
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;
Xcond = false;
N1 = NetProfit;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 or daypl <= -당일손실 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or
IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then
Xcond = true;
}
bbmd = ma(c,Period);
if Tcond == true and Xcond == false Then
{
if CountIf(C>O,n) == n and
H >= L[2]+PriceScale*x and
CrossUp(C,bbmd) Then
Buy();
if CountIf(C<O,n) == n and
L <= H-PriceScale*x and
CrossDown(c,bbmd) Then
sell();
}
if MarketPosition == 1 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts));
}
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 식추가
> input : n(3),x(50);
if CountIf(C>O,n) == n and
H >= L[2]+PriceScale*x Then
Buy();
if CountIf(C<O,n) == n and
L <= H-PriceScale*x Then
sell();
안녕하세요.
수고많으십니다
위식에서 추가수식 부탁드립니다.
매수 조건추가
볼밴 중심선 위에서는 매수만 진입.
중심선 상향돌파시 첫봉에서만 진입.
매도
볼밴 중심선 아래서 매도만 진입
중심선 하향돌파시 첫봉에서만 진입.
손절 익절 1일누적 100틱
특정 시간대에서만 진입가능하도록 시간설정요망.
예) 09시 에서~익일 03시