답변완료
수식어 부탁드립니다
input : StartTime(080000),EndTime(055000);
Input : 당일수익틱수(1000);
var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0);
var : Tcond(false);
Var : N1(0),dayPl(0),당일수익(0),Xcond(false);
if sDate != sDate[1] then
SetStopEndofday(Endtime);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
Xcond = false;
N1 = NetProfit;
SetStopEndofday(0);
}
당일수익 = PriceScale*당일수익틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if IsExitName("dbp",1) == true or IsExitName("dsp",1) == true then
Xcond = true;
}
전환선 = (highest(H,9)+lowest(L,9))/2;
기준선 = (highest(H,26)+lowest(L,26))/2;
선행스팬1 = (전환선[25]+기준선[25])/2;
선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2;
var1 = Disparity(20);
if Tcond == true and xcond == False Then
{
if 전환선 > 기준선 and crossup(전환선,선행스팬1) and var1 >= 99 Then
buy("b");
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
if 전환선 < 기준선 and CrossDown(전환선,선행스팬2) and var1 >= 99 Then
exitlong();
}
if 전환선 < 기준선 and CrossDown(전환선,선행스팬1) and var1 <= 101 Then
sell("s");
if MarketPosition == -1 then
{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
if 전환선 > 기준선 and CrossUp(전환선,선행스팬2) and var1 <= 101 Then
ExitShort();
}
}
------------------------
상기 수식어 에서
5선 240선 골든크로스후 1차 sell신호는 buy 신호로 전환후 5선 240선 데드크로스에 청산
5선 240선 데드크로스후 1차 buy 신호는 sell 신호로 전환후 5선 240선 골든 크로스에 청산의
수식어를 추가하고자 합니다
2021-04-18
736
글번호 148136
시스템
답변완료
수식어 부탁드립니다
Inputs: Length(9), StdDev(2), Bars(2);
Variables: BBTop(0),BBBot(0);
BBTop = BollBandup(Length, StdDev);
BBBot = BollBanddown(Length, StdDev);
If CountIF(Close < BBBot, Bars) == Bars Then
Buy("BBtop", AtStop, BBBot);
If CountIF(Close > BBTop, Bars) == Bars Then
Sell("BBbot", AtStop, BBTop);
-------------------
볼린저밴드 기본 수식어 입니다
그래프에서
120선 위 BBBot 신호시 BBTop 전환후 120선 아래 BBTop신호시 청산하는 수식어를 추가 하고자 합니다
그 반대의 수식어도 같이 부탁드립니다.
2021-04-18
653
글번호 148135
시스템
답변완료
틱차트에서 n분 동안의 봉 갯수
안녕하세요,
틱차트에서 n분동안 봉갯수 출력하는 수식을 게시판 검색해서 적용해봤는데,
종합차트에 적용하려고 보니 봉 갯수가 최대 10000개까지 표기되는데,
당일 오전 9시가 10000봉 이전에 발생할 경우에 지표가 출력되지 않습니다.
장 시작 후 틱 발생갯수가 10000개가 넘어갈 경우에 어떻게 해야하는지,
코인에 적용할땐 장시작/종료 구분이 없는데, 날짜와 상관없이 출력이 가능한 수식 부탁드립니다.
input : ntime(5);
var : S1(0),D1(0),TM(0),TF(0),idx(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
idx = 0;
}
idx = idx+1;
Plot1(idx);
}
2021-04-17
939
글번호 148133
지표
답변완료
문의 드립니다.
//EXCIA Chande Kroll Stop
study(title = "Chande Kroll Stop", shorttitle="CKS", overlay = true)
P = 9, x = 1.5, Q = 14
first_high_stop = highest(high, P) - x * atr(P)
first_low_stop = lowest(high, P) + x * atr(P)
stop_short = highest(first_high_stop, Q)
stop_long = lowest(first_low_stop, Q)
plot(stop_long, color=green)
plot(stop_short, color=red)
이 수식을 예스랭귀지로 바꿀 수 있나요? 감사합니다.
2021-04-17
973
글번호 148131
지표