커뮤니티
오류문제 질문 드립니다.
2018-11-15 20:17:46
177
글번호 123716
안녕하세요?
아래와 같은 수식으로 하루 한번만 매매하는 거래를 하고있습니다.
잘 되다가 오늘 매매가 안되더군요.
잘못된것이 있다면 수정부탁드리겠습니다.
감사합니다.
Input : 손절 (1), 익절 (1), 틱 (1);
var : plusF(0), isToBuy(False), isToSell(False), length(0), entryIdx(0);
var : isTodayEntered(False);
if sTime == 90000 then isTodayEntered = False;
length = c - o;
isToBuy = length == 틱 * PriceScale;
isToSell = length == -1 * 틱 * PriceScale;
if MarketPosition == 0 then {
if isToBuy and !isTodayEntered then {
Buy("수진");
isTodayEntered = True;
entryIdx = Index;
}
else if isToSell and !isTodayEntered then {
Sell("도진");
isTodayEntered = True;
entryIdx = Index;
}
}
else if MarketPosition == 1 then {
if entryIdx == Index[1] and isToSell then {
Sell("수청도역진");
}
}
else if MarketPosition == -1 then {
if entryIdx == Index[1] and isToBuy then {
Buy("도청수역진");
}
}
SetStopLoss(손절, PointStop);
SetStopProfittarget(익절, PointStop);
답변 1
예스스탁 예스스탁 답변
2018-11-16 10:36:36
안녕하세요
예스스탁입니다.
if sTime == 90000 then isTodayEntered = False;
전일은 수능일로 9시봉이 없습니다.
아래 내용으로 변경하시면 됩니다
if (sdate != sdate[1] and sTime >= 90000) or
(sdate == sdate[1] and sTime >= 90000 and stime[1] < 90000) then
isTodayEntered = False;
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 오류문제 질문 드립니다.
> 안녕하세요?
아래와 같은 수식으로 하루 한번만 매매하는 거래를 하고있습니다.
잘 되다가 오늘 매매가 안되더군요.
잘못된것이 있다면 수정부탁드리겠습니다.
감사합니다.
Input : 손절 (1), 익절 (1), 틱 (1);
var : plusF(0), isToBuy(False), isToSell(False), length(0), entryIdx(0);
var : isTodayEntered(False);
if sTime == 90000 then isTodayEntered = False;
length = c - o;
isToBuy = length == 틱 * PriceScale;
isToSell = length == -1 * 틱 * PriceScale;
if MarketPosition == 0 then {
if isToBuy and !isTodayEntered then {
Buy("수진");
isTodayEntered = True;
entryIdx = Index;
}
else if isToSell and !isTodayEntered then {
Sell("도진");
isTodayEntered = True;
entryIdx = Index;
}
}
else if MarketPosition == 1 then {
if entryIdx == Index[1] and isToSell then {
Sell("수청도역진");
}
}
else if MarketPosition == -1 then {
if entryIdx == Index[1] and isToBuy then {
Buy("도청수역진");
}
}
SetStopLoss(손절, PointStop);
SetStopProfittarget(익절, PointStop);
다음글
이전글