수고많으십니다.
일전에 답변주신 로직인데요.
이걸 매도청산으로 바꿀려고 하는데, 자꾸 에러가 납니다.
매도청산 버전으로 한번 더 부탁드립니다.
var : n1(0),T(0),daypl(0);
if Bdate != Bdate[1] Then
{
n1 = NetProfit;
T = 0;
}
daypl = NetProfit-n1+PositionProfit(0);
if T < 3 then
{
진입수식
}
if MarketPosition == 1 Then
{
if T == 0 and CurrentContracts >= 4 and daypl >= 300000 Then
{
T = 1;
ExitLong("bx1",OnClose,DEF,"",CurrentContracts-3,1);
}
if T == 1 and CurrentContracts >= 3 and daypl >= 500000 Then
{
T = 2;
ExitLong("bx2",OnClose,DEF,"",CurrentContracts-1,1);
}
if T == 2 and daypl >= 700000 Then
{
T = 3;
ExitLong("bx3");
}
}
답변 1
예스스탁
예스스탁 답변
2020-11-30 13:53:35
안녕하세요
예스스탁입니다.
var : n1(0),T(0),daypl(0);
if Bdate != Bdate[1] Then
{
n1 = NetProfit;
T = 0;
}
daypl = NetProfit-n1+PositionProfit(0);
if T < 3 then
{
진입수식
}
if MarketPosition == -1 Then
{
if T == 0 and CurrentContracts >= 4 and daypl >= 300000 Then
{
T = 1;
ExitShort("sx1",OnClose,DEF,"",CurrentContracts-3,1);
}
if T == 1 and CurrentContracts >= 3 and daypl >= 500000 Then
{
T = 2;
ExitShort("sx2",OnClose,DEF,"",CurrentContracts-1,1);
}
if T == 2 and daypl >= 700000 Then
{
T = 3;
ExitShort("sx3");
}
}
즐거운 하루되세요
> 탄탄시스템 님이 쓴 글입니다.
> 제목 : 시스템문의
> 수고많으십니다.
일전에 답변주신 로직인데요.
이걸 매도청산으로 바꿀려고 하는데, 자꾸 에러가 납니다.
매도청산 버전으로 한번 더 부탁드립니다.
var : n1(0),T(0),daypl(0);
if Bdate != Bdate[1] Then
{
n1 = NetProfit;
T = 0;
}
daypl = NetProfit-n1+PositionProfit(0);
if T < 3 then
{
진입수식
}
if MarketPosition == 1 Then
{
if T == 0 and CurrentContracts >= 4 and daypl >= 300000 Then
{
T = 1;
ExitLong("bx1",OnClose,DEF,"",CurrentContracts-3,1);
}
if T == 1 and CurrentContracts >= 3 and daypl >= 500000 Then
{
T = 2;
ExitLong("bx2",OnClose,DEF,"",CurrentContracts-1,1);
}
if T == 2 and daypl >= 700000 Then
{
T = 3;
ExitLong("bx3");
}
}