답변완료
수식 문의 드립니다
1. 지표
input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4);
var : HH(0),LL(0);
if date > date[1]+1 Then{
HH = H;
LL = L;
}
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per1/100));
var2 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per2/100));
var3 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per3/100));
var4 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per4/100));
var5 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per5/100));
plot1(HH,"H");
plot2(var1,"23.6");
plot3(var2,"38.2");
plot4(var3,"50.0");
plot5(var4,"61.8");
plot6(var5,"76.4");
plot7(LL,"L");
----------------
위 지표를 이용한 아래 시스템 작성을 부탁드립니다.
매수 plot2 청산 plot6
매도 plot2 청산 plot6
매매시간 08 : 00 ~ 익일 05 :00
손절 100틱
-----------------------------------
input : starttime(110000),endtime(500000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
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 NextBarSdate == sDate Then
{
if NextBarOpen >= C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*20);
Sell("s2",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen <= C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
if NextBarSdate == sDate Then
{
if NextBarOpen <= C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*20);
Sell("s3",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen >= C Then
{
ExitLong("bx3",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx3",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("ssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ssss1",AtStop,EntryPrice+10); }
if NextBarSdate != sDate Then
{
if NextBarOpen <= C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*20);
Sell("s4",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen >= C Then
{
ExitLong("bx4",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx4",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("sssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sssss1",AtStop,EntryPrice+10); }
진입 매수,매도1회 청산은 익일 5시의 수식어를 부탁드립니다.
2022-11-10
1181
글번호 163684
시스템
답변완료
어제 익절후 재진입에서요...
어제 가르쳐주신 참고 수식을 테스트 해보았는데요,,,잘 연출이 안되서요,,
수식으로 말고 일단, 시스템트레이딩 설정---> 강제청산--->목표수익(20pt)로 설정을 해놓고,
Q1; 예스랭귀지로 buy(sell)진입후 위에창세팅에서 익절이 된후,
다시 buy(sell)진입은 안되고,
이후에 sell(buy) 에서만 진입하는
수식만 넣고 싶습니다.
Q2; 만약 매수(매도)진입후 다음 매수(매도) 신호가 나올시,
기존포지션을 청산하고 다시 진입하는 수식이 궁금합니다.
2022-11-10
916
글번호 163681
시스템