커뮤니티

예스랭귀지 Q&A

글쓰기

wscamtk 님에 의해서 삭제되었습니다.

프로필 이미지
wscamtk
2022-09-08
18
글번호 162079
지표

시고르시고르 님에 의해서 삭제되었습니다.

프로필 이미지
시고르시고르
2022-09-08
4
글번호 162078
지표
답변완료

문의드립니다.

감사합니다. 아래수식 수정해주시면 감사하겠습니다. 아래 수식에 강제청산 200틱 손절을 포함해주시고, 강제청산후 다음 진입신호가 같은 방향이면 진입하지 않고, 3번째 진입신호부터는 같은방향도 진입가능하게 부탁드립니다. 강제청산후 다음 진입신호가 다른 방향이면 무조건 진입가능 합니다. 감사합니다.... input : StartTime(83000),EndTime(65000); Input : rsiP(9),과매수(80),과매도(20),maP(120); var : RSIV(0),mav(0); var : Tcond(false); RSIV = RSI(rsiP); mav = ma(c,mav); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { if MarketPosition >= 0 and CrossUp(RSIV,과매수) and IsExitName("sx1",1) == False Then Sell("s"); if MarketPosition == -1 Then { if CountIf(CrossUp(RSIV,과매수),BarsSinceEntry) == 4 Then ExitShort("sx1"); if CrossUp(C,mav) Then ExitShort("sx2"); } if MarketPosition <= 0 and CrossDown(RSIV,과매도) and IsExitName("bx1",1) == False Then Buy(); if MarketPosition == 1 Then { if CountIf(CrossDown(RSIV,과매도),BarsSinceEntry) == 4 Then ExitLong("bx1"); if CrossDown(C,mav) Then ExitShort("bx2"); } }
프로필 이미지
하늘북
2022-09-07
952
글번호 162077
시스템

hakona 님에 의해서 삭제되었습니다.

프로필 이미지
hakona
2022-09-08
167
글번호 162076
지표
답변완료

2개 전략

안녕하세요~~^^ 동일 종목에서 2개 전략 사용시(buy, sell) 같은 변수명이 있으면 에러가 발생하나요?
프로필 이미지
코퍼
2022-09-07
1176
글번호 162073
시스템
답변완료

안녕하세요

안녕하세요 1. 아래 수식은 진입가 대비 10% 수익시 1계약 청산식입니다. 진입한(보유) 수량의 % 비율로 청산수식을 수정부탁드립니다. 예시는 보유 수량의 50%씩 두번 분할청산 되는 수식으로 부탁드려요. ExitLong("bp1",AtLimit,EntryPrice*1.1,def,10); 2. 아래 수식으로 손절을 하는데요 분할진입시 익절,손절이 개별 진입시점기준으로 분산됨니다. ex) 손절 1%예시 1차 진입가 100 일때 99 손절 , 2차 진입가 200 일때 198 손절 손절도 분할로 익절도 동일하게 분할 처리 됨니다. 익절,손절을 평균가로 하는 예제수식 부탁드립니다. LC(손절변수) SetStopLoss(LC,PercentStop); ----------------------------------------------------------------- If MarketPosition <= 0 and value1 == 1 and Condition1 == true Then Buy("B1",AtStop,고[2,1]-PriceScale*a,1); if MarketPosition == 1 Then { if L > EntryPrice*0.99 Then Buy("bb2",AtLimit,EntryPrice*0.99,1); if L > EntryPrice*0.98 Then Buy("bb3",AtLimit,EntryPrice*0.98,1); if L > EntryPrice*0.97 Then Buy("bb4",AtLimit,EntryPrice*EntryPrice*0.97,1); if L > EntryPrice*0.96 Then Buy("bb5",AtLimit,EntryPrice*EntryPrice*0.96,1); } if MarketPosition == 1 Then { if H < EntryPrice*1.02 Then ExitLong("bp1",AtLimit,EntryPrice*1.02,def,1); if H < EntryPrice*1.04 Then ExitLong("bp2",AtLimit,EntryPrice*1.04,def,1); if H < EntryPrice*1.06 Then ExitLong("bp3",AtLimit,EntryPrice*1.06,def,1); if H < EntryPrice*1.08 Then ExitLong("bp4",AtLimit,EntryPrice*1.08,def,1); if H < EntryPrice*1.10 Then ExitLong("bp5",AtLimit,EntryPrice*1.10,def,1); } SetStopLoss(LC,PercentStop); 감사합니다.
프로필 이미지
상중하
2022-09-07
1214
글번호 162051
시스템
답변완료

문의드립니다

var11=var11+Upticks; var12=var12+Downticks; var13=var11-var12; 이런식으로 업틱과 다운틱의 차이를 구하려고 합니다. 틱챠트에서 최초 10개 봉의 var13 평균값을 구하는 수식 부탁드립니다
프로필 이미지
고스트
2022-09-07
988
글번호 162050
시스템
답변완료

문의 드립니다

