커뮤니티
글번호 53050번 재질문
2017-04-27 09:06:50
190
글번호 109203
안녕하세요?
글번호 53050번 재질문입니다.
강제청산 조건
SetStopLoss(0.5,PercentStop);
SetStopProfittarget(1,PercentStop);
SetStopInactivity(1,120,PercentStop);
을
키움에서는 아래와 같이 사용하였습니다.
Var : mp(0), HH(0), LL(0);
mp = SignalPosition;
If mp = 1 Then
Begin
If mp[1] <> 1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitLong("매수손절", atstop, entryprice - entryprice * 0.005);
ExitLong("매수익절", atlimit, entryprice + entryprice * 0.005);
If BarsSinceEntry >= 120 And (HH - EntryPrice) < EntryPrice * 0.01 Then ExitLong("매수 변동미달 청산");
End;
If mp = -1 Then
Begin
If mp[1] <> -1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitShort("매도손절", atstop, entryprice + entryprice * 0.005);
ExitShort("매도익절", atlimit, entryprice - entryprice * 0.005);
If BarsSinceEntry >= 120 And (EntryPrice - LL) < EntryPrice * 0.01 Then ExitShort("매도 변동미달 청산");
End;
YT에서도 사용할 수 있도록 변환 요청드립니다.
답변 1
예스스탁 예스스탁 답변
2017-04-27 13:54:56
안녕하세요
예스스탁입니다.
Var : mp(0), HH(0), LL(0);
mp = MarketPosition;
If mp == 1 Then
Begin
If mp[1] <> 1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitLong("매수손절", atstop, entryprice - entryprice * 0.005);
ExitLong("매수익절", atlimit, entryprice + entryprice * 0.005);
If BarsSinceEntry >= 120 And (HH - EntryPrice) < EntryPrice * 0.01 Then ExitLong("매수 변동미달 청산");
End;
If mp == -1 Then
Begin
If mp[1] <> -1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitShort("매도손절", atstop, entryprice + entryprice * 0.005);
ExitShort("매도익절", atlimit, entryprice - entryprice * 0.005);
If BarsSinceEntry >= 120 And (EntryPrice - LL) < EntryPrice * 0.01 Then ExitShort("매도 변동미달 청산");
End;
즐거운 하루되세요
> 통큰베팅 님이 쓴 글입니다.
> 제목 : 글번호 53050번 재질문
> 안녕하세요?
글번호 53050번 재질문입니다.
강제청산 조건
SetStopLoss(0.5,PercentStop);
SetStopProfittarget(1,PercentStop);
SetStopInactivity(1,120,PercentStop);
을
키움에서는 아래와 같이 사용하였습니다.
Var : mp(0), HH(0), LL(0);
mp = SignalPosition;
If mp = 1 Then
Begin
If mp[1] <> 1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitLong("매수손절", atstop, entryprice - entryprice * 0.005);
ExitLong("매수익절", atlimit, entryprice + entryprice * 0.005);
If BarsSinceEntry >= 120 And (HH - EntryPrice) < EntryPrice * 0.01 Then ExitLong("매수 변동미달 청산");
End;
If mp = -1 Then
Begin
If mp[1] <> -1 Then
Begin
HH = H[1];
LL = L[1];
End;
If H > HH Then HH = H;
If L < LL Then LL = L;
ExitShort("매도손절", atstop, entryprice + entryprice * 0.005);
ExitShort("매도익절", atlimit, entryprice - entryprice * 0.005);
If BarsSinceEntry >= 120 And (EntryPrice - LL) < EntryPrice * 0.01 Then ExitShort("매도 변동미달 청산");
End;
YT에서도 사용할 수 있도록 변환 요청드립니다.