예스스탁
예스스탁 답변
2021-08-12 11:31:04
안녕하세요
예스스탁입니다.
현재 수식은 반대진입에 의해 청산하고 진입하는 스위칭 수식입니다.
올려주신 내용이면 청산후 10틱 차이가 발생후 진입해야 하므로
스위칭을 안하고 무포지션에서만 진입하는 내용과 같습니다.
진입후 반대조건이 만족하면 청산만 하게 하고
이후 청산가와 10틱이상 차이가 난 상태에서 조건만족시 진입하게 수정해 드립니다.
Input : Period1(1), Period2(15), Period3(30), Period4(60), Period5(120),period6(240),Period7(480), Period8(960), Period9(1920), Period10(3840),period11(7680);
input : N틱(10);
var : Sma1(0),Sma2(0),Sma3(0),Sma4(0),Sma5(0),sma6(0),Sma7(0),Sma8(0),Sma9(0),Sma10(0),sma11(0),OBVV(0),PositiveVolumeIndex(0),dpo(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);
Sma9 = ma(C,Period9);
Sma10 = ma(C,Period10);
sma11 = ma(c,period11);
if sma1 < sma6 -pricescale*10 and
sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 <sma5 and sma5 and
sma5 < sma6 and sma6 < sma7 and CrossDown (sma1,sma2) Then
{
if MarketPosition == 0 Then
{
if TotalTrades == 0 or (TotalTrades >= 1 and abs(C-ExitPrice(1)) >= PriceScale*N틱) Then
Buy ("종+");
}
if MarketPosition == -1 Then
ExitShort("sx1");
}
if MarketPosition == 0 and sma1 > sma6 +pricescale*10 and
sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and
sma5 > sma6 and sma6 > sma7 and CrossUp(sma1,sma2) Then
{
if MarketPosition == 0 Then
{
if TotalTrades == 0 or (TotalTrades >= 1 and abs(C-ExitPrice(1)) >= PriceScale*N틱) Then
Sell ("종-");
}
if MarketPosition == 1 Then
ExitLong("bx1");
}
if MarketPosition == 0 and sma1 < sma6 -pricescale*9 and
sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 <sma5 and sma5 and
sma5 < sma6 and sma6 < sma7 and sma7 < sma8 and sma8 < sma9 and sma9 < sma10 and sma10 < sma11 and
CrossDown (sma1,sma2) Then
{
if MarketPosition == 0 Then
{
if TotalTrades == 0 or (TotalTrades >= 1 and abs(C-ExitPrice(1)) >= PriceScale*N틱) Then
Buy ("종수");
}
if MarketPosition == -1 Then
ExitShort("sx2");
}
if MarketPosition == 0 and sma1 > sma6 +pricescale*9 and
sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and
sma5 > sma6 and sma6 > sma7 and sma7 > sma8 and sma8 > sma9 and sma9 > sma10 and sma10 > sma11 and
CrossUp (sma1,sma2) Then
{
if MarketPosition == 0 Then
{
if TotalTrades == 0 or (TotalTrades >= 1 and abs(C-ExitPrice(1)) >= PriceScale*N틱) Then
Sell ("종도");
}
if MarketPosition == 1 Then
ExitLong("bx2");
}
SetStopTrailing(PriceScale*3,PriceScale*6,PointStop);
SetStopLoss(PriceScale*30,PointStop);
즐거운 하루되세요
> tnsflwls 님이 쓴 글입니다.
> 제목 : 시스템 작성의뢰
> 수고 하십니다 !
시스템 수식이 매매를 체결하여 청산을 한 다음에 매매를 다시
체결을 하는 것은 10틱 이상 차이가 났을떄 (예를 들자면 매도 체결을 하여 매수 청산을
한다음 매수 청산 틱에서 10틱 이상(상승 하락 관계없이) 차이가 나고 수식 조건이 되면
매매를 체결 하는 수식을 부탁 드립니다.
수고 하세요 ~~~
Input : Period1(1), Period2(15), Period3(30), Period4(60), Period5(120),period6(240),Period7(480), Period8(960), Period9(1920), Period10(3840),period11(7680);
var : Sma1(0),Sma2(0),Sma3(0),Sma4(0),Sma5(0),sma6(0),Sma7(0),Sma8(0),Sma9(0),Sma10(0),sma11(0),OBVV(0),PositiveVolumeIndex(0),dpo(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);
Sma9 = ma(C,Period9);
Sma10 = ma(C,Period10);
sma11 = ma(c,period11);
if MarketPosition <= 0 and sma1 < sma6 -pricescale*10 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 <sma5 and sma5 and
sma5 < sma6 and sma6 < sma7 and CrossDown (sma1,sma2) Then Buy ("종+");
if MarketPosition >= 0 and sma1 > sma6 +pricescale*10 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and
sma5 > sma6 and sma6 > sma7 and CrossUp(sma1,sma2) Then Sell ("종-");
if MarketPosition <= 0 and sma1 < sma6 -pricescale*9 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 <sma5 and sma5 and
sma5 < sma6 and sma6 < sma7 and sma7 < sma8 and sma8 < sma9 and sma9 < sma10 and sma10 < sma11 and CrossDown (sma1,sma2) Then Buy ("종수");
if MarketPosition >= 0 and sma1 > sma6 +pricescale*9 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and
sma5 > sma6 and sma6 > sma7 and sma7 > sma8 and sma8 > sma9 and sma9 > sma10 and sma10 > sma11 and CrossUp (sma1,sma2) Then Sell ("종도");
SetStopTrailing(PriceScale*3,PriceScale*6,PointStop);
SetStopLoss(PriceScale*30,PointStop);