모든 매수 매도 진입 타점에 일괄적으로 적용되는 청산 수식을 구성하고자 합니다.
시그널메이커에서 다음과 같은 수식으로 일괄청산 손절을 이용하였는데요.
예스에서도 이대로 사용이 가능한가요?
사용할 수 없다면 어떤식으로 변환해야하는지 부탁합니다.
//손절
input : stoploss_value2(20);
If CurrentContracts <> 0 Then
Begin
SetStopLoss( stoploss_value2*currentcontracts , PointStop );
End
Else
Begin
SetStopLoss( 0 );
end;
// 트레일링 스탑
input:profit_value (0);
Var : TickSize( 0 );
If CurrentContracts <> 0 Then
Begin
SetstopTrailing ( 50 * Ticksize * currentcontracts, 80 * Ticksize * currentcontracts) ;
SetstopTrailing ( 20 * Ticksize * currentcontracts, 50 * Ticksize * currentcontracts) ;
SetStopProfitTarget(profit_value * currentcontracts);
End
Else
Begin
SetStopTrailing(0,0);
SetStopProfitTarget(0);
End;
답변 1
예스스탁
예스스탁 답변
2024-08-09 11:19:58
안녕하세요
예스스탁입니다.
틱사이즈는 PriceScale로 리턴됩니다.
값을 포인트로 지정할 경우 PointStop로 지정되어야 합니다.
//손절
input : stoploss_value2(20);
If CurrentContracts <> 0 Then
Begin
SetStopLoss( stoploss_value2*currentcontracts , PointStop );
End
Else
Begin
SetStopLoss( 0 );
end;
// 트레일링 스탑
input:profit_value (0);
If CurrentContracts <> 0 Then
Begin
SetstopTrailing ( 50 * PriceScale * currentcontracts, 80 * PriceScale * currentcontracts,PointStop) ;
SetstopTrailing ( 20 * PriceScale * currentcontracts, 50 * PriceScale * currentcontracts,PointStop) ;
SetStopProfitTarget(profit_value * currentcontracts);
End
Else
Begin
SetStopTrailing(0,0);
SetStopProfitTarget(0);
End;
즐거운 하루되세요
> 하늘만큼11 님이 쓴 글입니다.
> 제목 : 수식 문의
> 모든 매수 매도 진입 타점에 일괄적으로 적용되는 청산 수식을 구성하고자 합니다.
시그널메이커에서 다음과 같은 수식으로 일괄청산 손절을 이용하였는데요.
예스에서도 이대로 사용이 가능한가요?
사용할 수 없다면 어떤식으로 변환해야하는지 부탁합니다.
//손절
input : stoploss_value2(20);
If CurrentContracts <> 0 Then
Begin
SetStopLoss( stoploss_value2*currentcontracts , PointStop );
End
Else
Begin
SetStopLoss( 0 );
end;
// 트레일링 스탑
input:profit_value (0);
Var : TickSize( 0 );
If CurrentContracts <> 0 Then
Begin
SetstopTrailing ( 50 * Ticksize * currentcontracts, 80 * Ticksize * currentcontracts) ;
SetstopTrailing ( 20 * Ticksize * currentcontracts, 50 * Ticksize * currentcontracts) ;
SetStopProfitTarget(profit_value * currentcontracts);
End
Else
Begin
SetStopTrailing(0,0);
SetStopProfitTarget(0);
End;