답변완료
지표부탁드립니다
수고많으십니다.
볼린저밴드 상하에 기울기에 따라 색깔을 rgb 컬러로 넣을려고 만들어 봤는데 이상하게 나옵니다.
단순컬러로
Plot1(BBup, "상단",iff(t==1,red,blue));
Plot2(BBdn, "하단",iff(s==1,RED,blue));
는 이렇게 하면 원래모양이 나오는데 rgb 컬러로 붉은계통과 파랑계통을 넣을려고 이것저것 조합해보니 위아래 긴막대모양으로 나옵니다.
무엇이 문제인지 수정해주시면 고맙겠습니다.
감사합니다.
Input : Period(20), MultiD(2);
var : BBup(0),BBdn(0),t(0),s(0);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if BBup > BBup[1] Then
t = 1;
if BBup < BBup[1] Then
t = -1;
if BBdn > BBdn[1] Then
s = 1;
if BBdn < BBdn[1] Then
s = -1;
if t > t[1] then {
plot1(t,"상단",rgb(128,0,0), def, 6);
plot1(t,"상단",rgb(255,0,0), def, 4);
plot1(t,"상단",rgb(255,255,0), def, 0);
}
else
{plot1(t,"상단",rgb(0,0,255), def, 6);
plot1(t,"상단",rgb(70,130,180), def, 4);
plot1(t,"상단",rgb(0,255,255), def, 0);
}
if s > s[1] then {
plot2(s,"하단",rgb(128,0,0), def, 6);
plot2(s,"하단",rgb(255,0,0), def, 4);
plot2(s,"하단",rgb(255,255,0), def, 0);
}
else {plot2(s,"하단",rgb(0,0,255), def, 6);
plot2(s,"하단",rgb(70,130,180), def, 4);
plot2(s,"하단",rgb(0,255,255), def, 0);
}
2021-06-10
1388
글번호 149865
지표
답변완료
지표수식 전환부탁
다음 수식을 예스수식으로 전환부탁드립니다.
<1>
수식1
A=CCI(P10)<-27;
B=CCI(P10)>27;
IF(A>B,1,0)
수식2
IF(A==B,1,0)
수식3
A=CCI(P10)<-27;
B=CCI(P10)>27;
IF(A<B,1,0)
지표조건
P10 10
<2>
수식1
t1=tema(c,P5);
t2=tema(c,P10);
t1>t2
지표조건
P5 5 P10 10
<3>
수식1
a1=ma(c,p5);
a2=ma(c,p10);
if(Crossup(a1,a2),min(a1,a2,L),0)
수식2
a1=ma(c,p5);
a2=ma(c,p10);
if(Crossdown(a1,a2),max(a1,a2,H),0)
지표조건
P5 5
P10 10
<4>
수식1
max( avg(C,short), avg(C,mid), avg(C,long)) <
min( avg(C,short), avg(C,mid), avg(C,long)) * (1+Percent/100) &&
C > highest(H(1),P10) && C(1) <= highest(H(2),P10)
지표조건
P10 10 Percent 10 short 10 MID 20 LONG 60
수식2
min( avg(C,short), avg(C,mid), avg(C,long)) > max( avg(C,short), avg(C,mid), avg(C,long)) * (1-Percent/100) &&
C < lowest(L(1),P10) && C(1) <= lowest(L(2),P10)
지표조건
P10 10 Percent 10 short 10 MID 20 LONG 60
2021-06-10
1867
글번호 149858
지표
답변완료
자동시스템 타주기 조건추가
항상 감사드립니다
아래 자동추세선 시스템을 아래조건으로 수정하고 싶습니다
1.본챠트 (10틱) 신호가 매수이면 t2= 1
본챠트 (10틱) 신호가 매도이면 t2= -1
2.타주기챠트 (1분) 신호가 매수이면t3= 1
타주기챠트 (1분) 신호가 매도이면t3= -1
3.본챠트 1발생시점과 타주기챠트 2발생시점의 가격차이가 10틱이내이면 t4= 1
본챠트 1발생시점과 타주기챠트 2발생시점의 가격차이가 10틱이상이면 t4= -1
4.본챠트 1발생시점과 타주기챠트 2발생시점의 시간차이가 10분이내이면 t5= 1
본챠트 1발생시점과 타주기챠트 2발생시점의 가격차이가 10분이상이면 t5= -1
5.본챠트가 t2=1 and t3= 1 and t4=1 and t5=1 이면 매수신호(b_1) 발생
본챠트가 t2= -1 and t3= -1 and t4= 1 and t5= 1 이면 매도신호(s_1) 발생
**********************************************************************************
***가중이평 스토케스틱***
Input : Period(100), Period1(28), Period2(13);
var : fk(0),StoK(0),StoD(0);
var : t1(0);
fk = (c-lowest(L,Period))/(highest(H,Period)-lowest(L,period))*100;
StoK = wma(fk,Period1);
StoD = wma(stok,Period2);
if crossup(stok,stod) Then
t1 = 1 ;
if crossdown(stok ,stod) Then
t1 = -1;
*** 자동추세선 시스템 ***
input : 비교고저점기준(10);
var : cnt(0),BTL(0),STL(0);
Array : HH[20](0),HD[20](0),HT[20](0);
Array : LL[20](0),LD[20](0),LT[20](0);
if SwingHigh(1,H,비교고저점기준,비교고저점기준,비교고저점기준*2+1) != -1 Then{
HH[0] = H[비교고저점기준];
HD[0] = sdate[비교고저점기준];
HT[0] = sTime[비교고저점기준];
Condition1 = false;
for cnt = 1 to 19{
HH[cnt] = HH[cnt-1][1];
HD[cnt] = HD[cnt-1][1];
HT[cnt] = HT[cnt-1][1];
if Condition1 == false and HH[cnt] > HH[0] and HH[cnt] > 0 Then{
Condition1 = true;
TL_Delete(BTL);
BTL = TL_New(HD[cnt],HT[cnt],HH[cnt],HD[0],HT[0],HH[0]);
TL_SetExtRight(BTL,true);
TL_SetColor(BTL,RED);
}
}
}
if SwingLow(1,L,비교고저점기준,비교고저점기준,비교고저점기준*2+1) != -1 Then{
LL[0] = L[비교고저점기준];
LD[0] = sdate[비교고저점기준];
LT[0] = sTime[비교고저점기준];
Condition2 = false;
for cnt = 1 to 19{
LL[cnt] = LL[cnt-1][1];
LD[cnt] = LD[cnt-1][1];
LT[cnt] = LT[cnt-1][1];
if Condition2 == false and LL[cnt] < LL[0] and LL[cnt] > 0 Then{
Condition2 = true;
TL_Delete(STL);
STL = TL_New(LD[cnt],LT[cnt],LL[cnt],LD[0],LT[0],LL[0]);
TL_SetExtRight(STL,true);
TL_SetColor(STL,blue);
}
}
}
if TL_GetValue(BTL,sdate,stime) > TL_GetValue(STL,sdate,stime) Then
{
if C > TL_GetValue(BTL,sdate,stime) and C[1] < TL_GetValue(BTL,sdate[1],stime[1]) and t1==1 Then{
buy("b_1");
}
if C < TL_GetValue(STL,sdate,stime) and C[1] > TL_GetValue(STL,sdate[1],stime[1]) and t1==-1 Then{
sell("s_1");
}
}
2021-06-10
1465
글번호 149846
시스템