예스스탁
예스스탁 답변
2021-03-18 11:19:35
안녕하세요
예스스탁입니다.
수식을 검증해 보았지만 에러가 없습니다.
시스템식이므로 시스템 편집창에 작성하셔야 하는 식입니다.
또한 시스템식 새로만들실때 EL에 체크하지 않고 작성하셔야 합니다.
EL모드는 이지랭귀지 문법으로 작성하는 내용으로
해당 문법으로는 저희가 작성해 드리지 않습니다.
즐거운 하루되세요
> 엉덩공주 님이 쓴 글입니다.
> 제목 : 문의
> 검증에러가 뜹니다. 수정부탁드려요
input: P5(20);
VAR : HC(0), HO(0), HH(0), HL(0), MH(0), ML(0), MMH(0), MML(0);
var : T(0);
var : BTL1(0),BTL2(0),BTL3(0),BTL4(0),BTL5(0),BTL6(0);
var : STL1(0),STL2(0),STL3(0),STL4(0),STL5(0),STL6(0);
HC= (C+H+O+L)/4;
HO= AMA(HC[1], 0.5);
HH= MAX(H, HC, HO);
HL= MIN(L, HC, HO);
MH=MA(HC, P5);
ML=MA(HO, P5);
MMH= MAX(MH, ML);
MML= MIN(MH, ML);
if MH > MH[1] Then
T = 1;
if MH < MH[1] Then
T = -1;
#이평상승중 가격이 하락해 이평+1틱 이하의 시세가 발생하면 즉시 매수진입
if T == 1 and MarketPosition <= 0 and L > MH+PriceScale*1 Then
buy("b",atlimit,MH+PriceScale*1,4);
#이평하락중 가격이 상승해 이평-1틱 이상의 시세가 발생하면 즉시 매도진입
if T == -1 and MarketPosition >= 0 and L > MH+PriceScale*1 Then
sell("s",atlimit,MH+PriceScale*1,4);
if MarketPosition == 1 Then{
ExitLong("BP1",Atlimit,EntryPrice+PriceScale*5,"",Floor(MaxContracts*(1/4)),1);
ExitLong("BP2",Atlimit,EntryPrice+PriceScale*10,"",Floor(MaxContracts*(1/4)),1);
ExitLong("BP3",Atlimit,EntryPrice+PriceScale*15,"",Floor(MaxContracts*(1/4)),1);
ExitLong("BP4",Atlimit,EntryPrice+PriceScale*20);
ExitLong("BL1",AtStop,EntryPrice-PriceScale*15,"",Floor(MaxContracts*0.5),1);
ExitLong("BL2",AtStop,EntryPrice-PriceScale*20);
TL_Delete(BTL1);
TL_Delete(BTL2);
TL_Delete(BTL3);
TL_Delete(BTL4);
TL_Delete(BTL5);
TL_Delete(BTL6);
BTL1 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*5,sdate,stime,EntryPrice+PriceScale*5);
BTL2 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*10,sdate,stime,EntryPrice+PriceScale*10);
BTL3 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*15,sdate,stime,EntryPrice+PriceScale*15);
BTL4 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*20,sdate,stime,EntryPrice+PriceScale*20);
BTL5 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*15,sdate,stime,EntryPrice-PriceScale*15);
BTL6 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*20,sdate,stime,EntryPrice-PriceScale*20);
TL_SetColor(BTL1,RED);
TL_SetColor(BTL2,RED);
TL_SetColor(BTL3,RED);
TL_SetColor(BTL4,RED);
TL_SetColor(BTL5,BLUE);
TL_SetColor(BTL6,BLUE);
}
if MarketPosition == -1 Then{
ExitShort("SP1",Atlimit,EntryPrice-PriceScale*5,"",Floor(MaxContracts*(1/4)),1);
ExitShort("SP2",Atlimit,EntryPrice-PriceScale*10,"",Floor(MaxContracts*(1/4)),1);
ExitShort("sP3",Atlimit,EntryPrice-PriceScale*15,"",Floor(MaxContracts*(1/4)),1);
ExitShort("SP4",Atlimit,EntryPrice-PriceScale*20);
ExitShort("sL1",AtStop,EntryPrice+PriceScale*15,"",Floor(MaxContracts*0.5),1);
ExitShort("SL2",AtStop,EntryPrice+PriceScale*20);
TL_Delete(STL1);
TL_Delete(STL2);
TL_Delete(STL3);
TL_Delete(STL4);
TL_Delete(STL5);
TL_Delete(STL6);
STL1 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*5,sdate,stime,EntryPrice-PriceScale*5);
STL2 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*10,sdate,stime,EntryPrice-PriceScale*10);
STL3 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*15,sdate,stime,EntryPrice-PriceScale*15);
STL4 = TL_New(EntryDate,EntryTime,EntryPrice-PriceScale*20,sdate,stime,EntryPrice-PriceScale*20);
STL5 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*15,sdate,stime,EntryPrice+PriceScale*15);
STL6 = TL_New(EntryDate,EntryTime,EntryPrice+PriceScale*20,sdate,stime,EntryPrice+PriceScale*20);
TL_SetColor(STL1,RED);
TL_SetColor(STL2,RED);
TL_SetColor(STL3,RED);
TL_SetColor(STL4,RED);
TL_SetColor(STL5,BLUE);
TL_SetColor(STL6,BLUE);
}