커뮤니티
종가매매 수식 수정 부탁드립니다.
2018-09-06 07:13:58
177
글번호 121818
아래의 수식에 시작일과 종료일 삽입 부탁드리구요.
종료일날 전량청산 되게 부탁드립니다.
- 아 래 -
1.
input : V1(1),X1(1);
if stime == 151000 then
{
if C > O Then
{
if MarketPosition == 0 or (MarketPosition == -1 and C > AvgEntryPrice) Then
sell("s",OnClose,def,V1);
}
if MarketPosition == -1 and C < O and C <= AvgEntryPrice*0.99 Then
ExitShort("sx",OnClose,def,"",X1,2);
}
2.
input : V1(1),X1(1);
if stime == 151000 then
{
if C < O Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < AvgEntryPrice) Then
buy("b",OnClose,def,V1);
}
if MarketPosition == 1 and C > O and C >= AvgEntryPrice*1.01 Then
ExitLong("bx",OnClose,def,"",X1,2);
}
답변 1
예스스탁 예스스탁 답변
2018-09-06 13:13:42
안녕하세요
예스스탁입니다.
1.
input : V1(1),X1(1),시작일(20180801),종료일(20180928);
if stime == 151000 and sdate >= 시작일 and sdate <= 종료일 then
{
if C > O Then
{
if MarketPosition == 0 or (MarketPosition == -1 and C > AvgEntryPrice) Then
sell("s",OnClose,def,V1);
}
if MarketPosition == -1 and C < O and C <= AvgEntryPrice*0.99 Then
ExitShort("sx",OnClose,def,"",X1,2);
if sdate == 종료일 Then
ExitShort();
}
2
input : V1(1),X1(1),시작일(20180801),종료일(20180928);
if stime == 151000 and sdate >= 시작일 and sdate <= 종료일 then
{
if C < O Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < AvgEntryPrice) Then
buy("b",OnClose,def,V1);
}
if MarketPosition == 1 and C > O and C >= AvgEntryPrice*1.01 Then
ExitLong("bx",OnClose,def,"",X1,2);
if sdate == 종료일 Then
ExitLong();
}
즐거운 하루되세요
> 승부사1 님이 쓴 글입니다.
> 제목 : 종가매매 수식 수정 부탁드립니다.
> 아래의 수식에 시작일과 종료일 삽입 부탁드리구요.
종료일날 전량청산 되게 부탁드립니다.
- 아 래 -
1.
input : V1(1),X1(1);
if stime == 151000 then
{
if C > O Then
{
if MarketPosition == 0 or (MarketPosition == -1 and C > AvgEntryPrice) Then
sell("s",OnClose,def,V1);
}
if MarketPosition == -1 and C < O and C <= AvgEntryPrice*0.99 Then
ExitShort("sx",OnClose,def,"",X1,2);
}
2.
input : V1(1),X1(1);
if stime == 151000 then
{
if C < O Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < AvgEntryPrice) Then
buy("b",OnClose,def,V1);
}
if MarketPosition == 1 and C > O and C >= AvgEntryPrice*1.01 Then
ExitLong("bx",OnClose,def,"",X1,2);
}
이전글