커뮤니티

문의

프로필 이미지
엉덩공주
2021-03-17 22:06:50
908
글번호 147187
답변완료
검증에러가 뜹니다. 수정부탁드려요 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); }
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

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); }
프로필 이미지

엉덩공주

2021-03-18 11:31:52

전 이렇게 뜹니다 어떻게 해결해야 하나요
프로필 이미지

예스스탁 예스스탁 답변

2021-03-18 13:16:20

안녕하세요 예스스탁입니다. AMA는 예스랭귀지에 기본으로 제공되는 함수가 아닙니다. 아마 적합이동평균을 사용자함수로 만들어 사용한 것 같습니다. 아래 내용을 사용자함수로 추가하신 후에 검증해 사용하시기 바랍니다. 혹은 사용자가 직접 만들어 사용하는 함수이므로 수식을 구하신 곳 등에 첨부파일등이 있을수도 있습니다. Inputs : Price(Numeric),Period(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(0.6667), Slowest(0.0645), AdaptMA(0); Diff = AbsValue(Price - Price[1]); IF Index <= Period Then AdaptMA = Price; IF Index > Period Then Begin Signal = AbsValue(Price - Price[Period]); Noise = accumN(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Price - AdaptMA[1]); End; ama = AdaptMA; 즐거운 하루되세요 > 엉덩공주 님이 쓴 글입니다. > 제목 : Re : Re : 문의 > 전 이렇게 뜹니다 어떻게 해결해야 하나요