답변완료
파라볼릭 쓰리봉 변수
Input : af(0.02), maxAF(0.2),상(1),하(1);
Var : Sarv(0),tl(0),T(0);
Sarv = sar(af,maxAF);
If crossup(c,Sarv) Then
{
T = 1;
}
else if CrossDown(C,sarv) Then
{
T = -1;
value1 = Sarv;
value2 = value1[1];
value3 = value2[1];
Condition2 = False;
if value1 <= value2+PriceScale*상 and value1 >= value2-PriceScale*하 and
value2 <= value3+PriceScale*상 and value2 >= value3-PriceScale*하 and value3 > 0 Then
{
Condition2 = true;
TL = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Blue);
TL_SetSize(TL,0.5);
}
}
Else
{
if T == -1 Then
{
if sarv > value1 Then
{
value1 = sarv;
if Condition2 == False and value1 <= value2+PriceScale*상 and value1 >= value2-PriceScale*하 and
value2 <= value3+PriceScale*상 and value2 >= value3-PriceScale*하 and value3 > 0 Then
{
Condition2 = true;
TL = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Blue);
TL_SetSize(TL,0.5);
}
}
}
}
1.지표:상하 변수를, 0.25p 내에서 쓰리봉 형성으로 수정.
단,마지막 3봉은, 직전 2봉의 고점과 같거나 작아야 함. 1봉과는 무관.
변수가 상과 하가 0.25p씩 분리된게 아니고 세고점의 전체폭이 0.25p 내에 들때 쓰리봉.
2.시스템:쓰리봉에 매도,양전환시 매도청산. 감사합니다.
2022-11-08
1381
글번호 163595
지표
답변완료
수식 문의
아래는 이평을 적용한 하캔아쉬 지표 입니다.
아래 지표를 활용하여
이평 기간값이 다른
이평적용 하캔아쉬 1
이평적용 하캔아쉬 2
이평적용 하캔아쉬 3
이평적용 하캔아쉬 4
이평적용 하캔아쉬 5
각 다섯개를 설정한 다음
다섯개중
세개가 양봉이면 매수
세개가 음봉이면 매도하는 수식을 얻고 싶습니다.
##### 아래 #######
#Heiken Ashi 시고저종
if CurrentBar > 1 then {
haClose = (Open+High+Low+Close)/4;
haOpen = (haOpen[1] + haClose[1])/2 ;
haHigh = Max(High, haOpen, haClose);
haLow = Min(Low, haOpen, haClose) ;
}
#HeiKen Ashi 이동평균
if CurrentBar > 20 then {
if ma(haClose,period) > ma(haOpen,period) Then{
plot1((haHigh-haClose)+ma(haClose,period),"TailUp",RED); //고가
plot2(ma(haClose,period),"BodyUP",RED); //종가
plot3(ma(haOpen,period)-PriceScale ,"BodyDelete",RGB(1,1,1)); //pricescale은 차트 그릴때 몸통이 표시되지 않는 경우가 있어서 넣음
plot4(ma(haOpen,period),"BodyDown",RED); //시가
plot5(ma(haOpen,period)-(haOpen-haLow),"TailDown",RED); //저가
plot6(ma(haOpen,period)-(haOpen-haLow),"TailDelete",RGB(1,1,1));
}
else {
plot1((haHigh-haOpen)+ma(haOpen,period),"TailUp",RGB(51,102,255)); //고가
plot2(ma(haOpen,period),"BodyUP",RGB(51,102,255)); //시가
plot3(ma(haClose,period)-PriceScale,"BodyDelete",RGB(1,1,1)); //종가
plot4(ma(haClose,period),"BodyDown",RGB(51,102,255));
plot5(ma(haClose,period)-(haClose-haLow),"TailDown",RGB(51,102,255)); //저가
plot6(ma(haClose,period)-(haClose-haLow),"TailDelete",RGB(1,1,1));
}
}
2022-11-07
1210
글번호 163594
시스템
답변완료
파라볼릭 쓰리바닥 변수
Input : af(0.02), maxAF(0.2),상(1),하(1);
Var : Sarv(0),tl(0),T(0);
Sarv = sar(af,maxAF);
If crossup(c,Sarv) Then
{
T = 1;
var1 = Sarv;
Var2 = var1[1];
Var3 = var2[1];
Condition1 = False;
if var1 <= var2+PriceScale*상 and var1 >= var2-PriceScale*하 and
var2 <= var3+PriceScale*상 and var2 >= var3-PriceScale*하 and var3 > 0 Then
{
Condition1 = true;
TL = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
}
}
else if CrossDown(C,sarv) Then
{
T = -1;
}
Else
{
if T == 1 Then
{
if sarv < var1 Then
{
var1 = sarv;
if Condition1 == False and var1 <= var2+PriceScale*상 and var1 >= var2-PriceScale*하 and
var2 <= var3+PriceScale*상 and var2 >= var3-PriceScale*하 and var3 > 0 Then
{
Condition1 = true;
TL = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
}
}
}
}
1.지표:상하 변수를, 0.25p 내에서 쓰리바닥 형성으로 수정.
단,마지막 3바닥은, 직전2바닥의 -1틱과 같거나 -1틱보다 커야함.
2.시스템:쓰리바닥에 매수,음전환시 매수청산. 감사합니다.
2022-11-07
1581
글번호 163593
지표
답변완료
문의 드립니다.
input : starttime(140000),endtime(550000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
}
if h > hh Then
hh = h;
if l < ll Then
ll = l;
if tcond == true and h1 > 0 and l1 > 0 then
{
if crossup(C,l1+(h1-l1)*1.000+PriceScale*n) Then
buy();
if crossup(C,l1-(h1-l1)*0.618+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.500+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.236+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.000+PriceScale*n) Then
buy();
if CrossDown(C,l1+(h1-l1)*1.000-PriceScale*n) Then
sell();
if CrossDown(C,l1-(h1-l1)*0.618-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.500-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.236-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.000-PriceScale*n) Then
sell();
}
if MarketPosition == 1 then
{
if crossup(c,h1+PriceScale*10) Then
exitlong();
if CrossDown(c,l1-PriceScale*10) Then
exitlong();
}
if MarketPosition == -1 then
{
if crossup(c,h1+PriceScale*10) Then
ExitShort();
if CrossDown(c,l1-PriceScale*10) Then
ExitShort();
}
위 수식어에 아침 06시00분에 강제청산되는식을 부탁드립니다.
--------------------------------------------
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
if NextBarOpen > C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*10);
Sell("s3",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx3",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx3",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("ssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ssss1",AtStop,EntryPrice+10);
if NextBarOpen > C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*10);
Sell("s4",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx4",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx4",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("sssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sssss1",AtStop,EntryPrice+10);
매매시간 (09:00~ 익일 05:55) 추가를 부탁드립니다.
2022-11-08
1329
글번호 163589
시스템
답변완료
문의 드립니다.
input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4);
var : HH(0),LL(0);
if date > date[1]+1 Then{
HH = H;
LL = L;
}
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per1/100));
var2 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per2/100));
var3 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per3/100));
var4 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per4/100));
var5 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per5/100));
plot1(HH,"H");
plot2(var1,"23.6");
plot3(var2,"38.2");
plot4(var3,"50.0");
plot5(var4,"61.8");
plot6(var5,"76.4");
plot7(LL,"L");
-----------------------------------------------
위 피보나치 지표식을 아래 시스템에 접목하고 싶습니다.
input : starttime(101500),endtime(550000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
}
if h > hh Then
hh = h;
if l < ll Then
ll = l;
if tcond == true and h1 > 0 and l1 > 0 then
{
if crossup(C,l1+(h1-l1)*1.000+PriceScale*n) Then
buy();
if crossup(C,l1-(h1-l1)*0.618+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.500+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.236+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.000+PriceScale*n) Then
buy();
if CrossDown(C,l1+(h1-l1)*1.000-PriceScale*n) Then
sell();
if CrossDown(C,l1-(h1-l1)*0.618-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.500-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.236-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.000-PriceScale*n) Then
sell();
}
if MarketPosition == 1 then
{
if crossup(c,h1+PriceScale*10) Then
exitlong();
if CrossDown(c,l1-PriceScale*10) Then
exitlong();
}
if MarketPosition == -1 then
{
if crossup(c,h1+PriceScale*10) Then
ExitShort();
if CrossDown(c,l1-PriceScale*10) Then
ExitShort();
}
2022-11-08
952
글번호 163586
시스템