Charts
DataOn-chain
VIP
Market Cap
API
Rankings
CoinOSNew
CoinClaw🦞
Language
  • 简体中文
  • 繁体中文
  • English
Leader in global market data applications, committed to providing valuable information more efficiently.

Features

  • Real-time Data
  • Special Features
  • AI Grid

Services

  • News
  • Open Data(API)
  • Institutional Services

Downloads

  • Desktop
  • Android
  • iOS

Contact Us

  • Chat Room
  • Business Email
  • Official Email
  • Official Verification

Join Community

  • Telegram
  • Twitter
  • Discord

© Copyright 2013-2026. All rights reserved.

简体繁體English
|Legacy

AICoin Custom Indicator Function Documentation - Data Types and Function Definitions

CN
AiCoin
Follow
2 years ago
AI summarizes in 5 seconds.

Data Types

nan

Represents the keyword "unavailable," indicating that a variable has not been assigned a value.

Syntax version required // @version=2 

Example

int a = nan ;
b = na(a) ; // true

var

"var" is a keyword used to allocate and initialize variables in one step.

Syntax version required // @version=2 

Example

var int a = 4;
var b = nan;
var c;    // c has no value and cannot be calculated

varip

"varip" is a keyword used to allocate and initialize variables in one step. Variables and fields declared with varip retain their values between script executions on the same root K-line and are updated in real-time K-lines.

Syntax version required // @version=2 

Example

varip int a = 4;
varip b = nan; // any type
varip c;    // c has no value and cannot be calculated

int

Integer type

Syntax version required // @version=2 

Example

int a = 4;
a = 4;    // Judged as int type

float

Floating point number type

Syntax version required // @version=2 

Example

float a = 4.0;
a = 4.0;     // Judged as float type

string

String type

Syntax version required // @version=2 

Example

string a = '4';

bool

Boolean type, with the values true and false

Syntax version required // @version=2 

Example

bool a = true;
a = true;
bool b = false;
b = false;

Function Definition

func

Custom function structure

Example

ma10 = ma(close,10)
func_ma(x,y) {
    sum = 0.0 ;
    for (i = 0; i < y; i++){
        sum := sum + x[i]/y ;
    }
    return sum ;
}
func_ma10 = func_ma(close, 10) ;

Related Reading:

AICoin Custom Indicator Function Documentation—Market Data

AICoin Custom Indicator Function Documentation—Indicator Functions

AICoin Custom Indicator Function Documentation—Calculation Functions

AICoin Custom Indicator Function Documentation—Configuration and Trading Functions

Function Documentation—Drawing, Alerts, and Conditional Expressions

AICoin Custom Indicator Function Documentation—Summary of Operators

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

|
|
APP
Windows
Mac
Share To

X

Telegram

Facebook

Reddit

CopyLink

|
|
APP
Windows
Mac
Share To

X

Telegram

Facebook

Reddit

CopyLink

Selected Articles by AiCoin

11 hours ago
At 3 PM, Senior AiCoin will be live: After Wash takes the stage, how will the 2026 crypto bull market go? (Membership giveaway)
15 hours ago
【AiCoin丨5.13 Snapshot: Inflation Rises, Federal Reserve Changes Leadership, Large Investors Short】
1 day ago
At 4 PM, AiCoin editor live stream: 45 minutes to determine buy and sell points (free for members)
View More

Table of Contents

|
|
APP
Windows
Mac
Share To

X

Telegram

Facebook

Reddit

CopyLink

Related Articles

avatar
avatarAiCoin研究院
11 hours ago
45 minutes line find buy sell points
avatar
avatarAiCoin研究院
1 day ago
BOLL Practical Combat | On-Chain K Line Investment Techniques
avatar
avatarAiCoin研究院
6 days ago
Capture key positions, just use chip distribution.
avatar
avatarAiCoin研究院
7 days ago
Fibonacci Take Profit | K-Line Analysis Practical Training
avatar
avatarAiCoin研究院
13 days ago
Doge Carnival Season | New and old friends' commissions temporarily increased to 10%
APP
Windows
Mac

X

Telegram

Facebook

Reddit

CopyLink