커뮤니티

CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 활용할 수 있는지요?

프로필 이미지
즐겁게
2012-12-03 17:45:40
299
글번호 57025
답변완료
CSI는 Welles Wilder의 책에 나오는, Commodity S.e.l.e.c.t.i.o.n Index 입니다. (실렉션은 그냥 점 없이 쓰니까 쓰기금지단어라고 저장이 안 돼서 글자 사이사이에 점을 찍었습니다) ATR와 ADXR을 곱하고 거기에다 margin, commission(수수료) 등을 더 대입하여 만들어지는데, YesLanguage에서 어떻게 구현할 수 있을지 궁금합니다. 특히 증거금, 커미션 수치를 이용할 수 있는 방법에 대해서도 알려 주시면 대단히 감사하겠습니다. 아래: 전의 글들임: 안녕하세요 예스스탁입니다. CSI가 어떤 값을 의미하시는지 모르겠습니다. CSI에 대해 좀더 자세한 내용 부탁드립니다. 즐거운 하루되세요 > 즐겁게 님이 쓴 글입니다. > 제목 : CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 계산할 수 있는지요? > CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 계산할 수 있는지요? CSI를 이용하여 진입하는 어떤 간단한 식이라도 예문을 보여 주시면 대단히 감사하겠습니다. 가령, if CSI>2 then buy();와 같은 식을 쓸 수 있기 위하여 그 앞 부분에는 어떤 로직을 써야 할지요? * 혹시, 밀과 원유 중 CSI 가 더 큰 품목을 1계약 매수. 이런 식을 구현할 수 있을까요? 감사합니다. 참고자료 추가: Commodity S.e.l.e.c.t.i.o.n Index [CSI] Summary: This indicator script measures the trending and volatility characteristics of an underlying symbol. Calculation: CSI(i) = Factor * ADXR(i) * ATR(i) ADXR is the Average Directional Movement Rating ATR is the Average True Range Factor = (MoveValue / Sqrt(Margin)) / (150 + Commission) MoveValue is the value of the minimum size move of the underlying symbol. Margin is the futures contract margin requirement. Commission is the futures contract commission amount. Developer: J. Welles Wilder Interpretation: 1. Strong Trending: When the indicator script is moving upwards the underlying symbol is having stronger trends and with more volatility. 2. Weak Trending: When the indicator script is moving downwards the underlying symbol is having weaker trends and with less volatility.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-12-04 11:43:01

안녕하세요 예스스탁입니다. TS의 수식을 그대로 변환해 올려드립니다. Mrgn에 증거금과 Comm에 수수료는 직접입력하셔야 합니다. inputs: Mrgn(1), Comm(1), Length(10); Variables: K(0), ATR14(0), MyRange(14), Counter(0), TR14(0),ADXR(0),CSI(0); ADXR = ADX(Length); If CurrentBar == 1 Then Begin MyRange = Length; If MyRange > 0 AND Mrgn > 0 AND Comm >= 0 Then Begin K = 100 * (BigPointValue / SquareRoot(Mrgn) / (150 + Comm)); For Counter = 0 To MyRange - 1 Begin TR14 = TR14 + TrueRange[Counter]; End; ATR14 = TR14 / MyRange; CSI = K * (ADXR+ADXR[1])/2 * ATR14; End Else CSI = 0; End Else Begin If MyRange + TrueRange > 0 AND MyRange > 0 Then Begin TR14 = TR14[1] - TR14 / MyRange + TrueRange; ATR14 = TR14 / MyRange; CSI = K * (ADXR+ADXR[1])/2 * ATR14; End; End; plot1(CSI); 즐거운 하루되세요 > 즐겁게 님이 쓴 글입니다. > 제목 : CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 활용할 수 있는지요? > CSI는 Welles Wilder의 책에 나오는, Commodity S.e.l.e.c.t.i.o.n Index 입니다. (실렉션은 그냥 점 없이 쓰니까 쓰기금지단어라고 저장이 안 돼서 글자 사이사이에 점을 찍었습니다) ATR와 ADXR을 곱하고 거기에다 margin, commission(수수료) 등을 더 대입하여 만들어지는데, YesLanguage에서 어떻게 구현할 수 있을지 궁금합니다. 특히 증거금, 커미션 수치를 이용할 수 있는 방법에 대해서도 알려 주시면 대단히 감사하겠습니다. 아래: 전의 글들임: 안녕하세요 예스스탁입니다. CSI가 어떤 값을 의미하시는지 모르겠습니다. CSI에 대해 좀더 자세한 내용 부탁드립니다. 즐거운 하루되세요 > 즐겁게 님이 쓴 글입니다. > 제목 : CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 계산할 수 있는지요? > CSI를 YesGlobal에서 YesLanguage를 이용하여 어떻게 계산할 수 있는지요? CSI를 이용하여 진입하는 어떤 간단한 식이라도 예문을 보여 주시면 대단히 감사하겠습니다. 가령, if CSI>2 then buy();와 같은 식을 쓸 수 있기 위하여 그 앞 부분에는 어떤 로직을 써야 할지요? * 혹시, 밀과 원유 중 CSI 가 더 큰 품목을 1계약 매수. 이런 식을 구현할 수 있을까요? 감사합니다. 참고자료 추가: Commodity S.e.l.e.c.t.i.o.n Index [CSI] Summary: This indicator script measures the trending and volatility characteristics of an underlying symbol. Calculation: CSI(i) = Factor * ADXR(i) * ATR(i) ADXR is the Average Directional Movement Rating ATR is the Average True Range Factor = (MoveValue / Sqrt(Margin)) / (150 + Commission) MoveValue is the value of the minimum size move of the underlying symbol. Margin is the futures contract margin requirement. Commission is the futures contract commission amount. Developer: J. Welles Wilder Interpretation: 1. Strong Trending: When the indicator script is moving upwards the underlying symbol is having stronger trends and with more volatility. 2. Weak Trending: When the indicator script is moving downwards the underlying symbol is having weaker trends and with less volatility.