답변완료
수식 검토 요청드립니다.
안녕하세요. 운영자님
다음 시스템은 한번 진입시 3계약 진입하여 3번에 걸쳐 나누어 분할 익절하고자 만든 시스템입니다. 뭔가 문제가 있는 것 같은데 검토 부탁드립니다.
또한, 진입조건식에서 매수인 경우 R1 > R2 and R2 > R3 으로 되어 있는데 이것을 기준선 50 이상에서 R1 > R2 and R2 > R3 이 되도록 부탁드립니다.
매도역시 R1 < R2 and R2 < R3 으로 되어 있는데 이것을 기준선 50 이하에서 R1 < R2 and R2 < R3 이 되도록 부탁드립니다.
input : TradingTime(1),StartTime(160000),EndTime(045000),ProfitTickCount1(6),ProfitTickCount2(12),ProfitTickCount3(18),LossTickCount (10);
input : P1(7),P2(14),P3(21);
input : ADXP(14),value(20);
input : af(0.02),maxaf(0.2);
input : Period(50);
input : CumulativeLossTicks(100);
var : R1(0),R2(0),R3(0),AA(0),MM(0),MS(0),SS(0),EE(0), HH(0), LL(0);
var : Xcond(false),N1(0),daypl(0),CumulativeLoss(0);
R1 = RSI(P1);
R2 = RSI(P2);
R3 = RSI(P3);
AA = ADX(ADXP);
SS = sar(af,maxaf);
EE = Ema(C,Period);
if TradingTime == 1 then
condition3 = (stime>=StartTime or stime<=EndTime );
Else if TradingTime == 2 then
condition3 = (stime>=StartTime and stime<=EndTime );
Else
condition3 = true;
if TradingTime == 1 or TradingTime == 2 then
{
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Xcond = false;
N1 = NetProfit;
}
}
else
{
if Bdate != Bdate[1] Then
{
Xcond = false;
N1 = NetProfit;
}
}
CumulativeLoss = PriceScale*CumulativeLossTicks;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] and
(IsExitName("dbl",1) == true or IsExitName("dsl",1) == true) then
Xcond = true;
If MarketPosition == 0 and TotalTrades == TotalTrades[1] and
Condition3 == true and R1 > R2 and R2 > R3 and AA > value and C > SS and C > EE Then
Buy();
If MarketPosition == 0 and TotalTrades == TotalTrades[1] and
Condition3 == true and R1 < R2 and R2 < R3 and AA < value and C < SS and C < EE Then
Sell();
if MarketPosition == 1 Then{
ExitLong("bp1",atlimit,EntryPrice+PriceScale*ProfitTickCount1,"",1,1);
ExitLong("bp2",atlimit,EntryPrice+PriceScale*ProfitTickCount2,"",1,1);
ExitLong("bp3",atlimit,EntryPrice+PriceScale*ProfitTickCount3);
}
if MarketPosition == -1 Then{
ExitShort("sp1",atlimit,EntryPrice-PriceScale*ProfitTickCount1,"",1,1);
ExitShort("sp2",atlimit,EntryPrice-PriceScale*ProfitTickCount2,"",1,1);
ExitShort("sp3",atlimit,EntryPrice-PriceScale*ProfitTickCount3);
}
2024-02-19
1121
글번호 176728
시스템
답변완료
수식수정
아래 수식에 다음 사항을 추가하여 수정하고 싶은데 부탁드립니다.
-모든 이평선은 지수이평으로
-지수이평배열 0봉전 60<120<240
-0봉전 종가가 60지수이평선 돌파
-1봉전 종가대비 0봉전 종가가 5%이상 상승
============================================================================
INPUT : CPeriod(9),기간(20),기준(0),Period(14),배수(2);
VAR : 조건(False),조건1(False),조건2(False),A(0),MM(0),R(0),대금(0);
A=ADX(14);
MM=ma(C,20);
R=RSI(14);
대금=V*(H+O+L+C)/4;
조건=highest(C[1],CPeriod) < C && Crossup(CCI(CPeriod),0);
조건1=
A>20 and A>A[1] and
C>O and C>MM and
대금>2000000000 and
R>0 and R>R[1] and
Crossup(CCI(20),0) and
Crossup(DIPLUS(14),DIMinus(14));
조건2=
crossup(cci(기간),기준)
&& crossup(diplus(period),diminus(period))
&& V>V[1]*배수;
IF 조건 && 조건1 && 조건2 TheN
Find(1);
2024-02-17
950
글번호 176722
종목검색
답변완료
문의 드립니다
input : starttime(110000),endtime(50000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1]and Tcond == true 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;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
input : 익절틱수(100),손절틱수(100);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*5);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen != C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx1",AtMarket);
if NextBarOpen != C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx3",AtMarket);
if NextBarOpen != C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx4",AtMarket);
if NextBarOpen != C Then
{
Buy("b5",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx5",AtMarket);
if NextBarOpen == C Then
{
Buy("b6",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx6",AtMarket);
if NextBarOpen == C Then
{
Buy("b7",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx7",AtMarket);
if NextBarOpen == C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx8",AtMarket);
if NextBarOpen == C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx9",AtMarket);
if NextBarOpen == C Then
{
Buy("b10",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx10",AtMarket);
if NextBarOpen == C Then
{
Buy("b11",AtStop,NextBarOpen+PriceScale*5);
}
ExitLong("bx11",AtMarket);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*5);
}
}
ExitShort("sx",AtMarket);
if NextBarOpen != C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx1",AtMarket);
if NextBarOpen != C Then
{
Sell("s3",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx3",AtMarket);
if NextBarOpen != C Then
{
Sell("s4",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx4",AtMarket);
if NextBarOpen != C Then
{
Sell("s5",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx5",AtMarket);
if NextBarOpen == C Then
{
Sell("s6",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx6",AtMarket);
if NextBarOpen == C Then
{
Sell("s7",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx7",AtMarket);
if NextBarOpen == C Then
{
Sell("s8",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx8",AtMarket);
if NextBarOpen == C Then
{
Sell("s9",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx9",AtMarket);
if NextBarOpen == C Then
{
Sell("s10",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx10",AtMarket);
if NextBarOpen == C Then
{
Sell("s11",AtStop,NextBarOpen-PriceScale*5);
}
ExitShort("sx11",AtMarket);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
--------------
수정된 청산 수식어가 맞는지 문의 드립니다.
2024-02-19
919
글번호 176721
시스템