input : 익절틱수(160),손절틱수(30); var1 = ma(C,10); Var2 = ma(C,1); if NextBarSdate != sDate and var1 > Var2 Then { if NextBarOpen > C Then Buy("b",AtStop,NextBarOpen+PriceScale*-20); if NextBarOpen < C Then Buy("bx",AtStop,NextBarOpen-PriceScale*-20); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,5); Var2 = ma(C,1); if NextBarSdate != sDate and var1 > Var2 Then { if NextBarOpen > C Then Buy("b1",AtStop,NextBarOpen+PriceScale*-20); if NextBarOpen < C Then Buy("bx1",AtStop,NextBarOpen-PriceScale*-20); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,4); Var2 = ma(C,1); if NextBarSdate != sDate and var1 > Var2 Then { if NextBarOpen > C Then Buy("b2",AtStop,NextBarOpen+PriceScale*-20); if NextBarOpen < C Then Buy("bx2",AtStop,NextBarOpen-PriceScale*-20); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,1); Var2 = ma(C,5); if NextBarSdate != sDate and var1 > Var2 Then { if NextBarOpen > C Then Buy("b3",AtStop,NextBarOpen+PriceScale*-20); if NextBarOpen < C Then Buy("bx3",AtStop,NextBarOpen-PriceScale*-20); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); --------------- 위 수식어에 60선 아래 진입신호금지를 추가 부탁드립니다. ------------------------------------------------------------------- input : 익절틱수(120),손절틱수(30); var1 = ma(C,1); Var2 = ma(C,5); if NextBarSdate != sDate and var1 < Var2 Then { if NextBarOpen > C Then Sell("s",AtStop,NextBarOpen+PriceScale*-18); if NextBarOpen < C Then Sell("sx",AtStop,NextBarOpen-PriceScale*-18); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,3); Var2 = ma(C,7); if NextBarSdate != sDate and var1 < Var2 Then { if NextBarOpen > C Then Sell("s1",AtStop,NextBarOpen+PriceScale*-18); if NextBarOpen < C Then Sell("sx1",AtStop,NextBarOpen-PriceScale*-18); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,5); Var2 = ma(C,10); if NextBarSdate != sDate and var1 < Var2 Then { if NextBarOpen > C Then Sell("s2",AtStop,NextBarOpen+PriceScale*-18); if NextBarOpen < C Then Sell("sx2",AtStop,NextBarOpen-PriceScale*-18); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); var1 = ma(C,7); Var2 = ma(C,1); if NextBarSdate != sDate and var1 < Var2 Then { if NextBarOpen > C Then Sell("s3",AtStop,NextBarOpen+PriceScale*-18); if NextBarOpen < C Then Sell("sx3",AtStop,NextBarOpen-PriceScale*-18); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); --------------------- 위 수식어에 60선 위 진입신호금지를 추가 부탁드립니다.
프로필 이미지
푸른
2022-09-07
944
글번호 162049
시스템
답변완료

변수배치, 에러

안녕세요~ -Inputs 과 Vars를 문장 최상단에 배치하지 않고 변수 사용문장 상단에 각각 배치해도 되는지요?? 예시> Inputs Vars 문장1 Inputs Vars 문장2 Inputs Vars 문장3
프로필 이미지
코퍼
2022-09-07
937
글번호 162048
시스템
답변완료

해외선물 자금관리 (계약수 조절) 수식 문의좀 드립니다.

안녕하세요 항상 고생이 많으십니다. 예스글로벌 해외선물 시스템 트레이딩 수식 문의드립니다. 매수매도 진입전략만 운용하다가 계약수를 매번 손으로 조정하기가 어려워서 수식으로 자동화시키려고 하는데요, 쓰려고하는 자금관리기법은 흔히 알려진 윌리엄스 자금관리 방식입니다. 계좌 총 잔고가 늘어날수록 계약수를 늘이고 계좌 잔고가 줄어들수록 계약수를 줄이는 방식인데요 (최소 1계약은 유지) 안전마진 = MDD + Micro e-mini나스닥 현재 증거금 가 되어서 Netprofit이 안전마진만큼 쌓이면 1계약을 추가하는 방식입니다. 반대로 운용중에 안전마진만큼 손해가 발생하면 1계약을 줄입니다. 이 내용을 토대로 수식을 작성하려고하는데, 1. MDD는 MaxIDDrawDown으로 불러올 수 있던데, 이건 포인트 기준으로 불러와지는 건가요? 아니면 거래통화인 USD기준으로 불러와 지는건지 헷갈립니다. 2. GetUnclearedDeposits 함수는 예탁총액을 불러온다고 하는데, 이것도 usd기준인지 원화 기준인지 궁금합니다. 또한 netprofit은 포인트 기준인가요? 3. 위의 윌리엄스 자금관리 기법을 적용하려면 수식을 어떤식으로 작성해야할지.. 예제한번만 부탁드립니다. 예시가 있으면 그 이후에는 응용해서 할 수 있을 것 같은데 조금 막연하네요 바쁘신데 감사드립니다!
프로필 이미지
911gt3rs
2022-09-07
1059
글번호 162047
시스템