Grammar Operator

Self-programming module supported operators

Operator meaning example

+Addition
CLOSE+OPEN; return the sum of the closing price and the opening price.

-Subtraction
CLOSE-OPEN; returns the difference between the closing price and the opening price.

*multiplication
CLOSE*OPEN; returns the product of the closing price and the opening price.

/Division
CLOSE/OPEN; return quotient of the closing price divide by opening price.

&& and, can also be abbreviated as AND
CLOSE>OPEN&&REF(CLOSE>OPEN,1); returns 1 when the current k line and the previous k line are all rising lines (positive k line, closing price > opening price), otherwise returns 0.

|| or, can also be abbreviated as OR
CLOSE>OPEN||REF(CLOSE>OPEN,1); return 1 when the current k line close as a positive k line (same as above) or the previous k line close as a positive k line, otherwise returns 0.

> greater than
CLOSE>OPEN; when the closing price of the current k line is greater than the opening price (positive line), returns 1, otherwise it returns 0.

< less than
CLOSE<OPEN; when the closing price of the current k line is less than the opening price (negative line), return 1, otherwise returns 0.

>= greater than or equal
CLOSE>=2000; when the current k-line closing price is greater than or equal to 2000, return 1, otherwise return 0.

<= less than or equal to
CLOSE<=2000; when the current k-line closing price is less than or equal to 2000, return 1, otherwise returns 0.

<> does not equal
DATE<>REF(DATE,1); when the date of the current k line is different from the date of the previous k line (when the current k line is the first k line of the day), return 1, otherwise returns 0.

= equal
TIME=1459; when the time of the current k line is 14:59, return 1, otherwise return 0.

:= declare the variable (the line is not displayed when the model is loaded)
AA:=(OPEN+CLOSE)/2; declare the variable AA. AA does not display lines on the k line chart when the model is loaded.

: declare variables (display line on the k line chart when the model is loaded)
AA: (OPEN + CLOSE) / 2; define the variable AA, AA displays the line on the k line chart when the model is loaded.

^^ Define variables (Displayed in the main k line chart with additional coordinates)

AA^^(OPEN+CLOSE)/2;//Define the variable AA. When the main k line chart is loaded, regardless of the indicator property, AA is displayed in the main chart as the attached coordinate.

.. define variables (displayed in independent coordinates)

AA..(OPEN+CLOSE)/2;//Define the variable AA. When the main k line chart is loaded, regardless of the indicator property, AA is displayed in the main chart as the independent coordinate.

To be continued...

Leave a Reply

Your email address will not be published. Required fields are marked *