커뮤니티

EntriesToday 함수 Source를 알고 싶어요

프로필 이미지
보스친구
2022-08-09 20:58:21
1615
글번호 161402
답변완료
아래 적은것은 TS의 수식이거든요. YesLanguage로능 어떻게하는것인지 알고 싶어요 --------------------------------------------------------------- { Search Tag: WA-EntriesToday } { NOTE: Information is available only for the most recent 10 positions, so if the target date is set too far back from the current bar, or if the strategy opens and closes positions very frequently, this function may not produce accurate results. } inputs: TargetDate_YYYMMDD( numericsimple ) ; { pass in the date in YYYMMDD format, with the year 2002 being written as 102, etc } variables: Count( 0 ) ; Count = 0 ; for Value1 = 0 to 10 begin if EntryDate( Value1 ) = TargetDate_YYYMMDD then Count = Count + 1 ; end ; EntriesToday = Count ; { ** Copyright © TradeStation Technologies, Inc. All Rights Reserved / 저작권 소유 ** ** TradeStation reserves the right to modify or overwrite this analysis technique with each release. ** }
사용자 함수
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-08-10 14:55:57

안녕하세요? 문의하신 내용은 예스랭귀지로 다음과 같이 사용자함수로 작성됩니다. Input : nDate(Numeric); Var : Count(0); Count = 0 ; For Value1 = 0 To 10 { If EntryDate(Value1) == nDate Then Count = Count + 1; } EntriesToday = Count; 감사합니다. > 보스친구 님이 쓴 글입니다. > 제목 : EntriesToday 함수 Source를 알고 싶어요 > 아래 적은것은 TS의 수식이거든요. YesLanguage로능 어떻게하는것인지 알고 싶어요 --------------------------------------------------------------- { Search Tag: WA-EntriesToday } { NOTE: Information is available only for the most recent 10 positions, so if the target date is set too far back from the current bar, or if the strategy opens and closes positions very frequently, this function may not produce accurate results. } inputs: TargetDate_YYYMMDD( numericsimple ) ; { pass in the date in YYYMMDD format, with the year 2002 being written as 102, etc } variables: Count( 0 ) ; Count = 0 ; for Value1 = 0 to 10 begin if EntryDate( Value1 ) = TargetDate_YYYMMDD then Count = Count + 1 ; end ; EntriesToday = Count ; { ** Copyright © TradeStation Technologies, Inc. All Rights Reserved / 저작권 소유 ** ** TradeStation reserves the right to modify or overwrite this analysis technique with each release. ** }