예스스탁
예스스탁 답변
2024-11-14 15:03:43
안녕하세요
예스스탁입니다.
Input : Period(14);
var : DMIv(0),DP(0),DM(0),TT7(0);
var : um1(0),um2(0),ud1(0),ut1(0),uv1(0),utx1(0),utx2(0);
var : dm1(0),dm2(0),dd1(0),dt1(0),dv1(0),dtx1(0),dtx2(0);
DMIv = DMI(Period);
DP = DIPlus(Period);
DM = DIMinus(Period);
if CrossUp(DP,DM) Then
{
TT7 = 1;
dm1 = 0;
dm2 = 0;
}
if CrossDown(DP,DM) Then
{
TT7 = -1;
um1 = 0;
um2 = 0;
}
if TT7 == 1 Then
{
if DMiv > dp Then
{
if DMiv-dp > dm1 Then
{
dd1 = sDate;
dt1 = sTime;
dv1 = h;
if dm1 == 0 Then
{
dtx1 = Text_New(dd1,dt1,dv1-PriceScale*10,"★");
Text_SetColor(dtx1,RgB(0,255,0) ) ;
Text_SetStyle(dtx1,2,1);
Text_SetSize(dtx1,40) ;
//PlaySound("C:CyberOrOWav3Start.wav");
}
Else
{
dtx1 = Text_New(dd1,dt1,dv1-PriceScale*10,"★");
Text_SetColor(dtx1,RgB(0,255,0) ) ;
Text_SetStyle(dtx1,2,1);
Text_SetSize(dtx1,40) ;
//Text_SetLocation(dtx1,dd1,dt1,dv1-PriceScale*10);
if dm1 > dm2 Then
{
if dm2 == 0 Then
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
Else
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
dm2 = dm1;
}
}
dm1 = DMiv-dp;
}
Else
{
if DMiv-dp > dm2 Then
{
if dm2 == 0 Then
{
dtx2 = Text_New(sDate,sTime,H,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
Else
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
}
dm2 = DMiv-dp;
}
Else
PlaySound("C:KiwoomHero4soundsound11.wav");
}
}
}
##==========================================================================
if TT7 == -1 Then
{
if DMiv > dm Then
{
if DMiv-dm > um1 Then
{
ud1 = sDate;
ut1 = sTime;
uv1 = l;
if um1 == 0 Then
{
utx1 = Text_New(ud1,ut1,uv1+PriceScale*10,"★");
Text_SetColor(utx1,RgB(255,0,255) ) ;
Text_SetStyle(utx1,2,0);
Text_SetSize(utx1,40) ;
##PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
Text_SetLocation(utx1,ud1,ut1,uv1+PriceScale*10);
if um1 > um2 Then
{
if um2 == 0 Then
{
utx2 = Text_New(ud1[1],ut1[1],uv1[1]+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
## PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
utx2 = Text_New(ud1[1],ut1[1],uv1[1]+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
}
um2 = um1;
}
}
um1 = DMiv-dm;
}
Else
{
if DMiv-dm > um2 Then
{
if um2 == 0 Then
{
utx2 = Text_New(sDate,sTime,uv1+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
## PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
utx2 = Text_New(sDate,sTime,uv1+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
}
um2 = DMiv-dm;
}
Else
PlaySound("C:KiwoomHero4soundsound11.wav");
}
}
}
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 89935글 수정 좀 부탁 드림니다.
>
지난번 주신 지표중 하단 부분 분홍색 별은 계속 바뀌고 있습니다.
하단별만 갱신안되도록 수정 좀 부탁 드림니다.
##========================================================
안녕하세요
예스스탁입니다.
현재수식은 값이 갱신되면
첫번째 최고/최저와 두번째 최고/최저만 표시하므로
새로운 최고/최저가 발생하면 표시를 이동하게 됩니다.
새로운 최고/최저가 발생하면 이동하지 않고 새로 그리게 하고
갱신이 없는 봉은 소리가 출력되게 수정해 드립니다.
Input : Period(14);
var : DMIv(0),DP(0),DM(0),TT7(0);
var : um1(0),um2(0),ud1(0),ut1(0),uv1(0),utx1(0),utx2(0);
var : dm1(0),dm2(0),dd1(0),dt1(0),dv1(0),dtx1(0),dtx2(0);
DMIv = DMI(Period);
DP = DIPlus(Period);
DM = DIMinus(Period);
if CrossUp(DP,DM) Then
{
TT7 = 1;
dm1 = 0;
dm2 = 0;
}
if CrossDown(DP,DM) Then
{
TT7 = -1;
um1 = 0;
um2 = 0;
}
if TT7 == 1 Then
{
if DMiv > dp Then
{
if DMiv-dp > dm1 Then
{
dd1 = sDate;
dt1 = sTime;
dv1 = h;
if dm1 == 0 Then
{
dtx1 = Text_New(dd1,dt1,dv1-PriceScale*10,"★");
Text_SetColor(dtx1,RgB(0,255,0) ) ;
Text_SetStyle(dtx1,2,1);
Text_SetSize(dtx1,40) ;
//PlaySound("C:CyberOrOWav3Start.wav");
}
Else
{
dtx1 = Text_New(dd1,dt1,dv1-PriceScale*10,"★");
Text_SetColor(dtx1,RgB(0,255,0) ) ;
Text_SetStyle(dtx1,2,1);
Text_SetSize(dtx1,40) ;
//Text_SetLocation(dtx1,dd1,dt1,dv1-PriceScale*10);
if dm1 > dm2 Then
{
if dm2 == 0 Then
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
Else
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
dm2 = dm1;
}
}
dm1 = DMiv-dp;
}
Else
{
if DMiv-dp > dm2 Then
{
if dm2 == 0 Then
{
dtx2 = Text_New(sDate,sTime,H,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
## PlaySound("C:KiwoomHero4soundsound11.wav");
}
Else
{
dtx2 = Text_New(dd1[1],dt1[1],dv1[1]-PriceScale*10,"★");
Text_SetColor(dtx2,RgB(0,255,0) ) ;
Text_SetStyle(dtx2,2,1);
Text_SetSize(dtx2,40) ;
}
dm2 = DMiv-dp;
}
Else
PlaySound("C:KiwoomHero4soundsound11.wav");
}
}
}
##==========================================================================
if TT7 == -1 Then
{
if DMiv > dm Then
{
if DMiv-dm > um1 Then
{
ud1 = sDate;
ut1 = sTime;
uv1 = l;
if um1 == 0 Then
{
utx1 = Text_New(ud1,ut1,uv1+PriceScale*10,"★");
Text_SetColor(utx1,RgB(255,0,255) ) ;
Text_SetStyle(utx1,2,0);
Text_SetSize(utx1,40) ;
##PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
Text_SetLocation(utx1,ud1,ut1,uv1+PriceScale*10);
if um1 > um2 Then
{
if um2 == 0 Then
{
utx2 = Text_New(ud1[1],ut1[1],uv1[1]+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
## PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
Text_SetLocation(utx2,ud1[1],ut1[1],uv1[1]+PriceScale*10);
}
um2 = um1;
}
}
um1 = DMiv-dm;
}
Else
{
if DMiv-dm > um2 Then
{
if um2 == 0 Then
{
utx2 = Text_New(sDate,sTime,uv1+PriceScale*10,"★");
Text_SetColor(utx2,RgB(255,0,255) ) ;
Text_SetStyle(utx2,2,0);
Text_SetSize(utx2,40) ;
## PlaySound("C:KiwoomHero4soundsound1.wav");
}
Else
{
Text_SetLocation(utx2,sDate,sTime,l+PriceScale*10);
}
um2 = DMiv-dm;
}
Else
PlaySound("C:KiwoomHero4soundsound11.wav");
}
}
}
죄송합니다. 수고 하십시요.