MyLanguage 문서

저자:선함, 2018-12-14 17:33:09, 업데이트: 2019-04-10 09:11:27

[TOC]

  • 기본 설명

    • 계약

      상품 선물 계약, 암호화폐 계약

      상품 선물/암호화폐 계약

      this_week   OKEX futures contract for current week
      next_week   OKEX futures contract for next week
      quarter     OKEX futures contract for quarter
      
      XBTUSD      BITMEX Perpetual Contract
      
      rb888       Rebar main contract
      MA000       Methanol Index Contract
      rb1901      Rebar contract
      …and so on.
      

      img

      계약을 설정 할 때, 당신은 rb1901/rb1905를 선택할 수 있습니다. 시장 데이터는 rb1901, 거래 계약은 rb1905입니다.

    • 변수

      변수는 데이터를 저장하기 위해 컴퓨터 메모리에 열리는 공간이다. 간단히 말해서 데이터를 저장하는 데 사용됩니다.

      첫 번째 변수를 선언

      // Assign 1 to the variable a
      a:=1;
      

      M 언어에서는 데이터 볼륨과 간단한 구별이 이루어집니다:

      1. 단일 값 데이터: 0, 1, 'abc'와 같은 하나의 값만
      2. 순서 데이터: 클로즈 (클로즈 가격) 와 같은 단일 값 데이터 집합으로 구성된 데이터의 순서, 클로즈에는 n 주기의 종료 가격이 포함되어 있습니다 [ 10.1, 10.2, 10.3, 10.4, 10.5... ]

      변수 타입과 구별

      1. 문자열 유형: 파슬을 사용해야 합니다, 문자열 유형은 직접 사용할 수 없습니다, 당신은 기능 출력 표시와 일치해야 합니다
      INFO(CLSOE>OPEN,'OK!');
      
      1. 값 유형: 정수, 변함수 숫자 (입수 소수) 를 포함
      // integer
      int:=2;
      
      // decimal
      float:=3.1;
      
      1. 부엘 타입, 1 (진정한 경우) 또는 0 (거짓 경우) 를 사용하여: 1, 0, true 또는 false, 예를 들어: A:=1>0; 이 코드를 실행한 후 A의 값은 1입니다.
      // The current period closing price is greater than -999, you will find that the return value of each cycle is 1, representing true, because the closing price is almost impossible to be negative
      Is_true:=Close>-999;
      
      1. 글로벌 변수
      VARIABLE:VALUE1:10;     // Declare a global variable with a value of 10 and execute only once.
      
      • 명칭 규정

        대부분의 시스템에서 변수 명칭은 잘 알려진 Close, C와 같은 시스템 보유 단어 (내장 변수 이름, 함수 이름) 를 사용할 수 없습니다. 또한 순수 숫자는 허용되지 않습니다. 또는 숫자는 너무 길지 않아서 시작됩니다. 다른 시스템과 다른 길이 제한은 다릅니다. 사실, 당신은 영어 분석을 위해 주류 시스템의 효율성을 복잡하게 할 필요가 없습니다. 나는 M 언어가 영어 사용자를 매우 친절하다고 믿습니다. 다음 명칭 협약을 사용하는 것이 좋습니다.

        영어 + 밑줄

        // output
        Move_avg_5:=MA(C,5);
        

        만약 당신이 영어를 선호한다면, 사람들이 가능한 한 당신의 변수들의 의미를 이해하도록 하십시오. A1, AAA, BBB 같은 명칭 방법을 사용하지 마십시오... 저를 믿으십시오, 며칠 후에, 당신이 다시 당신의 지표 코드를 검토 할 때, 당신은 기억 부족으로 인해 매우 고통스러울 것입니다. 마찬가지로, 당신이 다른 사람들에게 코드를 수출 할 때, 독자의 사고방식이 붕괴되었을 것입니다.

        그렇다면 이제부터 가능한 한 M 언어를 받아들이세요! 분석과 의사결정에 강력한 도구가 되기를 바랍니다.

    • 데이터 유형

      데이터 타입은 기본적인 개념입니다. 프로그래밍에서, 우리는 변수에 명시적인 데이터를 할당하면 변수가 데이터의 유형이 됩니다.

        1. 값 타입:
        1、2、3、1.1234、2.23456 ……
        
        1. 문자열 타입 (str):
        '1' 、'2' 、'3' ,string type must be wrapped with ''
        
        1. 순서 데이터:
        a collection of data consisting of a series of single-valued data
        
        1. 부올형 (boolean):

        true에 1을, false에 0을 사용하세요

        예제

        // Declare a variable of a numeric type
        var_int := 1;
        // Declare a variable of sequence data
        var_arr := Close;
        // String type can not be declared separately, you need to combine functions
        INFO(C>O, 'rising line');
        
    • 운영자

      참여 거래의 기호인 지표 코드를 실행하는 데 사용되는 동작과 계산.

      • 할당 운영자

        변수에 값을 부여하는 데 사용됩니다.

          1. :

          도표에 할당하고 출력하는 두 단점을 나타냅니다 (대신 도표)

          Close1:Close;      // Assign Close to the variable Close1 and output it to the diagram
          
          1. :=

          점점=, 할당을 나타냅니다. 그러나 다이어그램 (주 다이어그램, 하위 다이어그램...) 에 출력되지 않으며 상태 바 테이블에 표시되지 않습니다.

          Close2:=Close;     // Assign Close to the variable Close2
          
          1. ^^

          ^^, 두 ^ 기호는 할당을 나타내고 변수에 값을 할당하고 다이어그램 (주 다이어그램) 에 출력합니다.

          lastPrice^^C;
          
          1. ..

          ..., 두 점, 기호는 할당을 나타내고 변수에 값을 부여하고 상태 바 테이블에 표시하지만 다이어그램 (주 다이어그램, 하위 다이어그램...) 에 출력하지 않습니다.

          openPrice..O
          
      • 관계 연산자

        관계 연산자는 조건 표현식에서 사용되는 쌍안경 연산자입니다. 두 데이터 사이의 관계를 결정하는 데 사용됩니다.

        반환 값: 부올 타입, true (1) 는 false (0) 이어야 합니다.

          1. > 보다 크다
          // Assign the result of 2 > 1 to the rv1 variable, at this time rv1=1
          Rv1:=2>1;
          
          1. < 보다 작다
          // returns false, which is 0, because 2 is greater than 1. :-)
          rv3:=2<1;
          
          1. >=보다 크거나 같아야 합니다
          x:=Close;
          // Assign the result of the operation with a closing price greater than or equal to ¥ 10 to the variable rv2
          // Note that since “close” is a sequence of data, when the close>=10 operation is performed, the essence is that each cycle is performed, so each cycle will have a return value of 1, 0.
          rv2:=Close>=10;
          
          1. <=보다 작거나 같습니다
          Omitted here
          
          1. =와 같습니다
          A:=O=C;     // Determine if the opening price is equal to the closing price.
          
          1. <>와 같지는 않습니다
          1<>2       // Judgment weather 1 is equal to 2 or not, the return value is 1 (true)
          
      • 논리 연산자

        Return value: Boolean type, not true (1), must be false (0)
        
        1. 논리와 &&는 대신 을 사용할 수 있고, 연결의 왼쪽과 오른쪽 양쪽은 동시에 사실여야 합니다.
        // determine whether cond_a, cond_b, cond_c is true at the same time,
        cond_a:=2>1;
        cond_b:=4>3;
        cond_c:=6>5;
        cond_a && cond_b and cond_c;    // return value 1, true
        
        1. 논리적으로 보면, or을 사용해서 왼쪽과 오른쪽에 or을 연결할 수 있습니다. 한쪽이 사실이라면 전체가 사실입니다.
        cond_a:=1>2;
        cond_b:=4>3;
        cond_c:=5>6;
        cond_a || cond_b or cond_c;    // return value 1, true
        
      • 수학적 연산자

        Return value: numeric type
        

        기본 수학적 연산자 기호의 완성이며, 이는 네 가지 수학적 연산을 처리하는 기호입니다.

        • 플러스 +

          A:=1+1;      // return 2
          
        • 빼기 -

          A:=2-1;      // return 1
          
        • 곱하기 *

          A:=2*2;      // return 4
          
        • /로 나눕니다

          A:=4/2;      // return 2
          
    • 기능

      • 기능

        프로그래밍 세계에서 함수은 실제로 특정 함수를 구현하고 다른 코드에서 호출 할 수있는 코드입니다. 일반적인 형태는 다음과 같습니다.

        function(param1,param2,……)
        
        • 성분:

          함수 이름 (패라미터 1, 패라미터 2,...), 매개 변수가 없을 수도 있고, 여러 매개 변수가 있을 수도 있습니다. 예를 들어 MA ((x, n); 내부 x의 간단한 이동 평균을 나타냅니다.

          함수를 사용 할 때, 함수의 기본 정의, 즉 함수를 호출하여 어떤 데이터를 얻을 수 있는지 이해해야합니다. 일반적으로 함수에는 매개 변수가 있습니다. 매개 변수를 전달할 때 전달된 데이터 유형이 적합하는지 확인해야합니다. 현재 단계에서는 대부분의 IDE의 코드 힌트 함수가 매우 불완전합니다. 주어진 매개 변수에 대한 특정 데이터 유형을 표시하지 않아 문제가 있습니다. MA(x,n의 해석은:

          Return a simple moving average
          usage:
          AVG:=MA(X,N): N's simple moving average of X, algorithm (X1+X2+X3+...+Xn)/N,N supports variables
          

          이 설명은 초보자에게는 매우 불친절한 설명입니다. 다음으로, 우리는 기능을 철저히 분석하고 기능을 빠르게 배우고 사용하는 방법을 찾으려고합니다.

      • 반환 값

        함수를 빠르게 배우기 위해서는 먼저 return value라는 개념을 이해해야 합니다. 이름에서 알 수 있듯이 return은 return이고, 값은 concrete value, 즉 얻을 수 있는 데이터를 나타냅니다.

        // Because it will be used in the following code, use the variable return_value to receive and save the return value of function()
        // retrun_value := function(param1,param2);
        // for example:
        AVG:=MA(C,10); // AVG is retrun_value , “function” function is: MA function, param1 parameter: C is the closing price sequence data, param2 parameter: 10.
        
      • 매개 변수

        둘째, 함수의 두 번째 중요한 개념은 매개 변수입니다. 다른 매개 변수를 입력하면 다른 반환 값을 얻을 수 있습니다.

        // variable ma5 receives 5 day closing price moving average
        ma5:=MA(C,5);
        // variable ma10 receives 10 day closing price moving average
        ma10:=MA(C,10);
        

        위의 변수 ma5의 첫 번째 매개 변수 X는 C (폐기 가격), 사실 C도 함수 (개시 이후의 종료 가격 순서를 반환) 이지만 매개 변수는 없습니다. 두 번째 매개 변수 5, 10, 이것은 MA () 함수를 알려주는 데 사용됩니다. 우리는 몇 일 동안의 종료 가격의 이동 평균을 얻고자합니다. 매개 변수를 통해 함수가 더 유연해집니다.

      • 학습 방법

          1. 먼저, 함수의 함수를 이해해야 합니다. 이 함수가 우리에게 줄 수 있는 데이터입니다.
          1. 반환값의 종류를 이해하면, 우리는 반환값을 얻기 위해 함수를 사용합니다.
          1. 우리는 매개 변수 MA (x, n) 의 데이터 타입을 이해해야 합니다. 매개 변수 x, n의 데이터 타입을 모르면 반환값을 올바르게 얻을 수 없습니다.

        다음 기능 소개에서, 사용, 위의 세 가지 원칙을 따르십시오.

    • 언어 향상

      • M 언어와 자바스크립트 언어의 혼합 프로그래밍

        %%
        // here you can call any API function of FMZ Quant.
        scope.TEST = function(obj) {
            return obj.val * 100;
        }
        %% 
        

      종료 가격: C 닫기 가격은 100배로 확대됩니다: TEST© 이전 폐쇄 가격은 100 배 확대됩니다: TEST ((REF ((C, 1)); // 마우스는 백테스트 K 라인에 이동하고 변수 값이 표시됩니다.

      
      - scope object
      
        scope object, you can add attributes and assign anonymous functions to attributes. An anonymous function referenced by this attributes can be called in the M language code section.
      
      - scope.getRefs(obj) function
      
        In the JavaScript code block, call the scope.getRefs(obj) function, which returns the data of the incoming obj object.
      
       The following %%%% of the symbolic package's JavaScript code will get the incoming C closing price when the TEST(C) function is called in the M language code.
        The scope.getRefs function returns all closing prices for this K-line data. Since the throw "stop" interrupt routine is used, the variable “arr” contains only the closing price of the first Bar of k-line. You can try to delete throw "stop" and it will execute the last return of the JavaScript code, returning all the closing price data.
        ```
        %%
        scope.TEST = function(obj){
            var arr = scope.getRefs(obj)
            Log("arr:", arr)
            throw "stop"
            return
        }
        %%
        TEST(C);
        ```
      
      - scope.bars
      
        In the JavaScript code block, access all K line bars.
      
        The TEST function returns a value, 1 is the falling k-line and 0 is the rising line.
        
        ```
        %%
        scope.TEST = function(){
            var bars = scope.bars
            return bars[bars.length - 1].Open > bars[bars.length - 1].Close ? 1 : 0    // can only return values
        }
        %%
        arr:TEST;                                                                      
        ```
      
        ```
        # Note:
        # TEST Received anonymous function, the return value must be a numeric value
        # If the anonymous function has no parameters, write VAR:=TEST directly when calling TEST; write VAR:=TEST(); will report an error.
        # TEST in #scope.TEST must be uppercase.
        ```
      
      - scope.bar
      
        In the JavaScript code block, access the current bar.
      
        Calculate the average of “opening high but closing low” of k-line’s prices.
      
        ```
        %%
        scope.TEST = function(){
            var bar = scope.bar
            var ret = (bar.Open + bar.Close + bar.High + bar.Low) / 4
            return ret
        }
        %%
        avg^^TEST;
        ```
      
      - scope.depth
      
        Access the market depth data (order book)
      
        ```
        %%
        scope.TEST = function(){
            Log(scope.depth)
            throw "stop"             // Throw an exception after printing the depth data, pause.
        }
        %%
        TEST;
        ```
      
      - scope.symbol
      
        Get the current trading pair name string
      
        ```
        %%
        scope.TEST = function(){
            Log(scope.symbol)
            throw "stop"
        }
        %%
        TEST;
        ```
      
      - scope.barPos
      
        Get the K line Bar location.
      
        ```
        %%
        scope.TEST = function(){
            Log(scope.barPos)
            throw "stop"
        }
        %%
        TEST;
        ```
      
      - scope.get\_locals('name')
      
        This function is used to get the variables in the M language code part
      
        ```
        V:10;
        %%
        scope.TEST = function(obj){
            return scope.get_locals('V')
        }
        %%
        GET_V:TEST(C);
        ```
      
        ```
        # Note:
        # If a variable does not calculate data when the period is insufficient, this time the scope.get_locals function is called in the JavaScript code.
        # When get this variable, it will give an error: line:XX - undefined locals a variable name undefined
        ```
      
      
    • 다중주기 참조

      • 사용: #EXPORT 수식 이름... #END 수식을 만들기 위해. 당신은 단지 다른 기간에 대한 데이터를 얻고 싶다면, 당신은 또한 수식 계산 없이 빈 수식을 쓸 수 있습니다.

        빈 공식은:

        #EXPORT TEST 
        NOP;
        #END           // End
        
      • 사용: #IMPORT [MIN, 기간, 공식 이름] AS 변수 값, 참조 공식, 설정 기간의 데이터를 얻으십시오 (변수 값으로 얻은 종료 가격, 시작 가격 등).

        코드 예제:

        // this code demonstrates how to reference formulas of different cycles in the same code
        // #EXPORT extends the syntax, ending with #END as a formula, you can declare multiple
        #EXPORT TEST 
        Mean 1:EMA(C, 20);
        Mean 2:EMA(C, 10);
        #END // End
        
        #IMPORT [MIN,15,TEST] AS VAR15 // Reference formula, K line cycle is 15 minutes
        #IMPORT [MIN,30,TEST] AS VAR30 // Reference formula, K line cycle is 30 minutes
        CROSSUP(VAR15.Mean1, VAR30.Mean1),BPK;
        CROSSDOWN(VAR15.Mean2, VAR30.Mean2),SPK;
        The highest price of 15 mins:VAR15.HIGH;
        The highest price of 30 mins:VAR30.HIGH;
        AUTOFILTER;
        
    • 모드 설명

      • 1、1개의 열기 위치와 1개의 닫기 위치 신호 필터링 모델

        모델에서, AUTOFILTER 함수를 작성하여 하나의 개척과 하나의 폐쇄의 신호 필터링을 제어하고 실현합니다. 여러 개척 위치 신호가 조건을 만족하면 첫 번째 신호가 효과적인 신호로 간주되며, 다음 k 선의 동일한 신호가 필터링됩니다.

        필터링 모델 지원 명령어: BK, BP, BPK, SK, SP, SPK, CLOSEOUT, BK (5) 및 다른 명령어를 지원하지 않습니다.

        E.g:

        MA1:MA(CLOSE,5);
        MA2:MA(CLOSE,10);
        CROSSUP(C,MA1),BK;
        CROSSUP(MA1,MA2),BK;
        C>BKPRICE+10||C<BKPRICE-5,SP;
        AUTOFILTER;
        
      • 2, 덧셈 또는 셈 위치 모델

        AUTOFILTER 함수는 모델에 기록되어 있지 않으며, 위치를 증가시키거나 감소시키는데 사용할 수 있는 연속적인 열 위치 신호 또는 연속적인 닫기 위치 신호를 허용합니다.

        지원되는 명령어: BK(N), BP(N), SK(N), SP(N), CLOSEOUT, BPK(N), SPK(N, 롯이 없는 오픈 및 클로즈 포지션을 지원하지 않습니다. (1) 지원 명령어 그룹링. (2) 여러 명령 조건이 동시에 충족되면, 신호는 조건 명령어가 작성된 순서대로 실행됩니다. 예를 들어:

        MA1:MA(CLOSE,5);
        MA2:MA(CLOSE,10);
        CROSSUP(C,MA1),BK(1);
        CROSSUP(MA1,MA2),BK(1);
        C>BKPRICE+10||C<BKPRICE-5,SP(BKVOL);
        
      • 3、 하나의 신호 모델과 함께 한 K 라인

        하나의 신호 모델을 가진 하나의 K 라인은 종료 가격 모델과 명령 가격 모델로 나눌 수 있습니다.

        1) 종료 가격 모델

        K 선은 계산 신호를 통과하여 주문을 합니다. (계산은 K 선의 형성 도중 수행 됩니다. 이 때 신호는 불확실하며, k 선이 끝나지 않을 때 나타나는 신호는 무시되며, 주문은 이루어지지 않습니다.)

        신호 방향은 대기 위치 방향과 일치하며 신호가 사라지는 상태가 없습니다.

        E.g:
        MA1:MA(CLOSE,5);
        MA2:MA(CLOSE,10);
        CROSSUP(MA1,MA2),BPK;//5 cycle moving average line up cross 10 cycle moving average line to buy long.
        CROSSDOWN(MA1,MA2),SPK;//5 cycle moving average line down cross 10 cycle moving average line to sell short.
        AUTOFILTER;
        

        2) 명령 가격 모델

        k 라인이 완료되었든 아니든 신호가 계산되고 주문이 실시간으로 이루어집니다. 즉 K 라인이 완료되기 전에 주문이 이루어집니다.

        K 선이 끝나면 확인됩니다. 위치 방향이 k 선의 끝에서 신호 방향과 일치하지 않으면 위치가 자동으로 동기화됩니다.

        E.g:

        MA1:MA(CLOSE,5);
        MA2:MA(CLOSE,10);
        CROSSUP(MA1,MA2),BPK;//5 cycle moving average line up cross 10 cycle moving average line to buy long.
        CROSSDOWN(MA1,MA2),SPK;//5 cycle moving average line down cross 10 cycle moving average line to sell short.
        AUTOFILTER;
        
      • 4、다중 신호 모델과 함께 한 K 라인

        모델은 하나의 K-라인에서 여러 신호를 제어하고 구현하기 위해 multsig 또는 multsig_min을 사용합니다.

        k 선이 완료되었는지 여부에 관계없이 신호를 계산하고 실시간 순서를 지정합니다.

        신호는 검토되지 않습니다, 신호가 사라지는 상태가 없으며 신호 방향은 위치 방향과 일치합니다.

        복수의 신호 조건이 충족되는 경우 K 선에서 반복된 복수의 실행

        E.g:
        MA1:MA(CLOSE,5);
        MA2:MA(CLOSE,10);
        CROSSUP(MA1,MA2),BK;
        C>BKPRICE+10||C<BKPRICE-5,SP;
        AUTOFILTER;
        MULTSIG(0,0,2,0);
        

        부가: 1, 포지션 모델을 더하고 , 하나의 k-라인 신호의 두 가지 방법: 폐쇄 가격 배치 명령과 지시 가격 배치 명령 모두 지원됩니다.

        2、 덧셈과 셈 위치 모델은 또한 주문을 할 수있는 단일 k-라인 신호를 지원합니다.

        부수와 빼기 위치 모델, multsig 또는 multsig_min 함수를 작성, 한 k 직선에서 여러 번 부수와 빼기 위치를 실현, 또는 여러 번 위치를 줄이십시오.

    • 차트 표시

      • 주요 다이어그램 추가 지표

        변수에 값을 할당하는 동안 주요 이미지에 표시되는 지표를 설정하기 위해 연산자 ^^을 사용하십시오.

        MA60^^MA(C, 60);  // Calculate the moving average indicator with a parameter of 60
        

        img

      • 하위 다이어그램 추가 지표

        변수에 값을 할당하는 동안 2차 다이어그램에 표시되는 지표를 설정하기 위해 연산자 :을 사용하십시오.

        ATR:MA(MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW)),26);    // Assign a value to the ATR variable, The ":" symbol is followed by the formula for calculating the ATR
        

        당신이 주요 또는 하위 다이어그램에 표시하고 싶지 않다면 ... 연산자를 사용하세요

        MA60..MA(C, 60);  // Calculate the moving average indicator with a parameter of 60
        

        DOT와 COLORRED를 사용하여 M 언어에 익숙한 사용자의 습관에 따라 라인 타입, 색상 등을 설정할 수 있습니다.

    • 일반적인 문제

      지표의 작성에서 흔히 발생하는 문제점, 일반적으로 지표를 작성할 때 주의가 필요한 점을 소개하십시오. (이중)

      • ;의 끝에 주의를 기울이세요.

      • 시스템 키워드는 변수로 선언할 수 없다는 점에 유의해야 합니다.

      • 문자열에 단절 문자를 사용한다는 점에 유의하십시오. 예를 들어: opening 단절 문자 하나만 사용하세요.

      • 의견

        해설자

        • // The content of the comment입력 메소드는 영어와 중국어로 입력할 수 있습니다. 즉, 코드는 실행 과정에서 컴파일되지 않습니다. 즉, 실행되지 않습니다. 일반적으로 우리는 코드의 의미를 사용하여 코드의 검토를 촉진합니다.

        • { Comment content }댓글 차단

          A:=MA(C,10);
          {The previous line of code is the calculation of the moving average.}
          
        • (* Comment content *)댓글 차단

          A:=MA(C,10);
          (*The previous line of code is the calculation of the moving average.*)
          
      • 입력 방법

        코드를 작성할 때, 입력 방법이 중국어와 영어 사이에서 전환되기 때문에 종종 기호 오류가 발생합니다. 일반적인 유형은 다음과 같습니다: 직사각형:, 단축자; koma, parenthesis (), 등, 중국어와 영어의 이러한 다른 문자는 주의가 필요합니다.

      • 오류가 발생하기 쉬운 논리

        1. 최소 0.0 0.0 0.0 0.0>=
        2. 가장 많이 가장 많이 더 이상: 대응 관계 연산자<=
  • K 라인 데이터 참조

    • 오픈

      K-라인 차트의 시작 가격을 얻으십시오.

      개시 가격

      기능:OPEN, O로 줄여서

      매개 변수: 없습니다

      설명: 주기의 시작 가격을 반환합니다.

      염기서열 데이터

      OPEN obtained the opening price of the K-line chart.
      
      Note:
      1、can be shorthand as O.
      
      example 1:
      OO:=O;           //Define OO as the opening price; pay attention to the difference between O and 0.
      example 2:
      NN:=BARSLAST(DATE<>REF(DATE,1));
      OO:=REF(O,NN);   //Get the opening price of the day
      example 3:
      MA5:=MA(O,5);    //Define the 5-period moving average of the opening price (O is OPEN shorthand).
      
    • 높은

      K-라인 차트의 가장 높은 가격을 얻으십시오.

      가장 높은 가격

      함수:HIGH, H로 줄여서

      매개 변수: 없습니다

      설명: 주기의 가장 높은 가격을 반환

      염기서열 데이터

      HIGH Get the highest price of the K-line chart.
      
      Note:
      1、can be shorthand as H.
      
      example 1:
      HH:=H;         //Define HH as the highest price.
      example 2:
      HH:=HHV(H,5);  //Take the maximum value of the highest price within 5 cycles.
      example 3:
      REF(H,1);      //Take the highest price of the previous K line
      
    • 낮은

      K-라인 차트의 가장 낮은 가격을 얻으십시오.

      가장 낮은 가격

      기능:L로 줄여진 LOW

      매개 변수: 없습니다

      설명: 주기의 가장 낮은 가격을 반환합니다.

      염기서열 데이터

      LOW gets the lowest price of the K-line chart.
      
      Note:
      1、can be shorthand as L.
      
      example 1:
      LL:=L;            //Define LL as the lowest price.
      example 2:
      LL:=LLV(L,5);     //Get the minimum value of the lowest price in 5 cycles.
      example 3:
      REF(L,1);         //Get the lowest price of the previous K line
      
    • 근접

      K-라인 차트의 종료 가격을 얻으십시오.

      종료 가격

      함수: CLOSE, C로 줄여서

      매개 변수: 없습니다

      설명: 주기의 종료 가격을 반환합니다.

      염기서열 데이터

      CLOSE Get the closing price of the K-line chart.
      
      Note:
      1、When the k-line in the market is not finished, get the latest price.
      2、Can be shorthand as C.
      
      example 1:
      A:=CLOSE;          //Define the variable A as the closing price (A is the latest price when the k line is not finished).
      example 2:
      MA5:=MA(C,5);      //Define the 5-period moving average of the closing price (C is short for CLOSE).
      example 3:
      A:=REF(C,1);       //Get the closing price of the previous k line.
      
    • VOL

      K-라인 차트의 볼륨을 얻으십시오

      거래량

      기능:VOL, V로 줄여서

      매개 변수: 없습니다

      설명: 이 사이클의 부피를 반환합니다.

      염기서열 데이터

      VOL gets the volume of the K-line chart.
      
      Note:
      Can be shorthand as V.
      The return value of this function on the root TICK is the cumulative value of all TICK transactions for the day.
      
      example 1:
      VV:=V;       //Define VV as volume
      example 2:
      REF(V,1);    //indicates the volume of the previous cycle
      example 3:
      V>=REF(V,1); //The volume is greater than the volume of the previous cycle, indicating that the volume increases (V is short for VOL).
      
    • REF

      앞선 참조

      Reference the value of X before N cycles.
      
      Note:
      1、When N is a valid value, but the current number of k lines is less than N, a null value is returned;
      2、When N is 0, the current X value is returned;
      3、When N is null, it returns a null value.
      4、N can be a variable
      
      example 1:
      REF(CLOSE,5); indicates the closing price of the 5th cycle before the current cycle
      example 2:
      AA:=IFELSE(BARSBK>=1,REF(C,BARSBK),C);//Take the closing price of the K line of latest buying long of the open position signal
      //1) When the k-line BARSBK of the BK signal returns a null value, the k-line REF(C, BARSBK) of the BK signal is returned.
      Null value;
      //2)When the BK signal is sent, the k-line BARSBK returns a null value, and if the BARSBK>=1 is not satisfied, then send the closing price of the k-line.
      //3)The k-line BARSBK after the BK signal is sent returns the number of cycles of the K-line of the open position from the current K-line, REF(C, BARSBK)
      Returns the closing price of the opening k line.
      //4)Example: 1, 2, 3 three k lines, 1 K line is the opening position signal K line, then return the closing price of this k line, 2, 3
      K line returns the closing price of the 1 K line.
      
    • UNIT

      데이터 계약의 트랜잭션 유닛을 예로 들어보죠

      Take the trading unit of the data contract.
      usage:
      UNIT takes the trading unit of the data loading contract.
      

      재화 미래

      UNIT 값은 계약과 관련이 있습니다.

      rb contract - 1 hand, 10 (tons)
      

      암호화폐 스팟

      UNIT 값은 1입니다

      암호화폐 선물 UNIT 값은 계약 통화와 관련이 있습니다.

      OKEX Futures: 1 BTC contract represents $100, and 1 contract in other currencies represents $10
      
    • MINPRICE

      데이터 계약의 최소 가격 변화

      Take the minimum price change of the data contract.
      usage:
      MINPRICE; Take the minimum price change for loading data contracts.
      
    • MINPRICE1

      거래 계약의 최소 변경

      Take the minimum price change of the trading contract.
      usage:
      MINPRICE1; Take the minimum price change of the trading contract.
      
  • 시간 함수

    • BARPOS

      Take the position of the K line
      
      BARPOS,returns the number of cycles from the first K line to the current cycle.
      
      Note:
      1、BARPOS returns the number of existing K lines in the local area, starting from the data existing on the local machine.
      2、The return value of the first K line already on the local machine is 1.
      
      example 1:LLV(L,BARPOS);//Find the minimum value of the local existing data.
      
      example 2:IFELSE(BARPOS=1,H,0);//The current K line is the highest value of the first K line already in the local machine, otherwise it is 0.
      
    • 기간

      기간 값은 분 수입니다.

      1, 3, 5, 15, 30, 60, 1440
      
    • 날짜

      날짜

      기능: 날짜

      매개 변수: 없습니다

      설명: 주기의 날짜를 1900년부터 얻는다.

      염기서열 데이터

    • 시간

      K 라인의 시간을 가져

      TIME,take the K line time.
      
      Note:
      1、The function returns in real time on the real-market, and returns the start time of the K line after the K line is finished.
      2、The function returns the exchange data reception time, which is the exchange time.
      3、The TIME function returns a six-digit form when used in the second period, ie: HHMMSS, which is displayed in four-digit form on other periods, namely: HHMM.
      4、The TIME function can only be loaded in the period below the daily period. The return value of the function is always 1500 in the period above the daily period (Included the daily period).
      5、use the TIME function to close the position of the tail operation needs attention
      (1) The time set by the end of the closing position is recommended to be set to the actual time that can be taken in the K line return value (eg, the RB index is 5 minutes, the last K line return time is 1455, and the tail closing position is set to TIME> =1458, CLOSEOUT; the signal that the tail is closed can not appear in the effect test)
      (2)	Using the TIME function as the condition for closing the position at the end of the market, it is recommended to open position condition also to make the corresponding time limit (such as setting the closing condition of the tail to TIME>=1458, CLOSEOUT; then the corresponding opening conditions are required Add condition TIME<1458; avoid opening the position again after closing the position)
      
      example 1:
      C>O&&TIME<1450,BK;
      C<O&&TIME<1450,SK;
      TIME>=1450,SP;
      TIME>=1450,BP;
      AUTOFILTER;
      //Close the position after 14:50.
      example 2:
      ISLASTSK=0&&C>O&&TIME>=0915,SK;
      
    • 1년

      몇 년

      YEAR,the year is obtained.
      
      Note:
      YEAR ranges from 1970—2033。
      
      example 1:
      N:=BARSLAST(YEAR<>REF(YEAR,1))+1;
      HH:=REF(HHV(H,N),N);
      LL:=REF(LLV(L,N),N);
      OO:=REF(VALUEWHEN(N=1,O),N);
      CC:=REF(C,N);//take the highest price, the lowest price, the opening price, and the closing price of the previous year.
      example 2:
      NN:=IFELSE(YEAR>=2000 AND MONTH>=1,0,1);
      
    • 주기의 달을 반환합니다.

      MONTH, returns the month of a cycle.
      
      Note:
      MONTH has a value range of 1-12.
      
      example 1:
      VALUEWHEN(MONTH=3&&DAY=1,C);//The closing price is taken when the K-line date is March 1.
      example 2:
      C>=VALUEWHEN(MONTH<REF(MONTH,1),O),SP;
      
    • 1일

      주기의 날 수를 얻으십시오.

      DAY, returns the number of days in a cycle.
      
      Note:
      The DAY value ranges from 1-31.
      
      example 1:
      DAY=3&&TIME=0915,BK;//From the date of 3 days, the time is 9:15, buy long.
      example 2:
      N:=BARSLAST(DATE<>REF(DATE,1))+1;
      CC:=IFELSE(DAY=1,VALUEWHEN(N=1,O),0);//When the date is 1, the opening price is taken, otherwise the value is 0.
      
    • 시간

      시간

      HOUR,Returns the number of hours in a cycle.
      
      Note:
      HOUR ranges from 0 to 23
      
      example 1:
      NX:=BARSLAST(CROSS(HOUR=9,0.5));
      DRAWLINE3(CROSSDOWN(HOUR=14,0.5),REF(H,NX),NX,CROSSDOWN(HOUR=14,0.5),REF(H,1),1,0),COLORGREEN;
      //Connect 9:00 to the latest k-line high point before the market close.
      example 2:
      HOUR=10;//The return value is 1 on the K line at 10:00, and the return value on the remaining K lines is 0.
      
    • 1분

      1분

      MINUTE, Returns the number of minutes in a cycle.
      
      Note:
      1:MINUTE has a value range of 0-59
      2:This function can only be loaded on the minute period, returning the number of minutes since the current K line.
      example 1:
      MINUTE=0;//The return value on the minute K line at the beginning of an hour is 1, and the remaining K lines return a value of 0.
      example 2:
      TIME>1400&&MINUTE=50,SP;//close position at 14:50.
      
    • 주일

      주 수를 얻으세요

      WEEKDAY, get the number of weeks.
      
      Note:
      1:WEEKDAY has a value range of 0-6.
      2:The value displayed by the function on the weekly cycle is always 5, and the number of weeks on the day of the end of the K line is returned on the monthly cycle.
      
      example 1:
      N:=BARSLAST(MONTH<>REF(MONTH,1))+1;
      COUNT(WEEKDAY=5,N)=3&&TIME>=1450,BP;
      COUNT(WEEKDAY=5,N)=3&&TIME>=1450,SP;
      AUTOFILTER;//each month delivery date is automatically closed all position at the end of that day.
      example 2:
      C>VALUEWHEN(WEEKDAY<REF(WEEKDAY,1),O)+10,BK;
      AUTOFILTER;
      
  • 논리적 인 판단 기능

    • 바르스타투스

      현재 주기의 위치 상태를 반환합니다.

      BARSTATUS returns the position status of the current cycle.
      
      Note:
      The function returns 1 to indicate that the current cycle is the first cycle, return 2 to indicate the last cycle, and return 0 to indicate that the current cycle is in the middle position.
      
      example:
      A:=IFELSE(BARSTATUS=1,H,0); //If the current K line is the first cycle, the variable A returns the highest value of the K line, otherwise it takes 0.
      
    • 그 사이에

      그 사이에

      BETWEEN(X,Y,Z) indicates whether X is between Y and Z, and returns 1 (Yes), otherwise returns 0 (No).
      
      Note:
      1、If X=Y, X=Z, or X=Y and Y=Z, the function returns a value of 1 (Yse).
      
      example 1:
      BETWEEN(CLOSE,MA5,MA10); //indicates that the closing price is between the 5-day moving average and the 10-day moving average.
      
    • 크로스

      크로스 함수

      CROSS(A,B) means that A passes B from the bottom to up, and returns 1 (Yes), otherwise it returns 0 (No).
      
      Note:
      1、The conditions for crossing must satisfy A<=B of pervious k line, and it is confirmed as crossing when the current k-line satisfies A>B.
      
      example 1:
      CROSS(CLOSE,MA(CLOSE,5)); //means the crossing line from below through the 5-period moving average
      
    • 크로스다운

      아래로 넘어가는 것

      CROSSDOWN(A,B):indicates that when A down crossing B from above, it returns 1 (Yes), otherwise it returns 0 (No).
      
      Note:
      1、CROSSDOWN (A, B) is equivalent to CROSS (B, A), CROSSDOWN (A, B) is written to better understand
      
      example 1:
      MA5:=MA(C,5);
      MA10:=MA(C,10);
      CROSSDOWN(MA5,MA10),SK; //MA5 down cross MA10, sell short
      //CROSSDOWN(MA5,MA10),SK; and CROSSDOWN(MA5,MA10)=1, SK; express the same meaning
      
    • 크로스

      가로질러

      CROSSUP(A,B) When A passes up from bottom to B, it returns 1 (Yes), otherwise it returns 0 (No)
      
      Note:
      1、CROSSUP (A, B) is equivalent to CROSS (A, B), CROSSUP (A, B) is written to better understand.
      
      example 1:
      MA5:=MA(C,5);
      MA10:=MA(C,10);
      CROSSUP(MA5,MA10),BK;//MA5 cross up MA10, buy long.
      //CROSSUP(MA5,MA10),BK; and CROSSUP(MA5,MA10)=1, BK; express the same meaning
      
    • 모두

      계속 요구 사항을 충족하는지 여부를 결정

      EVERY(COND,N),judge whether the COND condition is always satisfied in the N period. If it is, the function returns a value of 1; if it is not, the function returns a value of 0;
      
      Note:
      1、N contains the current k line.
      2、If N is a valid value, but there are not many K lines in front of it, or N is a null value, the condition is not satisfied, and the function returns 0.
      3、N can be a variable
      
      example 1:
      EVERY(CLOSE>OPEN,5);//indicates that it has been a positive line for 5 cycles.
      example 2:
      MA5:=MA(C,5);//Define a 5-cycle moving average
      MA10:=MA(C,10);//Define the 10-cycle moving average
      EVERY(MA5>MA10,4),BK;//MA5 is greater than MA10 in 4 cycles, then buy long.
      //EVERY(MA5>MA10,4),BK; and EVERY(MA5>MA10,4)=1, BK; express the same meaning
      
    • 존재합니다

      만족 여부를 결정합니다.

      EXIST(COND,N) determines whether there are conditions for satisfying COND in N cycles
      
      Note:
      1、N contains the current k line.
      2、N can be a variable.
      3、If N is a valid value, but there are not many K lines in front of it, calculate according to the actual number of cycles.
      
      example 1:
      EXIST(CLOSE>REF(HIGH,1),10);indicates whether there is a maximum price in the 10 cycles that is greater than the previous period, if it exist, return 1, and if it does not exist, returns 0.
      example 2:
      N:=BARSLAST(DATE<>REF(DATE,1))+1;
      EXIST(C>MA(C,5),N);//Indicates whether there is a k line that meets the closing price greater than the 5-period moving average. If it exist, return 1, and if it does not exist, return 0.
      
    • IF

      조건 함수

      IF(COND,A,B) Returns A if the COND condition is true, otherwise returns B
      
      Note:
      1、COND is a judgment condition; A and B can be conditions or numerical values.
      2、the function supports the variable loop to reference the previous period of its own variable, that is, support the following writing method Y: IF (CON, X, REF (Y, 1));
      example 1:
      IF(ISUP,H,L);// k line is the rising line, take the highest price, otherwise take the lowest price
      example 2:
      A:=IF(MA5>MA10,CROSS(DIFF,DEA),IF(CROSS(D,K),2,0));//When MA5>MA10, take whether DIFF is cross up the DEA, otherwise (MA5 Not greater than MA10), when K, D is down crossing, let A be assigned a value of 2. If the above conditions are not met, A is assigned a value of 0.
      A=1,BPK;//When MA5>MA10, use DIFF cross up DEA as the buying long condition
      A=2,SPK;//When MA5 is not greater than MA10, K D down crossing are used as selling short conditions
      
    • IFELSE

      조건 함수

      IFELSE(COND,A,B) Returns A if the COND condition is true, otherwise returns B
      
      Note:
      1、COND is a judgment condition; A and B can be conditions or numerical values.
      2、the function supports the variable loop to refer to the previous period of its own variable, that is, supports the following writing method Y: IFELSE (CON, X, REF (Y, 1));
      example 1:
      IFELSE(ISUP,H,L);//k line is the rising line, take the highest price, otherwise take the lowest price
      example 2:
      A:=IFELSE(MA5>MA10,CROSS(DIFF,DEA),IFELSE(CROSS(D,K),2,0)); //When MA5>MA10, whether DIFF up cross DEA, otherwise (MA5 Not greater than MA10), when K, D down cross, let A be assigned a value of 2. If the above conditions are not met, A is assigned a value of 0.
      A=1,BPK;//When MA5>MA10, use DIFF up cross DEA as the buying long condition
      A=2,SPK;//When MA5 is not greater than MA10, K, D down cross are used as selling short conditions
      
    • 계약서

      날씨 현재 계약 지정 계약

      weather ISCONTRACT(CODE) is currently the specified contract.
      
      Usage:ISCONTRACT(CODE); is the current contract returns 1, not the current contract returns 0.
      
      Note:
      1、When judging whether it is a specified contract, CODE can be the transaction code of the contract.
      
      example:
      ISCONTRACT('MA888');
      ISCONTRACT('rb1901');
      ISCONTRACT('this_week');    // cryptocurrency OKEX Futures Contract
      ISCONTRACT('XBTUSD');       // cryptocurrency BITMEX Futures Contract
      

      정규 표현식 지원

      계약 결정

      ISCONTRACT('this_week');                     // Determine if the current contract is OKEX futures this_week (week) contract
      

      거래소 이름을 판단

      ISCONTRACT('@Futures_(CTP|BitMEX)');         // Determine whether the current exchange object is a commodity futures or a cryptocurrency BITMEX futures exchange
      ISCONTRACT('@(OKEX|Bitfinex|Futures_CTP)');  // To determine the exchange, you need to add @ character at the beginning
      
    • ISDOWN

      떨어지는 K 라인

      ISDOWN determines whether the cycle is falling
      
      Note:
      1、ISDOWN is equivalent to C<O
      
      example:
      ISDOWN=1&&C<REF(C,1),SK;//When the current k line is finished and the closing price is lower than the closing price of the previous period, then selling short
      //ISDOWN=1&&C<REF(C,1),SK; is equivalent to ISDOWN&&C<REF(C,1),SK;
      
    • ISEQUAL

      개시 가격과 종료 가격

      ISEQUAL determines if the cycle is "The opening price equal to closing price"
      
      Note:
      1、ISEQUAL is equivalent to C=O
      
      example 1:
      EVERY(ISEQUAL=1,2),CLOSEOUT; //continue for 2 k lines are “The opening price equal to closing price
      

, 그리고 모든 위치를 닫습니다.

```
  • ISLASTBAR

    주기가 마지막 K 선인지 여부를 결정

    ISLASTBAR determines if the cycle is the last k line
    
    example 1:
    VALUEWHEN(ISLASTBAR=1,REF(H,1));//The current k-line is the last k-line, taking the highest price of the previous cycle.
    
  • ISNULL

    0을 결정합니다

    ISNULL determine whether it is null or not
    
    Usage:ISNULL(N);if N is null, the function returns 1; if N is non-null, the function returns 0.
    
    Example: MA5:=IFELSE(ISNULL(MA(C,5))=1, C,MA(C,5));//Define a five-period moving average. When the number of K-lines is less than five, return the current K-line closing price.
    
  • ISUP

    상승선

    ISUP determines whether the cycle is rising
    
    Note:
    1、ISUP is equivalent to C>O
    
    example:
    ISUP=1&&C>REF(C,1),BK;   //If the current k line is a rising k line and the closing price is greater than the closing price of the previous period, then buying long.
                             //ISUP=1&&C>REF(C,1),BK; and ISUP&&C>REF(C,1),BK;
                             //Express the same meaning
    
  • 마지막

    함수 를 결정

    LAST(COND,N1,N2) Determines whether the COND condition has been met for the past N1 to N2 cycles.
    
    Note:
    1、If N1 and N2 differ by only one cycle (eg, N1=3, N2=2), the function judges whether the condition is satisfied on the cycle closest to the current K line (ie, whether the K line in the past N2 cycles is meeting the conditions)
    2、When N1/N2 is a valid value, but the current k-line number is less than N1/N2, or N1/N2 null, means is not true, and the function returns 0.
    3、N1 and N2 cannot be variables.
    
    example 1:
    LAST(CLOSE>OPEN,10,5); // indicates that it has been a rising line from the 10th cycle to the 5th cycle in the past.
    example 2:
    MA5:=MA(C,5);
    LAST(C>MA5,4,3);//determine whether the K line from the current k-line 3 cycles satisfies “C greater than MA5”.
    
  • 롱크로스

    크로스 기능 유지

    LONGCROSS(A,B,N) indicates that A is less than B in N cycles, and this cycle A up cross B from bottom to top.
    
    Note:
    1、When N is a valid value, but the current k-line number is less than N, the LONGCROSS function returns a null value.
    2、N does not support variables.
    
    example 1:
    LONGCROSS(CLOSE,MA(CLOSE,10),20); //indicates that the closing price continues below the 10-day moving average for 20 cycles and then up cross the 10-day moving average from bottom to top.
    
  • 아니죠

    아니-

    NOT(X):Take a non. Returns 1 when X=0, otherwise returns 0.
    example 1:
    NOT(ISLASTBK); If the previous signal is not a BK signal, the NOT (ISLASTBK) returns a value of 1; the previous signal is a BK signal, and the NOT (ISLASTBK) returns a value of 0.
    example 2:
    NOT(BARSBK>=1)=1;//The BK signal is sent to the current K line to satisfy the condition.
    //NOT(BARSBK>=1)=1 is equivalent to NOT (BARSBK>=1).
    
  • NULL

    null을 반환합니다

    Return null
    usage:
    MA5:=MA(C,5);
    MA10:=MA(C,10);
    A:=IFELSE(MA5>MA10,MA5,NULL),COLORRED;//When MA5>MA10, draw the five-day moving average MA5, when MA5>MA10 is not satisfied, return null value, no drawing line.
    
  • VALUEWHEN

    가치

    VALUEWHEN(COND,X) Takes the current value of X when the COND condition is true. If the COND condition is not true, take the value of X when the COND condition is established last time.
    
    Note:
    X can be either a numerical value or a condition.
    
    example 1
    VALUEWHEN(HIGH>REF(HHV(HIGH,5),1),HIGH);indicates that the current highest price is greater than the maximum value of the highest price of the first five cycles and returns the current highest price.
    example 2:
    VALUEWHEN(DATE<>REF(DATE,1),O);indicates the opening price of the first k-line of the day
    example 3:
    VALUEWHEN(DATE<>REF(DATE,1),L>REF(H,1));//indicates whether the current lowest price on the first k line of the day is greater than the highest price of the last K line yesterday. Returns 1, indicating that there is a price gap on that day. Returns 0, indicating that there are no price gap on that day.
    
  • 루프 실행 함수

    • LOOP2

      루프 조건 함수

      LOOP2(COND,A,B); loop condition function Returns A if the COND condition is true, otherwise returns B
      
      Note:
      1、COND is a judgment condition; A and B can be conditions or numerical values.
      2、the function supports variable loop reference to the previous period of its own variable, that is, support the following writing method Y: = LOOP2 (CON, X, REF (Y, 1));
      
      example 1:
      X:=LOOP2(ISUP,H,REF(X,1));//k line is the rising line, take the highest price of the current K line, otherwise take the highest price of the pervious K line that is a rising k line; if it has not appeared before, X returns null
      
      example 2:
      BB:=LOOP2(BARSBK=1,LOOP2(L>LV(L,4),L,LV(L,4)),LOOP2(L>REF(BB,1),L,REF(BB,1)));//When holding long position, the lowest price in the first 4 cycles of opening position k line is the starting stop loss point BB, if the lowest price of the subsequent K line is higher than the previous lowest price, taking the current lowest price as stop loss point, otherwise take the previous lowest point to be the stop loss point.
      SS:=LOOP2(BARSSK=1,LOOP2(H<HV(H,4),H,HV(H,4)),LOOP2(H<REF(SS,1),H,REF(SS,1)));// When holding short position, the highest price in the first 4 cycles of opening position k line is the starting stop loss point SS, if the highest price is lower than the previous highest price, taking the current highest price as stop loss point, Otherwise take the previous high point as stop lose points
      H>HV(H,20),BK;
      L<LV(L,20),SK;
      C<BB,SP;
      C>SS,BP;
      AUTOFILTER;
      
      
  • 재무 통계 기능

    • 바스카운트

      첫 번째 유효 기간에서 현재 한 사이클의 수

      BARSCOUNT(COND) The number of cycles that the first valid period to the current one
      
      Note:
      1、The return value is the number of cycles from which the COND is calculated from the first valid period and up to now.
      2、The return value of BARSCOUNT(COND) on the current k line on the condition that the condition is first established is 0.
      
      example:
      BARSCOUNT(MA(C,4));//The calculation MA(C,4) has the first return value to the current number of cycles.
      
    • BARSLAST

      마지막 조건은 사실로 판정되었습니다.

      BARSLAST(COND):The last condition COND was established to the current number of cycles
      
      Note:
      1、The return value of BARSLAST(COND) on the current k line is 0.
      
      example 1:
      BARSLAST(OPEN>CLOSE); //The number of cycles from the previous falling k line to the present
      Example 2:
      N:=BARSLAST(DATE<>REF(DATE,1))+1;//minute period, the number of k line on the current day.
      //Because the condition is established, the return value of BARSLAST(COND) on the current k line is 0, so "+1" is the k-line number of current day.
      
    • 바르센스

      첫 번째 조건은 현재 사이클의 수로 설정됩니다

      BARSSINCE(COND) The first condition is established to the current number of cycles.
      
      Note:
      1、the return value is the first time the COND is established to the current number of cycles
      2、The return value of BARSSINCE (COND) on the current k-line of the condition established for the first time is 0.
      
      example :
      BARSSINCE(CLOSE>OPEN);
      //Statistics of the number of cycles from the K line that satisfies the condition of the first line to the present.
      
    • BARSSINCEN

      통계 N 기간의 첫 번째 조건은


더 많은