답변완료
잘 부탁드립니다
##### 하나의 지표로 부탁드립니다
1,
input : length(10),multiplier(3.0),emaPeriod(12);
var : supertrend(0),highestHigh(0),lowestLow(0);
var : atrv(0),ii(0),supertrendcolor(0);
var : ema12(0),emaColor(0);
ATRV = ATR(length);
supertrend = 0;
highestHigh = 0;
lowestLow = 0;
for ii = length downto 1
{
if close[ii] > close[ii+1] Then
{
if highestHigh == 0 or (highestHigh > 0 and high[ii] > highestHigh) Then
highestHigh = high[ii];
}
else
{
if lowestLow == 0 or (lowestLow > 0 and low[ii] < lowestLow) Then
lowestLow = low[ii];
}
}
supertrend = iff(close > close[1] , lowestLow + multiplier * ATRV, highestHigh - multiplier * ATRV);
supertrendColor = iff(supertrend > ema(close, emaPeriod) , green , red);
ema12 = ema(close, emaPeriod);
emaColor = iff(close > ema12 , Blue , Green);
plot1(supertrend, "Supertrend",supertrendColor);
plot2(ema12,"12 EMA",emaColor);
2
input : length(10),multiplier(3.0),emaPeriod(26);
var : supertrend(0),highestHigh(0),lowestLow(0);
var : atrv(0),ii(0),supertrendcolor(0);
var : ema26(0),emaColor(0);
ATRV = ATR(length);
supertrend = 0;
highestHigh = 0;
lowestLow = 0;
for ii = length downto 1
{
if close[ii] > close[ii+1] Then
{
if highestHigh == 0 or (highestHigh > 0 and high[ii] > highestHigh) Then
highestHigh = high[ii];
}
else
{
if lowestLow == 0 or (lowestLow > 0 and low[ii] < lowestLow) Then
lowestLow = low[ii];
}
}
supertrend = iff(close > close[1] , lowestLow + multiplier * ATRV, highestHigh - multiplier * ATRV);
supertrendColor = iff(supertrend > ema(close, emaPeriod) , green , red);
ema26 = ema(close, emaPeriod);
emaColor = iff(close > ema26 , Red , Green);
plot1(supertrend, "Supertrend",supertrendColor);
plot2(ema26,"26 EMA",emaColor);
3
input : length(10),multiplier(3.0),emaPeriod(60);
var : supertrend(0),highestHigh(0),lowestLow(0);
var : atrv(0),ii(0),supertrendcolor(0);
var : ema60(0),emaColor(0);
ATRV = ATR(length);
supertrend = 0;
highestHigh = 0;
lowestLow = 0;
for ii = length downto 1
{
if close[ii] > close[ii+1] Then
{
if highestHigh == 0 or (highestHigh > 0 and high[ii] > highestHigh) Then
highestHigh = high[ii];
}
else
{
if lowestLow == 0 or (lowestLow > 0 and low[ii] < lowestLow) Then
lowestLow = low[ii];
}
}
supertrend = iff(close > close[1] , lowestLow + multiplier * ATRV, highestHigh - multiplier * ATRV);
supertrendColor = iff(supertrend > ema(close, emaPeriod) , green , red);
ema60 = ema(close, emaPeriod);
emaColor = iff(close > ema60 , Black , Green);
plot1(supertrend, "Supertrend",supertrendColor);
plot2(ema60,"60 EMA",emaColor);
4,
input : length(10),multiplier(3.0),emaPeriod(200);
var : supertrend(0),highestHigh(0),lowestLow(0);
var : atrv(0),ii(0),supertrendcolor(0);
var : ema200(0),emaColor(0);
ATRV = ATR(length);
supertrend = 0;
highestHigh = 0;
lowestLow = 0;
for ii = length downto 1
{
if close[ii] > close[ii+1] Then
{
if highestHigh == 0 or (highestHigh > 0 and high[ii] > highestHigh) Then
highestHigh = high[ii];
}
else
{
if lowestLow == 0 or (lowestLow > 0 and low[ii] < lowestLow) Then
lowestLow = low[ii];
}
}
supertrend = iff(close > close[1] , lowestLow + multiplier * ATRV, highestHigh - multiplier * ATRV);
supertrendColor = iff(supertrend > ema(close, emaPeriod) , green , red);
ema200 = ema(close, emaPeriod);
emaColor = iff(close > ema200 , cyan , Green);
plot1(supertrend, "Supertrend",supertrendColor);
plot2(ema200,"200 EMA",emaColor);
2023-07-03
1275
글번호 170293
지표
답변완료
수식부탁드립니다
안녕하세요
항상 감사합니다
하이킨아시 시고저종가를 기준으로 아래수식으로
B를 계산했을때 영웅문 하이킨아시차트상 나온값하고 달라서 문의드립니다
동일한 값이 나오도록 어떻게해야하는지 부탁드립니다
영웅문 수식(하이킨아시 차트)
aa=PREDAYHIGH() - PREDAYLOW();
DAYOPEN()+aa*0.5
=========================================================
var : xClose(0),xOpen(0),xHigh(0),xLow(0);
var : A(0),B(0),B1(0),B2(0),B3(0) ;
#Heiken Ashi 시고저종
if index == 0 then
{
xOpen = open;
xClose = (O+H+L+C)/4;
xHigh = MaxList( high, xOpen, xClose);
xLow = MinList( low, xOpen,xClose);
}
else
{
xClose = (O+H+L+C)/4;
xOpen = (xOpen [1] + xClose [1])/2 ;
xHigh = MaxList(High, xOpen, xClose) ;
xLow = MinList(Low, xOpen, xClose) ;
}
A=xHigh[1]-xLow[1];
B=xOpen+A*0.5;
2023-07-03
1596
글번호 170291
지표
답변완료
수식 추가 부탁드려요
안녕하세요? 아래 수식 세가지에 추가 부탁드립니다.
[1] 손절,익절 외부변수 추가 부탁드려요
Input : maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), sPeriod(12), lPeriod(26);
input : 진입횟수(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
value1 = ema(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), sPeriod);
value2 = ema(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), lperiod);
# 매수/매도청산
if CrossUp(value1-value2,0) Then
{
if entry < 진입횟수 Then
Buy();
Else
ExitShort();
}
# 매도/매수청산
if CrossDown(value1-value2,0) Then
{
if entry < 진입횟수 Then
Sell();
Else
ExitLong();
}
------------------------------------------------------------------------------------
[2] 진입횟수, 손절, 익절 외부변수 추가 부타드려요
OBV New high_Low
Inputs: ConsecutiveOBV(3), Length(15), Pval(0.05);
Variables: OBVcalc(0);
OBVcalc = OBV() * 0.0001;
If CountIF(OBVcalc > Highest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
Buy ("OBV_LE", AtStop, Close + Pval);
If CountIF(OBVcalc < Lowest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
Sell ("OBV_SE", AtStop, Close - Pval);
------------------------------------------------------------------------------------
[3] 진입횟수, 손절, 익절 외부변수 추가 부타드려요
input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20);
input : entrycnt(3),profit(50),loss(50);
var : entry(0);
var1 = ma(c,p1);
var2 = ma(c,p2);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) then
entry = entry+1;
if entry < entrycnt and var1 > Var2 and MarketPosition == 0 and C >= O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then
buy();
if entry < entrycnt and var1 < Var2 and MarketPosition == 0 and C <= O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then
sell();
SetStopProfittarget(PriceScale*profit,PointStop);
SetStopLoss(PriceScale*loss,PointStop);
2023-07-03
1214
글번호 170280
시스템