커뮤니티
수식부탁드립니다------------------
2016-09-12 21:07:36
115
글번호 101934
Input : Period1(5),Period5(1),급증(0),급감(0),급등락(0),소등락(0),돌파(0);
Var : va(0);
Var : va1(0);
Var : va11(0);
Var : va12(0);
Var : value(0);
Var : vp(0);
va = ma(bids,period5)-ma(asks,period5)+8000;
va1 = ma(bids,period1)-ma(asks,period1)+8000;
//급등락축소시작----------------------------
//if va1 >va1[1]+급등락 then va1 = va1 -급등락;
if va1 >va1[1]+급등락 then va1 = ((va1 -va1[1])/급증)+va1[1];
//if va1 >va1[1]+소등락 then va1 = va1 - 소등락;
if va1 <va1[1]-급등락 then va1 = ((va1[1] -va1)/급감)+va1;
//if va1 <va1[1]-급등락 then va1 = va1 + 급등락;
if va1 <va1[1]-소등락 then va1 = va1 + 소등락;
//급등락축소시작----------------------------
//1이평-----------------------------------------------
If va1 > va1[1] Then
{
Plot10(va1, "매수잔량 우위");
Plot11(0, "매도잔량 우위");
}
Else{
Plot10(0, "매수잔량 우위");
Plot11(va1, "매도잔량 우위");
}
//5이평-----------------------------------------------
If va > va[1] Then
{
Plot3(va, "5매수총잔량 우위");
Plot4(0, "5매도총잔량 우위");
}
Else{
Plot3(0, "5매수총잔량 우위");
Plot4(va, "5매도총잔량 우위");
}
//plot6(value,"선",iff(value>value[1],red,iff(value<value[1],BLUE,WHITE)));
//PlotBaseLine1(5000,"기준선");
PlotBaseLine5(va,"기준선5");
PlotBaseLine1(va1,"기준선1");
//--------------------------------------------
if va < va1 then
{vp=((va1-va)/2)+va;}
if va1 < va then
{vp=((va-va1)/2)+va1;}
Plot20(vp, "반");
//OSCP*******************************************
//PriceOsc = OSCP(va, vp);
//Plot5(PriceOsc, "선");
//점찍기
If va > va[1]+0 and va[1] < va[2]+0 and dayindex >= 3 Then
{
Plot6(va+500, "매수점");}
//소리
//If vp > vp[1] and vp[1] < vp[2] and dayindex >= 3 Then
// {
//
If va < va[1]-0 and va[1] > va[2]+0 and dayindex >= 3 Then
{
Plot7(va+500, "매도점");}
//소리
//If va < vp[1] and vp[1] > vp[2] and dayindex >= 3 Then
// {
// PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if CrossUp(va1,va+돌파) and vp[1] < vp Then
{
plot21(vp+500,"수");}
if CrossUp(va1,va+돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩bubbles.wav"); }
if CrossDown(va1,va-돌파) and vp[1] > vp Then
{
plot22(vp+500,"도");}
if CrossDown(va1,va-돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if va11 == highest(va1,10 ) Then plot99(va1);
if va12 == LowerStr(va1,10 ) Then plot88(va1);
어찌할줄몰라 문의드립니다
highest(va1,10 ) 보다낮으면 plot22만표시되게하고
LowerStr(va1,10 ) 보다크면 plot21만 표시하게하려합니다
즉 상승중에는 plot21 만 나오게하고
하락중에는 plot22 만 나오게 하려고 합니다
수식부탁드립니다
답변 1
예스스탁 예스스탁 답변
2016-09-13 11:32:01
안녕하세요
예스스탁입니다.
올려주신식에 va11,va12는 변수로 선언만 되어 있고
값이 할당되어 있지 않습니다.
또한 어떤 지표의 출력을 제어하기위해서는
해당 plot의 제어되는 if문에 조건을 넣으셔야 합니다.
즉 highest(va1,10 ) 보다낮으면 plot22만표시되게하기 위해서는
아래 if문에 조건식을 추가해야 합니다.
va11과 va12가 따로 계산식이 있는데 올리신 식에는
없는 것으로 보고 해당 변수로 지정해 드립니다.
if CrossUp(va1,va+돌파) and vp[1] < vp and va11 > lowest(va1,10) Then
{
plot21(vp+500,"수");}
수정한 식입니다.
Input : Period1(5),Period5(1),급증(0),급감(0),급등락(0),소등락(0),돌파(0);
Var : va(0);
Var : va1(0);
Var : va11(0);
Var : va12(0);
Var : value(0);
Var : vp(0);
va = ma(bids,period5)-ma(asks,period5)+8000;
va1 = ma(bids,period1)-ma(asks,period1)+8000;
//급등락축소시작----------------------------
//if va1 >va1[1]+급등락 then va1 = va1 -급등락;
if va1 >va1[1]+급등락 then va1 = ((va1 -va1[1])/급증)+va1[1];
//if va1 >va1[1]+소등락 then va1 = va1 - 소등락;
if va1 <va1[1]-급등락 then va1 = ((va1[1] -va1)/급감)+va1;
//if va1 <va1[1]-급등락 then va1 = va1 + 급등락;
if va1 <va1[1]-소등락 then va1 = va1 + 소등락;
//급등락축소시작----------------------------
//1이평-----------------------------------------------
If va1 > va1[1] Then
{
Plot10(va1, "매수잔량 우위");
Plot11(0, "매도잔량 우위");
}
Else{
Plot10(0, "매수잔량 우위");
Plot11(va1, "매도잔량 우위");
}
//5이평-----------------------------------------------
If va > va[1] Then
{
Plot3(va, "5매수총잔량 우위");
Plot4(0, "5매도총잔량 우위");
}
Else{
Plot3(0, "5매수총잔량 우위");
Plot4(va, "5매도총잔량 우위");
}
//plot6(value,"선",iff(value>value[1],red,iff(value<value[1],BLUE,WHITE)));
//PlotBaseLine1(5000,"기준선");
PlotBaseLine5(va,"기준선5");
PlotBaseLine1(va1,"기준선1");
//--------------------------------------------
if va < va1 then
{vp=((va1-va)/2)+va;}
if va1 < va then
{vp=((va-va1)/2)+va1;}
Plot20(vp, "반");
//OSCP*******************************************
//PriceOsc = OSCP(va, vp);
//Plot5(PriceOsc, "선");
//점찍기
If va > va[1]+0 and va[1] < va[2]+0 and dayindex >= 3 Then
{
Plot6(va+500, "매수점");}
//소리
//If vp > vp[1] and vp[1] < vp[2] and dayindex >= 3 Then
// {
//
If va < va[1]-0 and va[1] > va[2]+0 and dayindex >= 3 Then
{
Plot7(va+500, "매도점");}
//소리
//If va < vp[1] and vp[1] > vp[2] and dayindex >= 3 Then
// {
// PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if CrossUp(va1,va+돌파) and vp[1] < vp and va11 > lowest(va1,10) Then
{
plot21(vp+500,"수");}
if CrossUp(va1,va+돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩bubbles.wav"); }
if CrossDown(va1,va-돌파) and vp[1] > vp and va12 < highest(va1,10) Then
{
plot22(vp+500,"도");}
if CrossDown(va1,va-돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if va11 == highest(va1,10 ) Then plot99(va1);
if va12 == lowest(va1,10 ) Then plot88(va1);
즐거운 하루되세요
> leekss1 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다------------------
> Input : Period1(5),Period5(1),급증(0),급감(0),급등락(0),소등락(0),돌파(0);
Var : va(0);
Var : va1(0);
Var : va11(0);
Var : va12(0);
Var : value(0);
Var : vp(0);
va = ma(bids,period5)-ma(asks,period5)+8000;
va1 = ma(bids,period1)-ma(asks,period1)+8000;
//급등락축소시작----------------------------
//if va1 >va1[1]+급등락 then va1 = va1 -급등락;
if va1 >va1[1]+급등락 then va1 = ((va1 -va1[1])/급증)+va1[1];
//if va1 >va1[1]+소등락 then va1 = va1 - 소등락;
if va1 <va1[1]-급등락 then va1 = ((va1[1] -va1)/급감)+va1;
//if va1 <va1[1]-급등락 then va1 = va1 + 급등락;
if va1 <va1[1]-소등락 then va1 = va1 + 소등락;
//급등락축소시작----------------------------
//1이평-----------------------------------------------
If va1 > va1[1] Then
{
Plot10(va1, "매수잔량 우위");
Plot11(0, "매도잔량 우위");
}
Else{
Plot10(0, "매수잔량 우위");
Plot11(va1, "매도잔량 우위");
}
//5이평-----------------------------------------------
If va > va[1] Then
{
Plot3(va, "5매수총잔량 우위");
Plot4(0, "5매도총잔량 우위");
}
Else{
Plot3(0, "5매수총잔량 우위");
Plot4(va, "5매도총잔량 우위");
}
//plot6(value,"선",iff(value>value[1],red,iff(value<value[1],BLUE,WHITE)));
//PlotBaseLine1(5000,"기준선");
PlotBaseLine5(va,"기준선5");
PlotBaseLine1(va1,"기준선1");
//--------------------------------------------
if va < va1 then
{vp=((va1-va)/2)+va;}
if va1 < va then
{vp=((va-va1)/2)+va1;}
Plot20(vp, "반");
//OSCP*******************************************
//PriceOsc = OSCP(va, vp);
//Plot5(PriceOsc, "선");
//점찍기
If va > va[1]+0 and va[1] < va[2]+0 and dayindex >= 3 Then
{
Plot6(va+500, "매수점");}
//소리
//If vp > vp[1] and vp[1] < vp[2] and dayindex >= 3 Then
// {
//
If va < va[1]-0 and va[1] > va[2]+0 and dayindex >= 3 Then
{
Plot7(va+500, "매도점");}
//소리
//If va < vp[1] and vp[1] > vp[2] and dayindex >= 3 Then
// {
// PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if CrossUp(va1,va+돌파) and vp[1] < vp Then
{
plot21(vp+500,"수");}
if CrossUp(va1,va+돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩bubbles.wav"); }
if CrossDown(va1,va-돌파) and vp[1] > vp Then
{
plot22(vp+500,"도");}
if CrossDown(va1,va-돌파) Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav" ); }
if va11 == highest(va1,10 ) Then plot99(va1);
if va12 == LowerStr(va1,10 ) Then plot88(va1);
어찌할줄몰라 문의드립니다
highest(va1,10 ) 보다낮으면 plot22만표시되게하고
LowerStr(va1,10 ) 보다크면 plot21만 표시하게하려합니다
즉 상승중에는 plot21 만 나오게하고
하락중에는 plot22 만 나오게 하려고 합니다
수식부탁드립니다
다음글