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;
      

      एम भाषा में, डेटा वॉल्यूम से एक सरल अंतर किया जाता हैः

      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, सच या गलत, उदाहरण के लिएः 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.
      
      • नामकरण के नियम

        अधिकांश प्रणालियों में, चर नामकरण प्रणाली आरक्षित शब्दों (निर्मित चर नाम, फ़ंक्शन नाम) के उपयोग की अनुमति नहीं देता है, जैसे कि प्रसिद्ध क्लोज, सी। इसके अलावा, शुद्ध संख्याओं की अनुमति नहीं है, या संख्याएं शुरू होती हैं, और बहुत लंबी नहीं हो सकती हैं, विभिन्न प्रणालियां, और विभिन्न लंबाई सीमाएं अलग हैं। वास्तव में, आपको अंग्रेजी विश्लेषण के लिए मुख्यधारा की प्रणाली की दक्षता को उलझाने की आवश्यकता नहीं है। मेरा मानना है कि M भाषा अंग्रेजी बोलने वालों के लिए बहुत अनुकूल है। मैं आपको निम्नलिखित नामकरण सम्मेलन का उपयोग करने की सलाह देता हूंः

        अंग्रेजी + रेखांकित

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

        यदि आप अंग्रेजी पसंद करते हैं, तो कृपया लोगों को अपने चर के अर्थ को यथासंभव समझने दें। नामकरण विधियों का उपयोग न करें जैसेः ए 1, एएए, बीबीबी... मेरा विश्वास करो, कुछ दिनों के बाद, जब आप फिर से अपने संकेतक कोड की समीक्षा करते हैं, तो आपको स्मृति की कमी के कारण बहुत दर्द होगा। इसी तरह, जब आप कोड को दूसरों को निर्यात करते हैं, तो पाठक की मानसिकता गिर गई होगी।

        तो, अब से, M Language को जितना हो सके अपनाएं! मुझे आशा है कि यह आपके विश्लेषण और निर्णय लेने के लिए एक शक्तिशाली उपकरण होगा।

    • डेटा का प्रकार

      डेटा प्रकार एक बुनियादी अवधारणा है. प्रोग्रामिंग में, जब हम एक चर के लिए एक स्पष्ट डेटा असाइन करते हैं, चर स्वयं डेटा का प्रकार बन जाता है.

        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. बूलियन प्रकार (बूलियन):

        सही के लिए 1 और गलत के लिए 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
          
      • संबंधपरक संचालक

        संबंधपरक संचालक द्विआधारी संचालक हैं जिनका उपयोग सशर्त अभिव्यक्तियों में किया जाता है। दो डेटा के बीच संबंध निर्धारित करने के लिए उपयोग किया जाता है

        रिटर्न मानः बूलियन प्रकार, सही नहीं (1), गलत होना चाहिए (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. तर्क और &&, इसके बजाय and का उपयोग कर सकते हैं, और कनेक्शन के बाएं और दाएं पक्षों को एक ही समय में सच होना चाहिए।
        // 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 वास्तव में कोड का एक टुकड़ा है जो एक निश्चित फ़ंक्शन को लागू करता है और इसे अन्य कोड द्वारा बुलाया जा सकता है। सामान्य रूप इस प्रकार है

        function(param1,param2,……)
        
        • संरचनाः

          फलन का नाम (पैरामीटर 1, पैरामीटर 2,...), कोई पैरामीटर नहीं हो सकता है, कई पैरामीटर हो सकते हैं, जैसे कि MA(x, n); आंतरिक x के सरल चलती औसत का प्रतिनिधित्व करता है, जहां MA() एक है।

          किसी फ़ंक्शन का उपयोग करते समय, हमें फ़ंक्शन की मूल परिभाषा को समझने की आवश्यकता होती है, अर्थात फ़ंक्शन को कॉल करके क्या डेटा प्राप्त किया जा सकता है। सामान्य तौर पर, फ़ंक्शन में पैरामीटर होते हैं। जब हम पैरामीटर पास करते हैं, तो हमें यह सुनिश्चित करने की आवश्यकता होती है कि पास किया गया डेटा प्रकार अनुरूप है। वर्तमान चरण में, अधिकांश आईडीई का कोड संकेत फ़ंक्शन बहुत अपूर्ण है। वे दिए गए पैरामीटर के लिए कुछ डेटा प्रकार नहीं दिखा रहे हैं, जो हमें कुछ परेशानी देता है। 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 है, मूल्य 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, ma10 C (बंद कीमत) है, वास्तव में C भी एक कार्य है (खुलने के बाद से बंद मूल्य अनुक्रम लौटाने), लेकिन इसमें कोई पैरामीटर नहीं है। दूसरा पैरामीटर 5, 10,यह MA () फ़ंक्शन को बताने के लिए उपयोग किया जाता है, हम कितने दिनों के लिए बंद मूल्य का चलती औसत प्राप्त करना चाहते हैं, पैरामीटर के माध्यम से, फ़ंक्शन अधिक लचीला हो जाता है।

      • कैसे सीखें

          1. सबसे पहले, आपको function के कार्य को समझने की आवश्यकता है, जो कि यह कार्य हमें क्या डेटा दे सकता है।
          1. रिटर्न मान के प्रकार को समझते हुए, हम रिटर्न मान प्राप्त करने के लिए फ़ंक्शन का उपयोग करते हैं।
          1. हम पैरामीटर के डेटा प्रकार को समझने की जरूरत है, एमए (एक्स, एन), यदि आप पैरामीटर एक्स, एन के डेटा प्रकार को नहीं जानते हैं, तो आप सही ढंग से रिटर्न मूल्य प्राप्त नहीं कर सकते।

        निम्नलिखित कार्य परिचय में, उपरोक्त तीन सिद्धांतों का पालन करें।

    • भाषा में सुधार

      • एम भाषा और जावास्क्रिप्ट भाषा के बीच मिश्रित प्रोग्रामिंग

        %%
        // 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, एक उद्घाटन स्थिति और एक समापन स्थिति संकेत फ़िल्टरिंग मॉडल

        मॉडल में, एक उद्घाटन और एक समापन के संकेत फ़िल्टरिंग को नियंत्रित करने और महसूस करने के लिए 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);
        
      • एक सिग्नल मॉडल के साथ एक के-लाइन

        एक सिग्नल मॉडल के साथ एक के-लाइन को एक क्लोजिंग प्राइस मॉडल और एक इंस्ट्रक्शन प्राइस मॉडल में विभाजित किया जा सकता है।

        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-लाइन से कई संकेतों को नियंत्रित करने और लागू करने के लिए एक 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

      • उप-आरेख अतिरिक्त संकेतक

        चर को मान निर्दिष्ट करते समय माध्यमिक आरेख पर प्रदर्शित होने वाले संकेतक को सेट करने के लिए ऑपरेटर : का प्रयोग करें।

        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.*)
          
      • इनपुट विधि

        कोड लिखते समय, यह अक्सर एक प्रतीक त्रुटि का कारण बनता है क्योंकि इनपुट विधि चीनी और अंग्रेजी के बीच स्विच करती है। सामान्य प्रकार इस प्रकार हैंः कॉलन:, टर्मिनेटर; अल्पविराम, कोष्ठक (), आदि, चीनी और अंग्रेजी में इन विभिन्न वर्णों पर ध्यान देने की आवश्यकता है।

      • त्रुटि-प्रवण तर्क

        1. कम से कम के लिए कम से कम के लिए कम से कम के लिए>=
        2. अधिकतर अधिकतर नहीं: संबंधित संबंध संचालक<=
  • K पंक्ति डेटा संदर्भ

    • खुला

      K-लाइन चार्ट का उद्घाटन मूल्य प्राप्त करें

      आरंभिक मूल्य

      कार्यःओपन,संक्षिप्त रूप से 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).
      
    • उच्च

      के-लाइन चार्ट की उच्चतम कीमत प्राप्त करें

      उच्चतम मूल्य

      कार्यः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-लाइन चार्ट की सबसे कम कीमत प्राप्त करें

      सबसे कम कीमत

      कार्यः LOW, L के रूप में छोटा

      पैरामीटरः कोई नहीं

      स्पष्टीकरणः चक्र की सबसे कम कीमत लौटाता है।

      अनुक्रमिक डेटा

      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

      के-लाइन चार्ट की मात्रा प्राप्त करें

      व्यापार की मात्रा

      कार्यः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).
      
    • आरईएफ

      अग्रिम संदर्भ

      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.
      
  • समय समारोह

    • बारपोस

      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;
      
    • वर्ष

      वर्ष

      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;
      
    • दिन

      एक चक्र में दिनों की संख्या प्राप्त करें

      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.
      
    • मिनट

      मिनट

      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(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
      
    • नीचे

      गिरती 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 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

    शून्य निर्धारित करें

    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 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).
    
  • शून्य

    शून्य लौटाता है

    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(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.
      
    • बार्सिनसेन

      सांख्यिकी N अवधि में पहली शर्त स्थापित करना है


अधिक