커뮤니티
문의드립니다.
2014-10-24 09:37:39
179
글번호 79723
condition1==true 라면 매수 신호("B1")를 냅니다. 그 신호가 제대로 맞으면.. 10분이내에 매수라면 5이평이 20이평이 골드 크로스가 됩니다. 문제는 그 이후 에 골든크로스가 데드크로스로 바뀌면(여전히 condition1==true 상태) 여기서 매도신호("B-S") 발생하도록...
condition2==false 라면 매도 신호("S1") 발생. 그 신호가 제대로 맞으면.. 10분 이내에 매도가 맞으면 5이평과 20이평이 데드크로스가 됩니다.. 그 이후 데드크로스가 골드크로스로 바뀌면(여전히 condition1==false 상태) 매수신호("S-B") 발생하도록 시스템 부탁드립니다.
var1= 5이평;
var2= 20이평;
IF 판단조건 then
condition1==true;
else
condition1==false;
IF condition1==true then
Buy("B1");
IF condition2==false then
Sell("S1");
IF condition1==true and 10분 경과 후(?) and var1 < var2 then
Sell("B-S");
IF condition1==false and 10분 경과 후(?) and var1 > var2 then
Buy("S-B");
// 10분 경과 후 또는 10개 캔들 생성 후.. 2가지 부탁드립니다.
2.상기와 같이 시스템 작성시... 시스템 상으로 제가 고려할 부분이 있을까요?
항상 매수든 매도든 포지션이 있습니다....
고려할 부분 있으면 말씀 부탁드립니다.
감사합니다.
답변 1
예스스탁 예스스탁 답변
2014-10-24 14:10:18
안녕하세요
예스스탁입니다.
var1= 5이평;
var2= 20이평;
IF 판단조건 then
condition1==true;
else
condition1==false;
IF condition1==true then
Buy("B1");
IF condition2==false then
Sell("S1");
IF MarketPosition == 1 and
IsEntryName("B1") and
condition1==true and
TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+10 and var1 < var2 then
Sell("B-S");
IF MarketPosition == -1 and
IsEntryName("S1") and
condition1==false and
TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+10 and var1 > var2 then
Buy("S-B");
B-S나 S-B가 B1이나 S1으로 진행했을때만 유효한 내용이시면
진입의 이름을 지정해 주셔야 합니다.
또한 10분 경과 후라는 조건만 추가하시면 위식과 같습니다.
다만 골든크로스가 10분이내 발생하고 이후
데드크로스도 10분 이내에 발생하면 10분이 모두 지난 후에 신호가 발생합니다.
혹은 10분 이내에 골드-데드-골드가 되면
다음 데드에서 신호가 발생하게 됩니다.
10분이내에 골든와 데드가 발생할때도 신호를 내고자 하시면
아래와 같이 작성해 주셔야 합니다.
var1= 5이평;
var2= 20이평
IF 판단조건 then
condition1==true;
else
condition1==false;
IF condition1==true then
Buy("B1");
IF condition2==false then
Sell("S1");
if MarketPosition == 1 and
IsEntryName("B1") == true and
condition1 == true and
countif(crossup(var1,var2) and TimeToMinutes(stime) < TimeToMinutes(EntryTime)+10 ,BarsSinceEntry) >= 1 and
var1 < var2 Then
Sell("B-S");
if MarketPosition == -1 and
IsEntryName("S1") == True and
Condition2 == true and
countif(CrossDown(var1,var2) and TimeToMinutes(stime) < TimeToMinutes(EntryTime)+10 ,BarsSinceEntry) >= 1 and
var1 > var2 Then
Buy("S-B");
또한가지는 위식에서 conditio1과 condition2는 골드나 데드발생시에 true이기만 하면 됩니다.
B1이나 S1으로 진입후에 conditio1과 condition2이 계속 true이었다라는 조건이시면 아래와 같이
조건을 추가해 주셔야 합니다.
var1= 5이평;
var2= 20이평
IF 판단조건 then
condition1==true;
else
condition1==false;
IF condition1==true then
Buy("B1");
IF condition2==false then
Sell("S1");
if MarketPosition == 1 and
IsEntryName("B1") == true and
countif(condition1 == false,BarsSinceEntry) == 0 and
countif(crossup(var1,var2) and TimeToMinutes(stime) < TimeToMinutes(EntryTime)+10 ,BarsSinceEntry) >= 1 and
var1 < var2 Then
Sell("B-S");
if MarketPosition == -1 and
IsEntryName("S1") == True and
countif(Condition2 == false,BarsSinceEntry) == 0 and
countif(CrossDown(var1,var2) and TimeToMinutes(stime) < TimeToMinutes(EntryTime)+10 ,BarsSinceEntry) >= 1 and
var1 > var2 Then
Buy("S-B");
즐거운 하루되세요
> hjkang철인 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> condition1==true 라면 매수 신호("B1")를 냅니다. 그 신호가 제대로 맞으면.. 10분이내에 매수라면 5이평이 20이평이 골드 크로스가 됩니다. 문제는 그 이후 에 골든크로스가 데드크로스로 바뀌면(여전히 condition1==true 상태) 여기서 매도신호("B-S") 발생하도록...
condition2==false 라면 매도 신호("S1") 발생. 그 신호가 제대로 맞으면.. 10분 이내에 매도가 맞으면 5이평과 20이평이 데드크로스가 됩니다.. 그 이후 데드크로스가 골드크로스로 바뀌면(여전히 condition1==false 상태) 매수신호("S-B") 발생하도록 시스템 부탁드립니다.
var1= 5이평;
var2= 20이평;
IF 판단조건 then
condition1==true;
else
condition1==false;
IF condition1==true then
Buy("B1");
IF condition2==false then
Sell("S1");
IF condition1==true and 10분 경과 후(?) and var1 < var2 then
Sell("B-S");
IF condition1==false and 10분 경과 후(?) and var1 > var2 then
Buy("S-B");
// 10분 경과 후 또는 10개 캔들 생성 후.. 2가지 부탁드립니다.
2.상기와 같이 시스템 작성시... 시스템 상으로 제가 고려할 부분이 있을까요?
항상 매수든 매도든 포지션이 있습니다....
고려할 부분 있으면 말씀 부탁드립니다.
감사합니다.
다음글
이전글