커뮤니티
문의 드립니다
2013-03-19 13:52:53
197
글번호 60900
감사합니다.
답변 1
예스스탁 예스스탁 답변
2013-03-19 11:46:37
안녕하세요
예스스탁입니다.
input :a1(1),B1(1),B2(1),B3(1),B4(1),c1(1),c2(2);
if ExitDate(1) != sdate and MarketPosition == 0 and 조건A Then{
buy();
sell();
}
if ExitDate(1) == sdate and MarketPosition == 0 and 조건B Then{
buy();
sell();
}
if MarketPosition == 1 Then{
if CurrentContracts != CurrentContracts[1] Then{
var1 = H;
var2 = L;
}
if H > var1 Then
var1 = H;
if L < var2 Then
var2 = L;
if stime < 143000 Then{
if CurrentContracts == 1 Then
buy("b2",AtStop,var2+B1);
if CurrentContracts == 2 Then
buy("b3",AtStop,var2+B2);
if CurrentContracts == 3 Then
buy("b4",AtStop,var2+B3);
if CurrentContracts == 4 Then
buy("b5",AtStop,var2+B4);
}
if CurrentContracts == 1 Then
exitlong("bx1",AtStop,var1-a1);
if CurrentContracts >= 2 Then{
if CurrentContracts == MaxContracts and
countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then
exitlong("bx21",AtStop,var1-c1,"",1,1);
if CurrentContracts < MaxContracts Then
exitlong("bx22",AtStop,var1-c2);
}
}
if MarketPosition == 1 Then{
if CurrentContracts != CurrentContracts[1] Then{
var3 = H;
var4 = L;
}
if H > var3 Then
var3 = H;
if L < var4 Then
var4 = L;
if stime < 143000 Then{
if CurrentContracts == 1 Then
Sell("s2",AtStop,var3-B1);
if CurrentContracts == 2 Then
Sell("s3",AtStop,var3-B2);
if CurrentContracts == 3 Then
Sell("s4",AtStop,var3-B3);
if CurrentContracts == 4 Then
Sell("s5",AtStop,var3-B4);
}
if CurrentContracts == 1 Then
ExitShort("sx1",AtStop,var4+a1);
if CurrentContracts >= 2 Then{
if CurrentContracts == MaxContracts and
countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then
ExitShort("sx21",AtStop,var4+c1,"",1,1);
if CurrentContracts < MaxContracts Then
ExitShort("sx22",AtStop,var4+c2);
}
}
즐거운 하루되세요
> 에구머니 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 감사합니다.
다음글
이전글