아래시스탬에서 추적청산 시점에서
매도신호로 나오게 가능한지요
input : baseTime(000000);
var : HH(H), LL(L), OO(L), HH1(0), LL1(0);
if stime == baseTime or (stime[1] < basetime and stime >= basetime) or
(sdate <> sdate[1] and stime >= baseTime) then {
HH = H;
LL = L;
OO = O;
HH1 = HH[1];
LL1 = LL[1];
Condition1 = true;
}
if H >= HH then
HH = H;
if L <= LL then
LL = L;
if Condition1 == true then {
if MarketPosition == 0 and C < OO+(HH1-LL1)*0.5 then {
buy("돌파매수", atstop, OO+(HH1-LL1)*0.5);
}
}
if MarketPosition == 1 then {
exitlong("추적청산", atstop, highest(H, BarsSinceEntry+1)-(HH1-LL1)*0.5);
exitlong("목표청산", atlimit, OO+(HH1-LL1)*2);
}
답변 1
예스스탁
예스스탁 답변
2019-12-10 14:06:13
안녕하세요
예스스탁입니다.
추적청산을 조건만족시에 매도로 스위칭하게 작성해 드립니다.
input : baseTime(000000);
var : HH(H), LL(L), OO(L), HH1(0), LL1(0);
if stime == baseTime or (stime[1] < basetime and stime >= basetime) or
(sdate <> sdate[1] and stime >= baseTime) then {
HH = H;
LL = L;
OO = O;
HH1 = HH[1];
LL1 = LL[1];
Condition1 = true;
}
if H >= HH then
HH = H;
if L <= LL then
LL = L;
if Condition1 == true then
{
if MarketPosition == 0 and C < OO+(HH1-LL1)*0.5 then {
buy("돌파매수", atstop, OO+(HH1-LL1)*0.5);
}
}
if MarketPosition == 1 then {
sell("추적청산", atstop, highest(H, BarsSinceEntry+1)-(HH1-LL1)*0.5);
exitlong("목표청산", atlimit, OO+(HH1-LL1)*2);
}
즐거운 하루되세요
> 야크 님이 쓴 글입니다.
> 제목 : 시스탬
> 아래시스탬에서 추적청산 시점에서
매도신호로 나오게 가능한지요
input : baseTime(000000);
var : HH(H), LL(L), OO(L), HH1(0), LL1(0);
if stime == baseTime or (stime[1] < basetime and stime >= basetime) or
(sdate <> sdate[1] and stime >= baseTime) then {
HH = H;
LL = L;
OO = O;
HH1 = HH[1];
LL1 = LL[1];
Condition1 = true;
}
if H >= HH then
HH = H;
if L <= LL then
LL = L;
if Condition1 == true then {
if MarketPosition == 0 and C < OO+(HH1-LL1)*0.5 then {
buy("돌파매수", atstop, OO+(HH1-LL1)*0.5);
}
}
if MarketPosition == 1 then {
exitlong("추적청산", atstop, highest(H, BarsSinceEntry+1)-(HH1-LL1)*0.5);
exitlong("목표청산", atlimit, OO+(HH1-LL1)*2);
}