답변완료
시스템 수정 의뢰
수고 하십니다 !
Input : Period1(1), Period2(30), Period3(60), Period4(120), Period5(240),period6(480),period7(960),period8(1920);
var : Sma1(0),Sma2(0),Sma3(0),Sma4(0),Sma5(0),sma6(0),sma7(0),sma8(0);
Sma1 = ma(C,Period1);
Sma2 = ma(C,Period2);
Sma3 = ma(C,Period3);
Sma4 = ma(C,Period4);
Sma5 = ma(C,Period5);
sma6 = ma(c,period6);
sma7 = ma(c,period7);
sma8 = ma(c,period8);
if MarketPosition <= 0 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 < sma5 and sma5 < sma6 and
CrossDown (sma1,sma2) Then
Buy("종수");
if MarketPosition >= 0 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and sma5 > sma6 and
CrossUp(sma1,sma2) Then
Sell("종도");
if MarketPosition == 1 and Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*6 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)-PriceScale*3);
if MarketPosition == -1 and lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*6 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*3);
SetStopLoss(PriceScale*30,PointStop);
위 수식에서 매수 는 crossup(sma1,sma2) 을 대입 해야 할것 같은데 신호 가 안나오고
crossdown 을 대입 하면 신호 가 나오네요 ,,,
정배열 된 다음 1 이평선 이 240 이평선 을 crossdown 할때 5 틱 올려서 매도 를 하고
역배열 된 다음 1 이평선 이 240 이평선 을 crossup 할때 5 틱 내려서 매수를 하는
수식 을 부탁 드립니다.
***** 수고 하세요 *****
2021-04-16
668
글번호 148078
시스템
답변완료
수식어를 부탁드립니다
Input : Period(14), LPercent(30), SPercent(70);
Var : value(0);
value = RSI(Period);
# 매수/매도청산
If CrossUP(value, LPercent) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value, SPercent) Then
{
Sell();
}
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
-------------------------------
input : StartTime1(080000),EndTime1(150500),xtime1(151000);
var : Tcond1(false);
if (sdate != sdate[1] and stime >= EndTime1) or
(sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then
Tcond1 = False;
if (sdate != sdate[1] and stime >= StartTime1) or
(sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then
{
Tcond1 = true;
SetStopEndofday(xtime1);
}
INPUT : LENGTH(60);
VAR : upv(0), dnv(0);
upv = HIGHEST(HIGH, LENGTH);
dnv = LOWEST(LOW, LENGTH);
if Tcond1 == true Then
{
if MarketPosition <= 0 and L > dnv Then
Buy("b1",AtLimit,dnv);
if MarketPosition >= 0 and H < upv Then
sell("s1",AtLimit,upv);
}
input : StartTime2(151500),EndTime2(050000),xtime2(055500);
var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0);
var : Tcond2(false);
if sDate != sDate[1] then
SetStopEndofday(xtime2);
if (sdate != sdate[1] and stime >= EndTime2) or
(sdate == sdate[1] and stime >= EndTime2 and stime[1] < EndTime2) Then
Tcond2 = False;
if (sdate != sdate[1] and stime >= StartTime2) or
(sdate == sdate[1] and stime >= StartTime2 and stime[1] < StartTime2) Then
{
Tcond2= true;
SetStopEndofday(0);
}
전환선 = (highest(H,9)+lowest(L,9))/2;
기준선 = (highest(H,26)+lowest(L,26))/2;
선행스팬1 = (전환선[25]+기준선[25])/2;
선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2;
var1 = Disparity(60);
if Tcond2 == true Then
{
if 전환선 > 기준선 and crossup(전환선,선행스팬1) and var1 >= 99 Then
buy("b2");
if MarketPosition == 1 then
{
if 전환선 < 기준선 and CrossDown(전환선,선행스팬2) and var1 >= 99 Then
exitlong("bx2");
}
if 전환선 < 기준선 and CrossDown(전환선,선행스팬1) and var1 <= 100 Then
sell("s2");
if MarketPosition == -1 then
{
if 전환선 > 기준선 and CrossUp(전환선,선행스팬2) and var1 <= 100 Then
ExitShort("sx2");
}
}
-----------------------------
상기 2개의 수식어를 합체 부탁드립니다
2021-04-15
798
글번호 148070
시스템
답변완료
수식어를 부탁드립니다
Input : Period(14), LPercent(30), SPercent(70);
Var : value(0);
value = RSI(Period);
# 매수/매도청산
If CrossUP(value, LPercent) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value, SPercent) Then
{
Sell();
}
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
--------------------------------------
input : P1(5),P2(20);
input : sto1(12),sto2(26),sto3(5);
Input : trixp(12), sigPeriod(9);
INPUTS: LENGTH(5);
input : short(12),long(26),sig(9);
input : StartTime(070000),EndTime(055000);
var : Tcond(false);
var : mav1(0),mav2(0),stok(0),stod(0);
var : trixv(0),trixs(0),TEMA(0),macdo(0);
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;
SetStopEndofday(0);
}
mav1 = ma(C,P1);
mav2 = ma(C,P2);
stok = StochasticsK(sto1,sto2);
stod = StochasticsD(sto1,sto2,sto3);
trixv = trix(trixp);
trixs = ema(trixv,sigPeriod);
TEMA = (3 * Ema(c,LENGTH)) - (3 * Ema(Ema(c,LENGTH),LENGTH)) +
(Ema(Ema(Ema(c,LENGTH),LENGTH),LENGTH));
macdo = macd_osc(short,long,sig);
var1 = 0;
var2 = 0;
if stok > stod Then
var1 = var1+1;
if trixv > trixs Then
var1 = var1+1;
if c > tema Then
var1 = var1+1;
if macdo > 0 Then
var1 = var1+1;
if stok < stod Then
var2 = var2+1;
if trixv < trixs Then
var2 = var2+1;
if c < tema Then
var2 = var2+1;
if macdo < 0 Then
var2 = var2+1;
if Tcond == true Then
{
if crossup(mav1,mav2) and var1 >= 3 Then
buy();
if CrossDown(mav1,mav2) and var2 >= 3 Then
sell();
}
---------------------
상기 2개의 수식어를 합체 부탁드립니다
2021-04-15
775
글번호 148069
시스템