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

18 hours ago
At 4 PM, AiCoin Research Institute live broadcast: After ten years of trading coins, is there no opportunity left in the cryptocurrency market? Will you switch to the US stock market? (Sending red envelopes)
20 hours ago
Iran's decision to impose a toll on the Strait of Hormuz means what for oil prices and cryptocurrency.
21 hours ago
Polymarket bids farewell to zero fees: Who is paying for liquidity?
View More

Table of Contents

|
|
APP
Windows
Mac
Share To

X

Telegram

Facebook

Reddit

CopyLink

Related Articles

avatar
avatarAiCoin研究院
1 day ago
Trump turns against! BTC makes a fortune, only 60 hours left.
avatar
avatarAiCoin研究院
3 days ago
The large pancake has fallen below 70,000, this "airdrop raid" has violently recovered! Are you ready?
avatar
avatarAiCoin研究院
6 days ago
Who was selling during the plummet last night?
avatar
avatarAiCoin研究院
7 days ago
315 Counterfeit Fighting Continues, Cryptocurrency Circle Avoid Pitfall God Live Broadcast!
avatar
avatarAiCoin研究院
9 days ago
Earn 28% in 9 Minutes! DEX Investment Essentials Live Stream | OKX Wallet Step-by-Step Tutorial
APP
Windows
Mac

X

Telegram

Facebook

Reddit

CopyLink