답변완료
문의 드립니다
1.
해외선물 매매입니다.
전일 하락폭의 50%를 당일 내려갔을때 매수후 +150%에
청산되는 수식어 부탁드립니다.
매매시간은 08시 익일 06시입니다.
2.
아래a,b 별도의 수식어를 하나의 시스템에서 적용하고자 합니다.
a.
Inputs: VtyPercent(0.10),ATRperiod(5);
input : StartTime(80000),EndTime(60000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
-----------------------------------
b.
Inputs: VtyPercent(0.10),ATRperiod(5);
input : StartTime(80000),EndTime(60000);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
If MarketPosition() <> 1 Then
ExitShort("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
sell ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
2025-02-06
325
글번호 187839
시스템
답변완료
문의 드립니다.
예전 게시판을 보니 아래와 같이 smoothed 하이킨아시 수식을 보았습니다.
하이킨아시 캔들을 기준으로 하여 스무스 하이킨아시를 적용 시킨 수식을 부탁 드려도 될
까요? 기간값은 3 , 36 두개의 스무스 하이킨아시 선을 1개의 화면에 동시에 표현하고 싶
습니다.
1) 하이킨아시 캔들 기준 스무스 하이킨 아시 (3)
2) 하이킨아시 캔들 기준 스무스 하이킨 아시 (36)
1),2) 두 개의 스무스 하이킨아시 선을 하나의 화면에 동시에 표현하고 싶습니다.
노고에 고개숙여 감사드립니다.
input : len(10),len2(10);
var : oo(0),cc(0),hh(0),ll(0),col(0);
var : haclose(0),haopen(0),hahigh(0),halow(0);
var : o2(0),h2(0),l2(0),c2(0);
oo=ema(open,len);
cc=ema(close,len);
hh=ema(high,len);
ll=ema(low,len);
haclose = (oo+hh+ll+cc)/4;
haopen = iff(IsNaN(haopen[1]) == true, (oo + cc)/2 , (haopen[1] + haclose[1]) / 2);
hahigh = max (hh, max(haopen,haclose));
halow = min (ll, min(haopen,haclose));
o2=ema(haopen, len2);
c2=ema(haclose, len2);
h2=ema(hahigh, len2);
l2=ema(halow, len2);
col=iff(o2>c2 , red , lime);
PlotPaintBar(h2, l2,o2,c2, "heikin smoothed", col);
2025-02-06
416
글번호 187833
강조
답변완료
수정부탁드립니다.
늘 감사합니다.
아래 지표중
plot5(WT1,"WT1", Red);
plot6(WT2,"WT2", Blue);
이 2개의 plot을 상승 Red ,하락 Blue 로 수정 부탁드립니다.
input : Length(10), avgLength(21);
var : obLevel1(60), obLevel2(53),osLevel1(-60),osLevel2(-53);
var : priceV(0), maV(0), diffMa(0), diffNor(0), diffNorMa(0), WT1(0), WT2(0);
priceV = (H+L+C)/3;
maV = wma(priceV, Length);
diffMa = wma(abs(priceV - maV), Length);
diffNor = (priceV - maV) / (0.015 * diffMa);
diffNorMa = wma(diffNor, avgLength);
WT1 = diffNorMa;
WT2 = ma(WT1,4);
plot1(obLevel1,"obLevel1", red);
plot2(osLevel1,"osLevel1", green);
plot3(obLevel2,"obLevel2", red);
plot4(osLevel2,"osLevel2", green);
plot5(WT1,"WT1", Red);
plot6(WT2,"WT2", Blue);
plot7(WT1-WT2,"WT1-WT2", iff(WT1-WT2>0, RGB(150,0,0), RGB(0,0,200)));
plot8(0,"0선", blue);
if CrossUp(WT1, WT2) and WT1[1] < osLevel2 Then
plot9(WT1, "CrossUp", YELLOW);
if CrossDown(WT1, WT2) and WT1[1] > obLevel2 Then
plot10(WT1, "CrossDn", CYAN);
2025-02-05
366
글번호 187832
지표