답변완료
(문의)키움 수식(일목균형표)을 예스트레이더로 만들어 사용
아래 키움수식으로 일목균형표를 만들어 사용하였는데, 예스트레이드에서 아래 수식으로 일목균형표를 사용하고자 합니다. 만들다가 에러만 발생하여 이렇게 문의합니다.
아라 키움수식을 예스트레이더로 만드는 방법을 알려주시면 감사합니다
기간1 20, 기간2 30, 기간3 40, Period 40, APeriod 45, 가격 이평, 이평종류 지수 D1 1, D2 2 ;
2*(BBandsUp(Period,D1)
+BBandsUp(APeriod,D2)
+BBandsDown(Period,D1)
+BBandsDown(APeriod,D2))/4-
(MA(가격, 기간2, 이평종류)+MA(가격, 기간3, 이평종류))/2
2025-01-10
721
글번호 187089
지표
답변완료
질문 요청 드립니다.
^ 좋은 주말 되십시요.
* 전일 수정 수식 입니다.
* 타주기 5분봉 좀 부탁 드림니다.
즉 1분봉 차트에서 5분봉 지그 같이 보려고 합니다.
## 이하
## 강사님 수정 본
Input : af(0.005), maxAF(0.2);
var : t(0),tl(0),tl1(0),tl2(0),tx1(0),tx2(0),color(0);
var : hh(0),hd(0),ht(0),hh1(0),tl11(0);
var : ll(0),ld(0),lt(0),ll1(0),tl22(0);
var : ar(0),ad(0),aa(0),cnt(0),br(0),bd(0),bb(0);
Array : aTL[10](0),bTL[10](0);
var1 = SAR(af,maxAF);
if CrossUp(C,var1) Then
{
T = 1;
hh = var1;
hh1 = hh[1];
hd = sDate;
ht = sTime;
if ll > 0 Then
{
tl = TL_New(ld,lt,ll,hd,ht,hh);
tl1 = TL_New(hd,ht,hh,NextBarSdate,NextBarStime,hh);
tx1 = Text_New(sDate,sTime,hh,NumToStr(hh,2)+NewLine+"+"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetStyle(tx1,2,0);
if hh1 == 0 or (hh1 > 0 and hh < hh1) Then
color = Blue;
aD = 0;
if abs(hh-ll) > PriceScale*50 Then
{
aR = Floor(abs(hh-LL)/(PriceScale*50));
aa = hh;
For cnt = 1 to ar
{
if hh+(PriceScale*50)*cnt < LL Then
{
aD = aD+1;
aTL[aD] = TL_New(LD,LT,aa+(PriceScale*50)*cnt,HD,HT,aa+(PriceScale*50)*cnt);
}
}
}
}
}
else if CrossDown(C,var1) Then
{
T = -1;
ll = var1;
ll1 = ll[1];
ld = sDate;
lt = sTime;
if hh > 0 Then
{
tl = TL_New(hd,ht,hh,ld,lt,ll);
tl2 = TL_New(ld,lt,ll,NextBarSdate,NextBarStime,ll);
tx2 = Text_New(sDate,sTime,ll,NumToStr(ll,2)+NewLine+"-"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetStyle(tx2,2,0);
if ll1 == 0 or (ll1 > 0 and ll > ll1) Then
color = Red;
bD = 0;
if abs(hh-ll) > PriceScale*50 Then
{
bR = Floor(abs(hh-LL)/(PriceScale*50));
bb = ll;
For cnt = 1 to br
{
if ll-(PriceScale*50)*cnt > HH Then
{
bD = bD+1;
bTL[bD] = TL_New(HD,HT,bb-(PriceScale*50)*cnt,LD,LT,bb-(PriceScale*50)*cnt);
}
}
}
}
}
Else
{
if t == 1 then
{
TL_SetEnd(tl,hd,ht,hh);
TL_SetBegin(tl1,hd,ht,hh);
TL_SetEnd(tl11,Sdate[1],Stime[1],hh1);
Text_SetString(tx1,NumToStr(hh,2)+NewLine+"+"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetLocation(tx1,sDate,sTime,hh);
if (hh1 > 0 and hh > hh1) Then
color = Red;
}
if t == -1 then
{
TL_SetEnd(tl,ld,lt,ll);
TL_SetBegin(tl2,ld,lt,ll);
TL_SetEnd(tl22,Sdate[1],Stime[1],ll1);
Text_SetString(tx2,NumToStr(ll,2)+NewLine+"-"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetLocation(tx2,sDate,sTime,ll);
if (ll1 > 0 and ll < ll1) Then
color = Blue;
}
}
TL_SetEnd(tl1,NextBarSdate,NextBarStime,hh);
TL_SetEnd(tl2,NextBarSdate,NextBarStime,ll);
TL_SetColor(tl,color);
if abs(HH-LL) >= PriceScale*50 Then
TL_SetSize(tl,5);
Else
TL_SetSize(tl,2);
* 좋은 주말되십시요.
2025-01-10
631
글번호 187077
지표
답변완료
수식문의 드립니다.
코인 시스템 문의 드립니다.
1.3분봉수식에 일봉조건을 추가하고 싶습니다.
1-1. 3분봉에 일봉 cci(50)>0 보다 클때
1-2. 3분봉 수식에 일봉 볼린져밴드 상단 돌파할때
1-3. 3분봉 수식에 일봉 파라볼릭이 상승추세일때
1-4. 3분봉 수식에 일봉 ma(c,120)위에 있들때
를 분봉에 추가 하는 수식 부탁드립니다.
--아래---
Input : Period1(50),Period2(9);
var : af(0.02),ADXv(0),count(0), maxAF(0.2),CCIv(0),CCIsig(0),a(0),a1(0),a2(0),a11(0),a22(0),a33(0), 전환선(0),기준선(0),선행1(0),선행2(0),선행스팬1(0),선행스팬2(0),구선행스팬1(0),구선행스팬2(0);
CCIv = CCI(Period1);
CCIsig = ema(CCIv,Period2);
ADXv = ADX(11);
a=ma(c,5);
a1=ma(c,20);
a2=ma(c,5);
a11=ma(v,5);
a22=ma(v,10);
a33=ma(v,20);
var1 = SAR(af,maxAF);
전환선 = (highest(H,9)+lowest(L,9))/2;
기준선 = (highest(H,26)+lowest(L,26))/2;
선행1 = (전환선+기준선)/2;
선행2 = (highest(H,52)+lowest(L,52))/2;
선행스팬1 = (전환선[25]+기준선[25])/2;
선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2;
구선행스팬1 = (전환선[51]+기준선[51])/2;
구선행스팬2 = (highest(H,52)[51]+lowest(L,52)[51])/2;
value1 = max(선행스팬1,선행스팬2);
value2 = min(선행스팬1,선행스팬2);
if((CrossUp(a2,선행스팬2) and 선행스팬1<선행스팬2)or (CrossUp(a2,선행스팬1) and 선행스팬1>선행스팬2)) and adxv>adxv[1] and a11>a22 and 선행1>선행2 and var1<c and c>선행1 Then
count=0;
if CrossUp(cciv,100) Then
{
count = count+1;
var1=cciv;
Var2=var1[1];
if count == 0 and dayopen()<c Then
Buy("b");
if count == 1 and dayopen()<c Then
Buy("b1");
if count == 2 and dayopen()<c Then
Buy("b2");
if count == 3 and dayopen()<c Then
Buy("b3");
}
if cciv>100 and (CrossDown(cciv,ccisig)) Then
ExitLong();
2025-01-10
578
글번호 187069
시스템
답변완료
공통부분 바탕색 표시
1,호가잔량 상승하락 바탕색 표시 수식
var :value(0), T(0,Data1),box(0),dd(0),tt(0),hh(0),ll(0);
Inputs:단기(5),중기(20);
var5 = bids-asks;#잔량차(매수호가잔량-매도호가잔량)
Var1 = ma(var5,단기)[1];
Var2 = ma(var5,중기)[1];
if CrossUp(var1,Var2) Then
{
T = 1;
dd = sDate;
tt = sTime;
HH = L;
LL = L;
box = box_new(sDate,sTime,hh,NextBarSdate,NextBarStime,ll);
Box_SetColor(box,Yellow);
Box_SetFill(box,true,50,true);
Box_SetExtFill(box,true);
}
if CrossDown(var1,Var2) Then
{
T = -1;
dd = sDate;
tt = sTime;
HH = L;
LL = L;
box = box_new(sDate,sTime,hh,NextBarSdate,NextBarStime,ll);
Box_SetColor(box,Gray);
Box_SetFill(box,true,50,true);
Box_SetExtFill(box,true);
}
if T == 1 Then
{
if H > hh Then
hh = h;
if l < ll Then
ll = l;
Box_SetBegin(box,dd,tt,hh);
Box_SetEnd(box,NextBarSdate,NextBarStime,ll);
}
if T == -1 Then
{
if H > hh Then
hh = h;
if l < ll Then
ll = l;
Box_SetBegin(box,dd,tt,hh);
Box_SetEnd(box,NextBarSdate,NextBarStime,ll);
}
2,20 이평 상승하락 바탕색 표시
input : P(20);
var : T(0),box(0),value(0),dd(0),tt(0),hh(0),ll(0);;
var1 = ma(c,P);
if var1 > var1[1] Then
T = 1;
if var1 < var1[1] Then
T = -1;
if var1>Var1[1] Then
{
T = 1;
dd = sDate;
tt = sTime;
HH = L;
LL = L;
box = box_new(sDate,sTime,hh,NextBarSdate,NextBarStime,ll);
Box_SetColor(box,Yellow);
Box_SetFill(box,true,50,true);
Box_SetExtFill(box,true);
}
if var1<Var1[1] Then
{
T = -1;
dd = sDate;
tt = sTime;
HH = L;
LL = L;
box = box_new(sDate,sTime,hh,NextBarSdate,NextBarStime,ll);
Box_SetColor(box,lightBlue);
Box_SetFill(box,true,50,true);
Box_SetExtFill(box,true);
}
if T == 1 Then
{
if H > hh Then
hh = h;
if l < ll Then
ll = l;
Box_SetBegin(box,dd,tt,hh);
Box_SetEnd(box,NextBarSdate,NextBarStime,ll);
}
if T == -1 Then
{
if H > hh Then
hh = h;
if l < ll Then
ll = l;
Box_SetBegin(box,dd,tt,hh);
Box_SetEnd(box,NextBarSdate,NextBarStime,ll);
}
3,1번과 2번 공통부분바탕색을 표시 부탁드립니다
2025-01-09
495
글번호 187068
지표
답변완료
시스템식 부탁드립니다.
안녕하세요.
항상 도움 주셔서 감사합니다.
아래 조건에 맞는 시스템식 부탁드립니다.
제가 초보입니다.
죄송하지만 주석도 같이 부탁드립니다.
종목 : 해외선물
차트 : 10분봉
요청식 1
1. 장시작 시간이 아침 8시 이지만 8시 30분 이후부터 매매를 시작하고 싶습니다.
2. 장마감 시간이 아침 7시 이지만 6시에 모든 포지션을 청산하고 싶습니다.
3. 하루에 2번 매매하는데 첫번째 매매가 수익청산 이면 매매 중단
첫번째 매매가 손실청산이면 2번까지 매매 하고 싶습니다.
4. 익일 리셋
요청식 2
1. 장시작 시간이 아침 8시 이지만 8시 30분 이후부터 매매를 시작하고 싶습니다.
2. 장마감 시간이 아침 7시 이지만 6시에 모든 포지션을 청산하고 싶습니다.
3. 하루의 2번 매매하는데 첫번째 청산이익 또는 청산손실이 40틱 이면 매매 중단
청산이익 및 청산손실이 40틱 미달하면 2번까지 매매 하고 싶습니다.
4. 익일 리셋
감사합니다.
아래 수식에서 수정 부탁드립니다.
1.
Input : 당일수익틱수(100);
input : pt(20), sl(20);
input : StartTime(83000),EndTime(060000);
var : ma10(0),ma20(0) ;
Var : N1(0),dayPl(0),당일수익(0);
var : Tcond(false),Xcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
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
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
Tcond = true;
Xcond = False;
N1 = NetProfit;
}
2.
당일수익 = 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;
}
ma10 = ma(c,10);
ma20 = ma(c,20);
if Xcond == false and Tcond == true then
{
if marketposition <= 0 then
{
if MA10 > MA20 then
buy("b",atlimit,C,1) ;
}
if marketposition >= 0 then
{
if MA10 < MA20 then
sell("s",atlimit,C,1) ;
}
}
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
setstopprofittarget(pt*pricescale,pointstop);
setstoploss(sl*pricescale,pointstop);
2025-01-09
534
글번호 187067
시스템