Library "lib_statemachine" simple state machine that allows tracking a state an manipulating it with conditions
method step(this, before, after, condition) will step the state of the state machine from one to the next in case of condition Namespace types: StateMachine Parameters: this (StateMachine): (StateMachine) the state machine to use before (int): (int) from state after (int): (int) to state condition (bool): (bool) if condition is true Returns: true (bool) if the state of the statemachine changed
method step(this, after, condition) will change the state of the state machine to the next in case of condition (not depending on previous state) Namespace types: StateMachine Parameters: this (StateMachine): (StateMachine) the state machine to use after (int): (int) to state condition (bool): (bool) if condition is true Returns: true (bool) if the state of the statemachine changed
method changed(this, within_bars) will return true if the state of the state machine was changed in this iteration Namespace types: StateMachine Parameters: this (StateMachine): (StateMachine) the state machine to use within_bars (int) Returns: true (bool) if the state of the statemachine changed
method reset(this, condition, min_occurrences) will reset the state machine if a certain 'condition' appears 'min_occurrences' times Namespace types: StateMachine Parameters: this (StateMachine): (StateMachine) the state machine to use condition (bool): (bool) reset condition min_occurrences (int): (int) min times 'condition' must appear for the reset to happen Returns: true (bool) if the state of the statemachine changed
StateMachine Fields: state (series__integer) neutral (series__integer) enabled (series__bool) reset_counter (series__integer)
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.