답변완료
수식부탁드립니다
수식부탁드립니다.
매수와 청산식은 아래와 같고 하루 한번만 진입합니다
if countif(marketposition==0 && crossup(c,ma(c,5)) && dayindex()>0, dayindex())==1 &&
marketposition==0 && crossup(c,ma(c,5)) && dayindex()>0 then buy();
if marketposition==1 && crossdown(c,ma(c,5)) && dayindex()>0 then exitlong();
위와 동일한 식을 참조종목에 적용하고
본봉목의 수익과 참조종목의 수익의 합이 30틱이면 본종목을 청산할수 있도록
수식부탁드립니다.
2024-01-23
1199
글번호 176017
시스템
답변완료
수식수정
Input : Period(60), MultiD(2);
var : MAv(0),BBup(0),BBdn(0),T(0);
MAv = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if CrossUp(c,mav) Then
T = 1;
if CrossDown(c,mav) Then
T = -1;
if T == -1 and abs(mav-bbdn) <= PriceScale*10 Then
{
if NextBarOpen < mav Then
Buy("b1",AtStop,mav);
if C > C[1] Then
Buy("b2");
}
if T == 1 and abs(mav-bbdn) <= PriceScale*10 Then
{
if NextBarOpen > mav Then
Sell("s1",AtStop,mav);
if C < C[1] Then
Sell("s2");
}
85500글입니다
lnput
볼밴20.2
이평 60
이평선과 볼밴선 폭 10틱이내.
매수
가격이 60이평선을 하락이나 터치후
60이평을 돌파상승시
첫양봉에서 진입
조건 이평 60선과 볼밴하단선이 -+ 10틱이내일때.
이평60선과 볼밴하단선폭이 반드시 조건에 들때진입
청산및손절
가격이
60이평을 가격이돌파하락시.
매도
가격이 60이평선을 돌파상승이나 터치후
60이평선 아래로 하락시 첫음봉에서 진입
청산 60이평선을 가격이 돌파상승시.
2024-01-24
818
글번호 176009
시스템
답변완료
시스템식 부탁드립니다.
항상 도움 주셔서 감사합니다.
아래 시스템식에서 불타기의 청산조건을
마지막 진입가격 대비 outgap(20) 만큼 하락시 청산하는
조건으로 시스템식 변경 부탁드립니다.
감사합니다.
input : Pst(1);
input : gap(20), outgap(20), gapmulti(0.7), multi(0.7), pt(20), sl(200);
var : vol(0),v1(0),t(0),b(0),s(0);
var : line1(0), line2(0);
value1 = gap/PointValue;
value2 = pt/PointValue;
value3 = sl/PointValue;
value4 = outgap/PointValue;
line1 = ma(c,10) ;
line2 = ma(c,20) ;
if pst == 1 Then
{
if MarketPosition == 0 and TotalTrades == TotalTrades[1] Then
{
vol = 1;
Buy("b",OnClose,Def,vol);
}
if MarketPosition == 1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
v1 = CurrentContracts-CurrentContracts[1];
if MaxEntries == 1 Then
t = value1 ;
Else
t = t+Round(t*gapmulti,0);
if LatestEntryName(0) == "upb" Then
b = 1;
if LatestEntryName(0) == "dnb" Then
b = -1;
}
vol = Round(v1+v1*multi,0);
Buy("dnb",AtLimit,EntryPrice(0)-PriceScale*(value1*MaxEntries),vol);
Buy("upb",AtStop,EntryPrice(0)+PriceScale*(value1*MaxEntries),vol);
if b == -1 Then
{
ExitLong("bx11",AtLimit,AvgEntryPrice+PriceScale*Value2);
ExitLong("bx12",AtLimit,EntryPrice);
}
if b == 1 Then
{
ExitLong("bx21",AtStop,AvgEntryPrice-PriceScale*Value2);
ExitLong("bx22",AtStop,EntryPrice);
}
}
Else
b = 0;
}
if pst == -1 Then
{
if MarketPosition == 0 and TotalTrades == TotalTrades[1] Then
{
vol = 1;
Sell("s",OnClose,Def,vol);
}
if MarketPosition == -1 Then
{
if CurrentContracts > CurrentContracts[1] Then
{
v1 = CurrentContracts-CurrentContracts[1];
if MaxEntries == 1 Then
t = value1 ;
Else
t = t+Round(t*gapmulti,0);
if LatestEntryName(0) == "ups" Then
s = 1;
if LatestEntryName(0) == "dns" Then
s = -1;
}
vol = Round(v1+v1*multi,0);
Sell("ups",AtLimit,EntryPrice(0)+PriceScale*(value1*MaxEntries),vol);
Sell("dns",AtStop,EntryPrice(0)-PriceScale*(value1*MaxEntries),vol);
if s == 1 Then
{
ExitShort("sx11",AtLimit,AvgEntryPrice-PriceScale*Value2);
ExitShort("sx12",AtLimit,EntryPrice);
}
if s == -1 Then
{
ExitShort("sx21",AtStop,AvgEntryPrice+PriceScale*Value2);
ExitShort("sx22",AtStop,EntryPrice);
}
}
Else
s = 0;
}
2024-01-23
828
글번호 175979
시스템
답변완료
문의드립니다.
다음 수식을 종목검색식으로 부탁드립니다.
(1)
A1 = (npredayclose(20)+npredayclose(19)+npredayclose(18)+npredayclose(17)+npredayclose(16)+npredayclose(15)+npredayclose(14)+npredayclose(13)+npredayclose(12)+npredayclose(11)+npredayclose(10)+npredayclose(9)+npredayclose(8)+npredayclose(7)+npredayclose(6)+npredayclose(5)+npredayclose(4)+npredayclose(3)+npredayclose(2)+npredayclose(1))/20;
B = ma(C, 20);
D = CrossDown(B, ,A1);
K = Valuewhen(1, D, (A1+C)/2);
CrossUp(C, K)
(2)
A = ma(C, 5);
B = ma(C, 20);
An= CrossDown(A, B);
k1 = Valuewhen(1, An, (C+ B)/2);
CrossUp(C, K1)
(3)
period 5
period1 10
period2 20
period3 60
percent 0.7
mult 1.1
prv 100
k1=avg(c,period);
k2=avg(c,period1);
k3=avg(c,period2);
k4=avg(c,period3);
k5=k1/k3*100;
k6=EnvelopeUp(Period,Percent);
CrossUp(c,k6) && c>k3 && c>k4 &&
k3>k4 && c>o && c>c(1)*mult &&
c>h(1) &&( k5(1)<prv or k5(2)<prv or
k5(3)<prv or k5(4 )<prv or
k5(5)<prv )
2024-01-22
903
글번호 175964
종목검색