커뮤니티
손절 후 진입제한에 대해 문의드립니다.
2015-07-03 15:08:49
164
글번호 87969
손절 후 봉10개가 지나고 나서 재진입하게 하려는 시스템을 만들려고 합니다.
아래와 같은 수식으로 작성을 했는데...
손절이 되고나서는 주문이 나가질 않네요..
어떻게 수정을 해야 하나요?
Input : shortPeriod(5), longPeriod(20), period(15);
Input : 거래시간1(1), 시작시간1(090000), 끝시간1(020000);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
value3 = ma(C, Period);
condition2 = IsExitName("stoploss",1);
condition3 = 거래시간1==1 and (stime>=시작시간1 or stime<끝시간1);
if condition3==true then
{
If condition2 == false
then
IF 매수조건
Then
Buy("매수진입");
Else
IF BarsSinceExit(1) >= 10 and 매수조건
Then
Buy("매수진입2");
답변 1
예스스탁 예스스탁 답변
2015-07-03 16:06:38
안녕하세요
예스스탁입니다.
수정한 식입니다.
현재 작성된 식에서서는
else가 if 매수조건 then에 연결이 됩니다.
{}로 명확히 표시하셔야 합니다.
Input : shortPeriod(5), longPeriod(20), period(15);
Input : 거래시간1(1), 시작시간1(090000), 끝시간1(020000);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
value3 = ma(C, Period);
condition2 = IsExitName("stoploss",1);
condition3 = 거래시간1==1 and (stime>=시작시간1 or stime<끝시간1);
if condition3==true then
{
If condition2 == false then{
IF 매수조건 Then
Buy("매수진입");
}
Else{
IF BarsSinceExit(1) >= 10 and 매수조건 Then
Buy("매수진입2");
}
}
즐거운 하루되세요
> 참새사냥꾼 님이 쓴 글입니다.
> 제목 : 손절 후 진입제한에 대해 문의드립니다.
> 손절 후 봉10개가 지나고 나서 재진입하게 하려는 시스템을 만들려고 합니다.
아래와 같은 수식으로 작성을 했는데...
손절이 되고나서는 주문이 나가질 않네요..
어떻게 수정을 해야 하나요?
Input : shortPeriod(5), longPeriod(20), period(15);
Input : 거래시간1(1), 시작시간1(090000), 끝시간1(020000);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
value3 = ma(C, Period);
condition2 = IsExitName("stoploss",1);
condition3 = 거래시간1==1 and (stime>=시작시간1 or stime<끝시간1);
if condition3==true then
{
If condition2 == false
then
IF 매수조건
Then
Buy("매수진입");
Else
IF BarsSinceExit(1) >= 10 and 매수조건
Then
Buy("매수진입2");