커뮤니티
수식수정부탁드립니다
2019-08-19 21:46:01
296
글번호 131241
#,안녕하세요
1,아래수식에서 경보음 발생시기 및 발생되는 시간조정에 관한 질문입니다
ㅡ,현 수식은 텍스트출력 전에 소리가 발생 되어 텍스트 완성되면 소리가 멈추는 식으로 되어
있습니다, 이를 텍스트출력 직후 캔들완성후로 변경 부탁드립니다.
ㅡ,텍스트 출력직후로 소리발생하게 식을 수정하면 경보음 발생 시간이나 횟수를 조정할수 있
는지요,예)소리발생 3분후 초기화 되거나 소리발생10회후 발생이전으로 초기화 되거나 하는
식으로 작성 가능한지요,한시간봉 차트를 볼경우 한시간동안 소리를 들어야 하는 불편함 때
문입니다.도움 부탁드립니다.
input : af(0.02), maxAF(0.2);
input : 텍스트출력(1);
var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0),TL1(0),TL2(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),DarkGray(0);
var : TL3(0),TL4(0),TL5(0),TL6(0),tl7(0),tx1(0),tx2(0),tx11(0),tx22(0);
var1 = CSar(af,maxAF);
if crossup(c,var1) Then
{
T = 1;
HH = H;
HD = sdate;
HT = stime;
HH1 = HH[1];
HD1 = HD[1];
HT1 = HT[1];
if LL > 0 Then
{
if 텍스트출력 == 1 then
{
Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2));
Text_SetStyle(tx11,2,1);
Text_SetColor(tx11,BLACK);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL = L;
LD = sdate;
LT = stime;
LL1 = LL[1];
LD1 = LD[1];
LT1 = LT[1];
if HH > 0 Then
{
if 텍스트출력 == 1 then
{
Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2));
Text_SetStyle(tx22,2,0);
Text_SetColor(tx22,RED);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
if T == 1 then
{
if H > HH Then
{
HH = H;
HD = sdate;
HT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if T == -1 then
{
if L < LL Then
{
LL = L;
LD = sdate;
LT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
2,아래수식에서 현재가가 plot1라인이나,plot2라인 를 각각 상방 또는 하방으로 터치할때
마다 경보음이 발생하는 수식부탁드립니다.
input : per1(61.8);
Var : pivot(0),S1(0),S2(1),S3(1),S4(1),S5(0),cnt(0),t1(0),t2(0);
Array : oo[10](0),hh[10](0),ll[10](0),cc[10](0);
if bdate > bdate[1]+30 then
{
oo[0] = o;
hh[0] = h;
ll[0] = L;
for cnt = 1 to 9
{
oo[cnt] = oo[cnt-1][1];
hh[cnt] = hh[cnt-1][1];
ll[cnt] = ll[cnt-1][1];
cc[cnt] = cc[cnt-1][1];
}
}
if h > hh[0] Then
hh[0] = h;
if l < ll[0] Then
ll[0] = l;
cc[0] = c;
if hh[1] > 0 and ll[1] > 0 then
{
S1 = (hh[0]+ll[0])/2;
S2 = (hh[1]+ll[1])/2;
S3 = hh[1];
S4 = ll[1];
s5 = oo[0];
plot1(10^(LOG10(cc[1])+(LOG10(S3)-LOG10(S4))*(Per1/100)));
plot2(10^(LOG10(cc[1])-(LOG10(S3)-LOG10(S4))*(Per1/100)));
}
Text_Delete(t1);
Text_Delete(t2);
t1 = Text_New(sdate,stime,10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100))," MB:"+NumToStr(10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100)),2));
t2 = Text_New(sdate,stime,10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100))," MS:"+NumToStr(10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100)),2));
Text_SetStyle(t1,5,2);
Text_SetStyle(t2,5,2);
Text_SetColor(t1,RED);
Text_SetColor(t2,BLUE);
###,고맙습니다.
부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2019-08-20 13:50:22
안녕하세요
예스스탁입니다.
1
IsNaN(NextBarOpen) == false
위 조건을 playsound함수가 동작하는 if문에 조건을 추가하시면
캔들 완성시만 소리가 한번 출력되게 됩니다. 별도로 횟수는 조절이 되지 않습니다.
input : af(0.02), maxAF(0.2);
input : 텍스트출력(1);
var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0),TL1(0),TL2(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),DarkGray(0);
var : TL3(0),TL4(0),TL5(0),TL6(0),tl7(0),tx1(0),tx2(0),tx11(0),tx22(0);
var1 = CSar(af,maxAF);
if crossup(c,var1) Then
{
T = 1;
HH = H;
HD = sdate;
HT = stime;
HH1 = HH[1];
HD1 = HD[1];
HT1 = HT[1];
if LL > 0 Then
{
if 텍스트출력 == 1 and IsNaN(NextBarOpen) == false then
{
Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2));
Text_SetStyle(tx11,2,1);
Text_SetColor(tx11,BLACK);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL = L;
LD = sdate;
LT = stime;
LL1 = LL[1];
LD1 = LD[1];
LT1 = LT[1];
if HH > 0 Then
{
if 텍스트출력 == 1 and IsNaN(NextBarOpen) == false then
{
Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2));
Text_SetStyle(tx22,2,0);
Text_SetColor(tx22,RED);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
if T == 1 then
{
if H > HH Then
{
HH = H;
HD = sdate;
HT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if T == -1 then
{
if L < LL Then
{
LL = L;
LD = sdate;
LT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
2
input : per1(61.8);
Var : pivot(0),S1(0),S2(1),S3(1),S4(1),S5(0),cnt(0),t1(0),t2(0);
Array : oo[10](0),hh[10](0),ll[10](0),cc[10](0);
if bdate > bdate[1]+30 then
{
oo[0] = o;
hh[0] = h;
ll[0] = L;
for cnt = 1 to 9
{
oo[cnt] = oo[cnt-1][1];
hh[cnt] = hh[cnt-1][1];
ll[cnt] = ll[cnt-1][1];
cc[cnt] = cc[cnt-1][1];
}
}
if h > hh[0] Then
hh[0] = h;
if l < ll[0] Then
ll[0] = l;
cc[0] = c;
if hh[1] > 0 and ll[1] > 0 then
{
S1 = (hh[0]+ll[0])/2;
S2 = (hh[1]+ll[1])/2;
S3 = hh[1];
S4 = ll[1];
s5 = oo[0];
var1 = 10^(LOG10(cc[1])+(LOG10(S3)-LOG10(S4))*(Per1/100));
var2 = 10^(LOG10(cc[1])-(LOG10(S3)-LOG10(S4))*(Per1/100));
plot1(var1);
plot2(var2);
if crossup(h,var1) Then
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
if CrossDown(l,var2) Then
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
}
Text_Delete(t1);
Text_Delete(t2);
t1 = Text_New(sdate,stime,10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100))," MB:"+NumToStr(10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100)),2));
t2 = Text_New(sdate,stime,10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100))," MS:"+NumToStr(10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100)),2));
Text_SetStyle(t1,5,2);
Text_SetStyle(t2,5,2);
Text_SetColor(t1,RED);
Text_SetColor(t2,BLUE);
즐거운 하루되세요
> 골든키 님이 쓴 글입니다.
> 제목 : 수식수정부탁드립니다
> #,안녕하세요
1,아래수식에서 경보음 발생시기 및 발생되는 시간조정에 관한 질문입니다
ㅡ,현 수식은 텍스트출력 전에 소리가 발생 되어 텍스트 완성되면 소리가 멈추는 식으로 되어
있습니다, 이를 텍스트출력 직후 캔들완성후로 변경 부탁드립니다.
ㅡ,텍스트 출력직후로 소리발생하게 식을 수정하면 경보음 발생 시간이나 횟수를 조정할수 있
는지요,예)소리발생 3분후 초기화 되거나 소리발생10회후 발생이전으로 초기화 되거나 하는
식으로 작성 가능한지요,한시간봉 차트를 볼경우 한시간동안 소리를 들어야 하는 불편함 때
문입니다.도움 부탁드립니다.
input : af(0.02), maxAF(0.2);
input : 텍스트출력(1);
var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0),TL1(0),TL2(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),DarkGray(0);
var : TL3(0),TL4(0),TL5(0),TL6(0),tl7(0),tx1(0),tx2(0),tx11(0),tx22(0);
var1 = CSar(af,maxAF);
if crossup(c,var1) Then
{
T = 1;
HH = H;
HD = sdate;
HT = stime;
HH1 = HH[1];
HD1 = HD[1];
HT1 = HT[1];
if LL > 0 Then
{
if 텍스트출력 == 1 then
{
Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2));
Text_SetStyle(tx11,2,1);
Text_SetColor(tx11,BLACK);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL = L;
LD = sdate;
LT = stime;
LL1 = LL[1];
LD1 = LD[1];
LT1 = LT[1];
if HH > 0 Then
{
if 텍스트출력 == 1 then
{
Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2));
Text_SetStyle(tx22,2,0);
Text_SetColor(tx22,RED);
PlaySound("C:₩예스트레이더₩data ₩Sound ₩alert.wav");
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
if T == 1 then
{
if H > HH Then
{
HH = H;
HD = sdate;
HT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx1);
Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
}
if T == -1 then
{
if L < LL Then
{
LL = L;
LD = sdate;
LT = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx2);
Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
}
}
2,아래수식에서 현재가가 plot1라인이나,plot2라인 를 각각 상방 또는 하방으로 터치할때
마다 경보음이 발생하는 수식부탁드립니다.
input : per1(61.8);
Var : pivot(0),S1(0),S2(1),S3(1),S4(1),S5(0),cnt(0),t1(0),t2(0);
Array : oo[10](0),hh[10](0),ll[10](0),cc[10](0);
if bdate > bdate[1]+30 then
{
oo[0] = o;
hh[0] = h;
ll[0] = L;
for cnt = 1 to 9
{
oo[cnt] = oo[cnt-1][1];
hh[cnt] = hh[cnt-1][1];
ll[cnt] = ll[cnt-1][1];
cc[cnt] = cc[cnt-1][1];
}
}
if h > hh[0] Then
hh[0] = h;
if l < ll[0] Then
ll[0] = l;
cc[0] = c;
if hh[1] > 0 and ll[1] > 0 then
{
S1 = (hh[0]+ll[0])/2;
S2 = (hh[1]+ll[1])/2;
S3 = hh[1];
S4 = ll[1];
s5 = oo[0];
plot1(10^(LOG10(cc[1])+(LOG10(S3)-LOG10(S4))*(Per1/100)));
plot2(10^(LOG10(cc[1])-(LOG10(S3)-LOG10(S4))*(Per1/100)));
}
Text_Delete(t1);
Text_Delete(t2);
t1 = Text_New(sdate,stime,10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100))," MB:"+NumToStr(10^(LOG10(cc[1])+(Log10(S3)-log10(S4))*(Per1/100)),2));
t2 = Text_New(sdate,stime,10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100))," MS:"+NumToStr(10^(LOG10(cc[1])-(Log10(S3)-log10(S4))*(Per1/100)),2));
Text_SetStyle(t1,5,2);
Text_SetStyle(t2,5,2);
Text_SetColor(t1,RED);
Text_SetColor(t2,BLUE);
###,고맙습니다.
부탁드립니다.