답변완료
문의드립니다.
안녕하십니까. 지난번 답변 감사드립니다.
1. 이번에 ATR, ADX 지표를 선물 가격이 아닌 선물 거래량에 적용해 보고 싶은데,
ATR, ADX 지표의 어느 부분을 거래량으로 수정해야 하는지 알려주시면 감사하겠습니다.
2. 그리고, ATR. ADX 값을 다시 MACD를 보조지표로 구현해 보고 싶은데, MACD의 어느 부분을 수정해야 하는지 알려주시면 감사하겠습니다.
2. 마지막으로, 이동평균선의 이동평균 방식
단순이동평균, 지수이동평균, 가중이동평균, 기하이동평균, 조화이동평균, 삼각이동평균
이 예스트레이더에서는 어떻게 표시되는지도 알려주시면 감사하겠습니다.
------------------
1. ATR 지표 식
Input : Period(14),SigPeriod(9);
var : AvgTrueRange(0),ATRsig(0);
AvgTrueRange = ATR(Period);
ATRsig = WMA(ATR(Period),SigPeriod);
Plot1(AvgTrueRange, "Average True Range");
Plot2(ATRsig, "ATR signal");
2. ADX 지표 식(일부 수정)
input : Period(14),SigPeriod(9);
var : ADXv(0),DP(0),DM(0),ADXsig(0);
ADXv = ADX(Period);
DP = DiPlus(Period);
DM = DiMinus(Period);
ADXsig = Ema(ADX(Period),SigPeriod);
plot1(ADXv,"ADX");
plot2(DP,"+DI");
plot3(DM,"-DI");
Plot4(ADXsig, "ADX signal");
3. MACD
Input : shortPeriod(12), longPeriod(26), Period(9);
Var : value(0) , macdosc(0) ;
value = MACD(shortPeriod, longPeriod);
macdosc = value-ema(value,Period);
Plot1(value, "MACD");
Plot2(ema(value,Period), "MACDSignal");
PlotBaseLine1(0, "기준선1");
감사합니다.
2019-11-05
257
글번호 133412
지표
답변완료
나스닥 수식인데 항생에 적용하려고 합니다.
나스닥 4분봉과 30분봉으로 매수진입하는 수식인데요...
해당 수식과 같은 형태로 항생에 적용하려고 합니다.
항생은 나스닥과 거래시간이 다르자나요... 항생에 맞는 수식으로 변경 부탁드려요~~
진입횟수의 주기는 오전 10시 15분 - 새벽 1시 50분이며
토요일 새벽 1시 30분에 진입시 강제 청산하는 식을 추가 부탁드림니다.
# 역추세 4+30
Input : RSIPeriod(14),RSI매수값(30),SimPeriod(14),심리도값(20);
Input : N1(1);
Input : EPeriod(50), EPercent(0.3);
Input : RSIPeriod2(14),RSI청산값(76),M1(2);
Input : 즉시익절1(115),즉시손절1(165);
input : 진입횟수(2);
var : BBmd(0),BBup(0),BBdn(0),CCIv(0),entry(0);
var :DNline1(0),RSIV(0),Simri(0),RSIVV(0);
RSIV = RSI(RSIPeriod);
RSIVV = RSI(RSIPeriod2);
Simri = Simrido(SimPeriod);
Dnline1 = EnvelopeDown(EPeriod, EPercent);
if bdate != bdate[1] Then
Entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if entry < 진입횟수 then
{
if data2(countif( RSIV < RSI매수값 and Simri < 심리도값 ,N1 ) == N1 and C < dnline1) Then
buy("매수");
}
if MarketPosition == 1 then
{
if data2(countif( RSIVV > RSI청산값 ,M1 ) == M1 ) Then
ExitLong("RSI청산");
ExitLong("즉시익절1",AtLimit,EntryPrice+PriceScale*즉시익절1);
ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1);
}
2019-11-05
247
글번호 133411
시스템
답변완료
부탁드립니다.
수식 감사드립니다.
AA(-120) 도달 후 -40 까지 될때 진입표시 뒤에 +■를 달고 싶습니다.
작성해 주신 식에서 AA -120 도달 후 +■ 이 시작되고 -40 에서 ■이 없어졌다가
바로다음 -80 이 되면 다시 +■가 추가 됩니다.
-40이 되어 ■이 없어지면 AA(-120) 이 될때까지 +■ 없이 진입표시하고 싶습니다
부탁드립니다.
예시) -120 이하에서 청산표시+★ --> 다음 진입신호에 B2■
-120 부터 -40 도달되면 --> 다음 진입신호에 S1 (■없음)
-40도달 후 다시 -120 될때까지 ■ 표시 없음
(-40도달 후 바로 -80이 되어도 ■ 표시 없음)
tt -40 -80 -120 -160 -130 -100 -70 -40 -80 -50 -20 0
손익★표시 - - ★ ★ ★ - - - - - - -
다음진입신호 B1 B1 B2■ B2■ B2■ S1■ B2■ S1 B1 B2 B2 S1
tt --> -40 -80 -120 -160 -130 -100 -70 -40 -10 0 0
손익★표시 - - ★ ★ ★ - - - - - -
다음진입신호 B1 B1 B2■ B2■ B2■ S1■ B2■ S1 B1 B2 B2
input: AA(-120), BB(-40);
Input : 손절(10),익절(10),익절하락(3);
input : P1(30), P2(120), p3(240);
input : StartTime(090000),EndTime(050000);
var : tx(0),X(false),Tcond(false),tt(0);
var1 = ma(C, P1);
var2 = ma(C, P2);
var3 = ma(C, P3);
######## 진입제한
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime)Then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= Endtime) or
(sdate == sdate[1] and stime >= Endtime and stime[1] < Endtime)Then
{
Tcond = false;
}
## 진입
if Tcond == true and marketposition == 0
and crossup(var1,var2) Then
{
if Condition1 == true and tt <= BB then
buy("B1■");
Else
buy("B1");
}
if Tcond == true and marketposition == 0
and crossdown(var1,var2) Then
{
if Condition1 == true and tt <= BB then
sell("S1■");
Else
sell("S1");
}
if Tcond == true and marketposition == 0
and crossup(var2,var3) and var3[1] < var3 Then
{
if Condition1 == true and tt <= BB then
buy("B2■");
Else
buy("B2");
}
if Tcond == true and marketposition == 0
and crossdown(var3,var4) and var3[1] > var3 Then
{
if Condition1 == true and tt <= BB then
sell("S2■");
Else
sell("S2");
}
## 청산
if MarketPosition == 1 then
{
SetStopTrailing(익절하락,익절,PointStop);
SetStopLoss(손절,PointStop);
}
if MarketPosition == -1 Then
{
SetStopTrailing(익절하락,익절,PointStop);
SetStopLoss(손절,PointStop);
}
if ((sdate != sdate[1] and stime >= Endtime) or
(sdate == sdate[1] and stime >= Endtime and stime[1] < Endtime)) Then
{
if MarketPosition == 1 Then
{
ExitLong("BE6");
}
if MarketPosition == -1 Then
{
ExitShort("SE6");
}
}
if TotalTrades > TotalTrades[1] then
{
if IsExitName("StopLoss",1) == true then
{
tt = tt - 40;
if tt >= 0 Then
{
tt = 0;
Condition1 = false;
}
if tt > AA then
{
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0));
Text_SetSize(tx,20);
}
else
{
Condition1 = true;
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0)+"★");
Text_SetSize(tx,20);
}
}
if IsExitName("StopTrailing",1) == true then
{
tt = tt + 30;
if tt >= 0 Then
{
tt = 0;
X = true;
Condition1 = false;
}
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0));
Text_SetSize(tx,20);
Text_Setstyle(tx,2,2);
//Text_SetSize 폰트 사이즈
//Text_Setstyle 좌우상하 정렬
}
}
2019-11-04
167
글번호 133409
시스템
답변완료
지표추가
아래수식은 장시작시 지표가 나옵니다...
1) 아래지표가 항셍시작시간 10시 15분에 나와서 오후 5시 30분 마감
2) 오후장 시작시간 오후 18시 15분에 나와서 새벽장 마감시까지 나오게 도와주세요
Var : Pivot(0),R1(0),R2(0),S1(0),S2(0);
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
Plot1(Pivot, "피봇포인트");
Plot2(R1, "1차저항");
Plot3(R2, "2차저항");
Plot4(S1, "1차지지");
Plot5(S2, "2차지지");
2019-11-04
170
글번호 133389
지표