void Print(
argument, // first value
… // next values
);
Parameters
[in] Any values separated by commas. The number of parameters cannot exceed 64.
Note
Arrays cannot be passed to the Print() function. Arrays must be input element-by-element.
例子1
Print("c=",c, " Pi=",M_PI, " (float)M_PI=",(float)M_PI);
// c=3.14159 Pi=3.141592653589793 (float)M_PI=3.14159
Number of bars in the current chart.
例子2
printf(Bars);//2018.11.28 10:36:48.160 柱体标号索引学习 EURUSD,H1: 2221//2018.11.28 10:35:55.080 柱体标号索引学习 EURUSD,H4: 8031//2018.11.28 10:36:26.926 柱体标号索引学习 EURUSD,Daily: 2049
例子3
int counter=1; for(int i=1; i<=Bars; i++) { Print(Close[i-1]); }/*0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.12909
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.1313
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.16021
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.16069
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.16898
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.16816
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.1691
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.20767
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.23257
.....
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.1091
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.1334
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.1113
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: 1.0819
0 10:57:08.496 柱体标号索引学习 EURUSD,Monthly: initialized*/
int iBars(
string symbol, // symbol
int timeframe // timeframe
);
Parameters
symbol
[in] Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe
[in] Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.
Returned value
The number of bars on the specified chart.
例子4
Print("Bar count on the 'EURUSD,H1' is ",iBars("EURUSD",PERIOD_H1));//2018.11.28 10:38:16.128 柱体标号索引学习 EURUSD,H4: Bar count on the 'EURUSD,H1' is 2221//2018.11.28 10:38:37.721 柱体标号索引学习 EURUSD,H1: Bar count on the 'EURUSD,H1' is 2221
本文发布于:2024-02-05 05:08:27,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170724860763312.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |