답변완료
문의드립니다.
종목검색식을 부탁드립니다.
HH = HighestSince(1, date!=date(1), H);
K = Valuewhen(1, date!=date(1), HH(1));
A =
CountSince(
CrossDown(Max(C,O), K),
CrossUp(Min(C,O), K)) == 1;
Dn_date = Valuewhen(1,CrossDown(Max(C,O), K),date);
Up_date = Valuewhen(1,CrossUp(Min(C,O), K), date);
A && !A(1) && Dn_date==Up_date
2023-08-31
1202
글번호 172032
종목검색
답변완료
문의 드립니다
1.
Inputs: PercentRLen(10), OverSold(10), OverBought(90), Trigger(62);
Variables: PcntR(0), AvgValue(0), Setup1(False), Setup2(False);
PcntR = PercentR(PercentRLen);
AvgValue = MA(Close, PercentRLen);
If PcntR < OverSold Then
Setup1 = True;
If PcntR > OverBought Then
Setup1 = False;
If PcntR > OverBought Then
Setup2 = True;
If PcntR < OverSold Then
Setup2 = False;
If Setup1 AND AvgValue > AvgValue[1] AND Crossup(PcntR,Trigger) Then Begin
Setup1 = False;
Buy ("%R_LE");
End;
If Setup2 AND AvgValue < AvgValue[1] AND CrossDown(PcntR, Trigger) Then Begin
Setup2 = False;
ExitLong ("%R_SE");
End;
2.
Inputs: PercentRLen(10), OverSold(10), OverBought(90), Trigger(62);
Variables: PcntR(0), AvgValue(0), Setup1(False), Setup2(False);
PcntR = PercentR(PercentRLen);
AvgValue = MA(Close, PercentRLen);
If PcntR < OverSold Then
Setup1 = True;
If PcntR > OverBought Then
Setup1 = False;
If PcntR > OverBought Then
Setup2 = True;
If PcntR < OverSold Then
Setup2 = False;
If Setup1 AND AvgValue > AvgValue[1] AND Crossup(PcntR,Trigger) Then Begin
Setup1 = False;
ExitShort ("%R_LE");
End;
If Setup2 AND AvgValue < AvgValue[1] AND CrossDown(PcntR, Trigger) Then Begin
Setup2 = False;
Sell ("%R_SE");
End;
------------------
1번 수식어에서 40선 아래에서 매수는 매도 전환
2번 수식어에서 40선 위에서 매도신호는 매수전환의
추가 수식어를 부탁합니다.
3.
input : StartTime(160000),EndTime(50000),진입횟수(10);
input : 익절틱수(400),손절틱수(50);
Inputs: Length(15), Pval(0.05);
var : Tcond(False),entry(0);
Variables: Mom(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
Mom = C- C[Length];
if Tcond == true and entry < 진입횟수 Then
{
If Mom > 0 AND Mom >= Mom[1] AND MarketPosition() <> 1 Then
Buy ("Mom_LE", AtStop, High + Pval);
If Mom < 0 AND Mom <= Mom[1] AND MarketPosition() <> -1 Then
ExitLong ("Mom_SE", AtStop, Low - Pval);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
4.
input : StartTime(160000),EndTime(50000),진입횟수(10);
input : 익절틱수(400),손절틱수(50);
Inputs: Length(10), Pval(0.05);
var : Tcond(False),entry(0);
Variables: Mom(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
Mom = C- C[Length];
if Tcond == true and entry < 진입횟수 Then
{
If Mom > 0 AND Mom >= Mom[1] AND MarketPosition() <> 1 Then
ExitShort ("Mom_LE", AtStop, High + Pval);
If Mom < 0 AND Mom <= Mom[1] AND MarketPosition() <> -1 Then
Sell ("Mom_SE", AtStop, Low - Pval);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
---------------------------
3번 수식어의 Inputs: Length(15), Pval(0.05);
4번 수식어의 Inputs: Length(10), Pval(0.05);
둘을 단일 수식어에 묶어서
3번은 Inputs: Length(15), Pval(0.05);
4번은 Inputs: Length(10), Pval(0.07);
변경해서 수식어 작성을 하고 싶습니다.
늘 감사드립니다.
2023-09-01
915
글번호 172030
시스템
답변완료
문의
국내선물 거래
DayClose(25)를 기준으로 시장을 6등분 하고자 합니다
c < DayClose(25)+maxgap and c > DayClose(25)+mingap
위 식으로 아래 input 변수를 사용하면 되는지요?
DayClose(25)기준 상승범위
input : maxgap(7.50),mingap(0.00);
input : maxgap(15.00),mingap(7.50);
input : maxgap(9999),mingap(15.00);
dayclose(25)기준 하락범위
input : maxgap(0.00),mingap(-7.50);
input : maxgap(-7.50),mingap(-15.00);
input : maxgap(-15.00),mingap(-9999);
2023-09-01
988
글번호 172017
시스템