답변완료
부탁드립니다
b=if(c>O,sum(v,기간1),0);
s=if(c<O,sum(v,기간1),0);
eavg(eavg(b,기간1),기간2)
b=if(c>O,sum(v,기간1),0);
s=if(c<O,sum(v,기간1),0);
eavg(eavg(s,기간1),기간2)
사용할 수 있게 부탁드립니다 선굵기와 색깔변화도 할 수 있게 부탁드립니다
2019-12-22
224
글번호 134587
지표
답변완료
부탁드립니다
BBandsup(기간1,D1)
BBandsup(기간2,D1)
BBandsup(기간3,D1)
BBandsup(기간4,D1)
BBandsup(기간5,D1)
BBandsup(기간6,D1)
BBandsup(기간7,D1)
BBandsup(기간8,D1)
BBandsup(기간9,D1)
BBandsup(기간10,D1)
BBandsup(기간11,D1)
BBandsup(기간12,D1)
BBandsup(기간13,D1)
BBandsup(기간14,D1)
BBandsup(기간15,D1)
BBandsup(기간16,D1)
BBandsup(기간17,D1)
BBandsup(기간18,D1)
BBandsup(기간19,D1)
BBandsup(기간20,D1)
BBandsup(기간20,D1)
BBandsup(기간21,D1)
BBandsup(기간22,D1)
BBandsup(기간23,D1)
BBandsup(기간24,D1)
BBandsup(기간25,D1)
BBandsup(기간26,D1)
BBandsup(기간27,D1)
BBandsup(기간28,D1)
BBandsup(기간29,D1)
BBandsup(기간30,D1)
한선만 나오도더라고요 다 나올수있게 부탁드립니다 색깔변화와 수치 변화도 할 수 있게 부탁드립니다
2019-12-22
287
글번호 134586
지표
답변완료
피봇수식 수정부탁드립니다.
아래의 수식을 적용하였습니다.
하루 손실제한 틱수를 넘었는데도 시그널이 계속 발생을 합니다.
하루 손실제한 틱수에 도달하면 더 이상 시그널 발생이 안되도록 수정 부탁드립니다.
- 아 래 -
input : n(30);
Input : 당일누적수익틱수(600),당일누적손실틱수(200);
input : starttime(101500),endtime(180000);
vars : Tcond(false),N1(0),dayPl(0),당일누적수익(0),당일누적손실(0),Xcond(false);
Var : Pivot(0),R1(0),R2(0),S1(0),S2(0),T(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("매수청산");
if MarketPosition == -1 Then
ExitShort("매도청산");
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Xcond = false;
N1 = NetProfit;
Tcond = true;
}
당일누적수익 = PriceScale*당일누적수익틱수;
당일누적손실 = PriceScale*당일누적손실틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] and
(daypl >= 당일누적수익 or daypl <= -당일누적손실) then
Xcond = true;
if MarketPosition == 1 then{
ExitLong("매수수익",atlimit,EntryPrice+((당일누적수익-daypl)/CurrentContracts));
ExitLong("매수손실",AtStop,EntryPrice-((당일누적손실+daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("매도수익",atlimit,EntryPrice-((당일누적수익-daypl)/CurrentContracts));
ExitShort("매도손실",AtStop,EntryPrice+((당일누적손실+daypl)/CurrentContracts));
}
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
if crossup(C,R2+PriceScale*n) Then
T = 5;
if crossup(C,R1+PriceScale*n) Then
T = 4;
if crossup(C,Pivot+PriceScale*n) Then
T = 3;
if crossup(C,S1+PriceScale*n) Then
T = 2;
if crossup(C,S2+PriceScale*n) Then
T = 1;
if CrossDown(C,R2-PriceScale*n) Then
T = -5;
if CrossDown(C,R1-PriceScale*n) Then
T = -4;
if CrossDown(C,Pivot-PriceScale*n) Then
T = -3;
if CrossDown(C,S1-PriceScale*n) Then
T = -2;
if CrossDown(C,S2-PriceScale*n) Then
T = -1;
if Tcond == true then
{
if T != T[1] and
T >= 0 and T[1] <= 0 Then
Buy("매수");
if T != T[1] and
T <= 0 and T[1] >= 0 Then
Sell("매도");
}
2019-12-20
242
글번호 134582
시스템
답변완료
봉시작시간, 봉끝시간 조건문
Vars : flag1(0), flag2(0);
if flag1 == 0 and sTime == 141900 Then
{
MessageLog("봉번호:%.0f, 봉의시작시간:%.0f, 봉의끝시간:%.0f", Index, sTime, Time);
flag1 = 1;
MessageLog("봉시작시간기준");
}
if flag2 == 0 and Time == 141900 Then
{
MessageLog("봉번호:%.0f, 봉의시작시간:%.0f, 봉의끝시간:%.0f", Index, sTime, Time);
flag2 = 1;
MessageLog("봉끝시간기준");
}
=======================================================================
항상 친절한 답변 감사드립니다. ^^!
위의 식을 실행하면 첨부파일처럼 봉시작시간 기준으로 출력이 여러번 나옵니다.
한번만 출력되야 맞는거 아닌가요? 그리고 마지막봉시간 기준으로는 타이밍 잡기는 불가능한가요? 공부중에 이것저것 해보다 생각과 다른점이라 질문드립니다!
디버깅창을 보면 불규칙한 간격으로 출력이 되는데 봉완성 기준이 아니라 틱값이 변화될때 출력되는건가요?
2019-12-20
302
글번호 134578
시스템