커뮤니티
문의
아래 수식은
국내선물 데이트레이딩 "전략A" 에 사용하는 청산수식입니다.
하나의 전략에 사용되며 5개의 청산수식입니다.
문제점 : 청산전략은 1번씩 5번만 사용되어야 하는데 반복되어 사용되는 문제가 발생됩니다.
1) ExitLong("320",Atlimit,EntryPrice+b1gl); 이런 형식은 1번씩만 사용되는 것 같은데
2) c>Lowd(0)+Lowdb1 Then
ExitLong("Lowdb1"); 이런 형식은 청산이 반복되어 다음 포지션을 잡으면 바로 또 청산되는 것을 반복합니다.
요청내용
5개의 청산전략이 한번씩만 작동되도록 수식을 수정해 주십시요
항상 고맙습니다.
********************************************************************************************************************
input : b1lock(094000),b1gl(3.2);
input : b1lock2(150000),Lowdb1(999999);
input : b2lock(120000),b2gl(14.4);
input : b2lock2(110000),Lowdb2(21);
input : b2st3(140000),b2lock3(150000),Lowdb3(16.2);
if marketposition() == 1 and IsEntryName("b1") == true and stime<b1lock Then
ExitLong("320",Atlimit,EntryPrice+b1gl);
if marketposition() == 1 and IsEntryName("b1") == true and stime<b1lock2 and
c>Lowd(0)+Lowdb1 Then
ExitLong("Lowdb1");
if marketposition() == 1 and IsEntryName("b2") == true and stime<b2lock Then
ExitLong("1440",Atlimit,EntryPrice+b2gl);
if marketposition() == 1 and IsEntryName("b2") == true and stime<b2lock2 and
c>Lowd(0)+Lowdb2 Then
ExitLong("Lowdb2");
if marketposition() == 1 and IsEntryName("b2") == true and stime>=b2st3 and stime<b2lock3 and
c>Lowd(0)+Lowdb3 Then
ExitLong("Lowdb3");
답변 1
예스스탁 예스스탁 답변
2026-01-26 10:10:19