예스스탁
예스스탁 답변
2021-08-17 08:59:07
안녕하세요
예스스탁입니다.
input : 시간1(91000),시간2(121000),시간3(151000);
input : 금액1(50000),금액2(50000),금액3(50000);
if DayOfWeek(sDate) == 2 or DayOfWeek(sdae) == 5 Then
{
if sTime == 시간1 Then
Buy("b1",OnClose,DEF,Floor(금액1/C));
if sTime == 시간2 Then
Buy("b2",OnClose,DEF,Floor(금액1/C));
if sTime == 시간3 Then
Buy("b3",OnClose,DEF,Floor(금액1/C));
}
if MarketPosition == 1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
Condition1 = False;
Condition2 = False;
}
if CurrentContracts < CurrentContracts[1] Then
{
if LatestExitName(0) == "bx1" Then
Condition1 = true;
}
if Condition1 == False Then
ExitLong("bx1",AtLimit,AvgEntryPrice*1.05,"",Floor(MaxContracts*0.5),1);
Else
{
if C < AvgEntryPrice Then
Condition1 = true;
if Condition1 == true Then
ExitLong("bx2",AtLimit,AvgEntryPrice*1.05);
}
ExitLong("bx3",AtLimit,AvgEntryPrice*1.10);
}
Else
{
Condition1 = False;
Condition2 = False;
}
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 기존 수식에 화요일 과 금요일에 매수하는 조건을 변경 부탁드림니다.
>
국내 주식 수식식인데
너무 매수가 많이 되어 화요일 과 금요일에만 매수 진행하는 식으로 변경하고 싶어서요
아래수식에 반영 부탁드릴께요~~
input : 시간1(91000),시간2(121000),시간3(151000);
input : 금액1(50000),금액2(50000),금액3(50000);
if sTime == 시간1 Then
Buy("b1",OnClose,DEF,Floor(금액1/C));
if sTime == 시간2 Then
Buy("b2",OnClose,DEF,Floor(금액1/C));
if sTime == 시간3 Then
Buy("b3",OnClose,DEF,Floor(금액1/C));
if MarketPosition == 1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
Condition1 = False;
Condition2 = False;
}
if CurrentContracts < CurrentContracts[1] Then
{
if LatestExitName(0) == "bx1" Then
Condition1 = true;
}
if Condition1 == False Then
ExitLong("bx1",AtLimit,AvgEntryPrice*1.05,"",Floor(MaxContracts*0.5),1);
Else
{
if C < AvgEntryPrice Then
Condition1 = true;
if Condition1 == true Then
ExitLong("bx2",AtLimit,AvgEntryPrice*1.05);
}
ExitLong("bx3",AtLimit,AvgEntryPrice*1.10);
}
Else
{
Condition1 = False;
Condition2 = False;
}