커뮤니티
질문드립니다.
2017-11-18 00:37:29
135
글번호 114288
많은 도움을 주신덕에 참고해서 많이 만들어가고있습니다.
한가지 걸리는 것이있는데요.
var : 시그널(false);
시그널 = false;
if 매매조건1 then{
시그널 = true;
}
if 매매조건2 then{
시그널 = true;
}
if 매매조건3 then{
시그널 = true;
}
if 매매조건4 then{
시그널 = true;
}
if 시그널 then
buy();
이 구조에서 시그널에서 손절이 2번나면 더이상 거래하지 않는다. 라는 것이 도통 짜지질 않네요..
답변 1
예스스탁 예스스탁 답변
2017-11-20 10:31:45
안녕하세요
예스스탁입니다.
var : 시그널(false),Lcnt(0);
if Bdate != Bdate[1] Then
Lcnt = 0;
if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then
Lcnt = Lcnt+1;
시그널 = false;
if 매매조건1 then{
시그널 = true;
}
if 매매조건2 then{
시그널 = true;
}
if 매매조건3 then{
시그널 = true;
}
if 매매조건4 then{
시그널 = true;
}
if 시그널 and Lcnt < 2 then
buy();
SetStopLoss(~~~~);
즐거운 하루되세요
> stockric 님이 쓴 글입니다.
> 제목 : 질문드립니다.
> 많은 도움을 주신덕에 참고해서 많이 만들어가고있습니다.
한가지 걸리는 것이있는데요.
var : 시그널(false);
시그널 = false;
if 매매조건1 then{
시그널 = true;
}
if 매매조건2 then{
시그널 = true;
}
if 매매조건3 then{
시그널 = true;
}
if 매매조건4 then{
시그널 = true;
}
if 시그널 then
buy();
이 구조에서 시그널에서 손절이 2번나면 더이상 거래하지 않는다. 라는 것이 도통 짜지질 않네요..