예스스탁
예스스탁 답변
2020-07-30 16:19:56
안녕하세요
예스스탁입니다.
차트에서 지정한 시작일,시작시간이 되면 진입을 시작하는 식입니다.
다음날이 되면 9시부터 적용됩니다.
즐거운 하루되세요
> 바나 님이 쓴 글입니다.
> 제목 : 시작일 시작시간
> Input : 투자금액(8000000),Period(20), MultiD(2), N(1),시작일(20200729),시작시간(094500),청산시간(153000);
Input : loss(5),P(3),WRP(10);
var : e(0),x(0),count(0),Tcond(false),BBup(0),BBdn(0),WR(0),Vma(0);
var : HH(0),Bxcond1(false),Bxcond2(false),Bxcond3(false);
var : LL(0),Sxcond1(false),Sxcond2(false),Sxcond3(false);
Array : VV[5](0),XX[5](0);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
WR = WILLR(WRP);
Vma = ma(V,P);
vv[0] = floor((투자금액*0.1)/NextBarOpen);
vv[1] = floor((투자금액*0.1)/NextBarOpen);
vv[2] = floor((투자금액*0.2)/NextBarOpen);
vv[3] = floor((투자금액*0.2)/NextBarOpen);
vv[4] = floor((투자금액*0.4)/NextBarOpen);
if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then
Tcond = true;
if bdate != bdate[1] Then
count = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
if sdate >= 시작일 and stime >= 시작시간 Then
Tcond = true;
if Tcond == true then{
if (TotalTrades == 0 or MarketPosition == 0 and BarsSinceExit(1) > 2) then{
if MarketPosition == 0 and count < N and CrossDown(c,bbdn) and
V >= Vma[1]*2.0 Then {
buy("b1",atmarket,def,vv[MaxEntries]);
}
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] Then{
e = e +1;
if e == 1 then
XX[e] = CurrentContracts;
Else
XX[e] = CurrentContracts-CurrentContracts[1];
}
#두번째 매수
if MarketPosition == 1 and e == 1 and CrossDown(c,bbdn) and NextBarSdate == sdate and
V >= Vma[1]*2.0 Then
{
buy("b2",atmarket,def,vv[MaxEntries]);
}
#세번재매수
if MarketPosition == 1 and e == 2 and CrossDown(c,bbdn) and NextBarSdate == sdate and
V >= Vma[1]*2.0 Then
{
buy("b3",atmarket,def,vv[MaxEntries]);
}
#네번재매수
if MarketPosition == 1 and e == 3 and CrossDown(c,bbdn) and NextBarSdate == sdate and
V >= Vma[1]*2.0 Then
{
buy("b4",atmarket,def,vv[MaxEntries]);
}
#다섯번재매수
if MarketPosition == 1 and e == 4 and CrossDown(c,bbdn) and NextBarSdate == sdate and
V >= Vma[1]*2.0 Then
{
buy("b5",atmarket,def,vv[MaxEntries]);
}
HH = highest(H,BarsSinceEntry);
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx1" Then
Bxcond1 = true;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx2" Then
Bxcond2 = true;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "Bx3" Then
Bxcond3 = true;
if Bxcond1 == false and HH >= EntryPrice*1.10 and HH < EntryPrice*1.15 Then
ExitLong("Bx1",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(1/5)),1);
if Bxcond2 == false and HH >= EntryPrice*1.15 and HH < EntryPrice*1.20 Then
ExitLong("Bx2",AtStop,HH-(HH-EntryPrice)*0.1,"",Floor(MaxContracts*(2/5)),1);
}}}
-----------------
현재 설정사용중인 수식입니다. 시스템매수를 끊고 장 도중에 중간에 새로 시작하고 싶을때 시작시간을 예를들어 09:45분으로 변경해서 실행을 하면 다음날도 시스템작동 시작시간이 09:45분으로 시작되는건가요? 저는 시작일에 시작시간 09:45분이후부터 다음날에는 09:00시 시작으로 하고 싶은데 안되나요? 가능하다면 수식변경한번 부탁드립니다.