예스스탁
예스스탁 답변
2022-06-02 09:51:21
안녕하세요
예스스탁입니다.
1.maxlowPrice1
Input : ATRperiod1(Numeric),amplitude1(Numeric);
var : trend1(0),nexttrend1(0),minhighPrice1(0);
var : up1(0),down1(0),atrHigh1(0),atrLow1(0),arrowup1(0),arrowdown1(0);
var : atr21(0),dev1(0),highPrice1(0),lowPrice1(0),highma1(0),lowma1(0),midma1(0),HTM1(0);
atr21 = atr(ATRperiod1) / 2 ;
dev1 = atr21 * 5.5 ;
highPrice1 = Highest(H,amplitude1*1.5);
lowPrice1 = Lowest(L,amplitude1*1.5);
highma1 = ma(high, amplitude1*1.25);
lowma1 = ma(low, amplitude1*0.75);
midma1 = (highma1+lowma1)/2 ;
if nexttrend1 == 1 Then
{
maxlowPrice1 = max(lowPrice1, maxlowPrice1[1]);
if midma1 < maxlowPrice1 and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend1 = 1;
nexttrend1 = 0;
minhighPrice1 = highPrice1;
}
}
else
{
minhighPrice1 = min(highPrice1, minhighPrice1);
if midma1 > minhighPrice1 and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend1 = 0;
nexttrend1 = 1;
maxlowPrice1 = lowPrice1;
}
}
2.minhighPrice1
Input : ATRperiod1(Numeric),amplitude1(Numeric);
var : trend1(0),nexttrend1(0),maxlowPrice1(0);
var : up1(0),down1(0),atrHigh1(0),atrLow1(0),arrowup1(0),arrowdown1(0);
var : atr21(0),dev1(0),highPrice1(0),lowPrice1(0),highma1(0),lowma1(0),midma1(0),HTM1(0);
atr21 = atr(ATRperiod1) / 2 ;
dev1 = atr21 * 5.5 ;
highPrice1 = Highest(H,amplitude1*1.5);
lowPrice1 = Lowest(L,amplitude1*1.5);
highma1 = ma(high, amplitude1*1.25);
lowma1 = ma(low, amplitude1*0.75);
midma1 = (highma1+lowma1)/2 ;
if nexttrend1 == 1 Then
{
maxlowPrice1 = max(lowPrice1, maxlowPrice1);
if midma1 < maxlowPrice1 and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend1 = 1;
nexttrend1 = 0;
minhighPrice1 = highPrice1;
}
}
else
{
minhighPrice1 = min(highPrice1, minhighPrice1[1]);
if midma1 > minhighPrice1 and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend1 = 0;
nexttrend1 = 1;
maxlowPrice1 = lowPrice1;
}
}
즐거운 하루되세요
> 오이도인 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다
> 수고하십니다.
아래 지표식에서 [maxlowPrice1]과 [minhighPrice1]의 사용자 함수식 부탁합니다.
해봤는데 될 듯 될 듯 안되네요....ㅋ
감사합니다. 수고하세요
################
Input : ATRperiod1(1000),amplitude1(58);
var : trend1(0),nexttrend1(0),maxlowPrice1(0),minhighPrice1(0);
var : up1(0),down1(0),atrHigh1(0),atrLow1(0),arrowup1(0),arrowdown1(0);
var : atr21(0),dev1(0),highPrice1(0),lowPrice1(0),highma1(0),lowma1(0),midma1(0),HTM1(0);
atr21 = atr(ATRperiod1) / 2 ;
dev1 = atr21 * 5.5 ;
highPrice1 = Highest(H,amplitude1*1.5);
lowPrice1 = Lowest(L,amplitude1*1.5);
highma1 = ma(high, amplitude1*1.25);
lowma1 = ma(low, amplitude1*0.75);
midma1 = (highma1+lowma1)/2 ;
if nexttrend1 == 1 Then
{
maxlowPrice1 = max(lowPrice1, maxlowPrice1);
if midma1 < maxlowPrice1 and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend1 = 1;
nexttrend1 = 0;
minhighPrice1 = highPrice1;
}
}
else
{
minhighPrice1 = min(highPrice1, minhighPrice1);
if midma1 > minhighPrice1 and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend1 = 0;
nexttrend1 = 1;
maxlowPrice1 = lowPrice1;
}
}
if trend1 == 0 Then
{
if IsNaN(trend1[1]) == False and trend1[1] != 0 Then
{
up1 = iff(IsNaN(down1[1]) == true,down1,down1[1]);
arrowup1 = up1 - atr21;
}
else
{
up1 = iff(IsNan(up1[1]) == true, maxlowPrice1 , max(maxlowPrice1, up1[1]));
}
atrHigh1 = up1 + dev1;
atrLow1 = up1 - dev1;
}
else
{
if isnan(trend1[1]) == False and trend1[1] != 1 Then
{
down1 = iff(IsNan(up1[1]) == true, up1 , up1[1]);
arrowdown1 = down1 + atr21;
}
else
{
down1 = iff(IsNan(down1[1]) == true, minhighPrice1 ,min(minhighPrice1, down1[1]));
}
atrHigh1 = down1 + dev1;
atrLow1 = down1 - dev1;
}
if maxlowPrice1==maxlowPrice1[5] Then
plot2(maxlowPrice1, "maxlowPrice1-O", red);
if minhighPrice1==minhighPrice1[5] Then
plot3(minhighPrice1, "minhighPrice1-O", blue);