- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
文华赢智算法交易-操作符
+ | 加法 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high+Price("m1109","New");//表示求m1109当前最高价及当前价格的和。
} | - | 减法 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high-Price("m1109","New");//表示求m1109当前最高价及当前价格的差。
} | * | 乘法 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high*Price("m1109","New");//表示求m1109当前最高价及当前价格的乘积。
} | / | 除法 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high/Price("m1109","New");//表示求m1109当前最高价及当前价格的商。
} | && | 并且运算 |
VAR high,low;
VOID MAIN()
{
high=High("m1109","High");//high的值为合约m1109当前最高价 low=Price("m1109","Low");//low的值为合约m1109当前最低价 high>Price("m1109","New")&&low<Price("m1109","New");//表示判断m1109当前最高价是否大于价格,并且,最低价小于当前价格。
} | || | 或者运算 |
VAR high,low;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
low=Price("m1109","Low");//low的值为合约m1109当前最低价
high>Price("m1109","New")||low<Price("m1109","New");//表示判断m1109当前最高价是否大于价格,或者,最低价小于当前价格。
} | > | 大于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high>Price("m1109","New");//表示判断m1109当前最高价是否大于当前价格。
} | < | 小于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high<Price("m1109","New");//表示判断m1109当前最高价是否小于当前价格。
} | >= | 大于等于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high>=Price("m1109","New");//表示判断m1109当前最高价是否大于等于当前价格。
} | <= | 小于等于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high<=Price("m1109","New");//表示判断m1109当前最高价是否小于等于当前价格。
} | != | 不等于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high!=Price("m1109","New");//表示判断m1109当前最高价是否不等于当前价格。
} | == | 等于运算 |
VAR high;
VOID MAIN()
{
high=Price("m1109","High");//high的值为合约m1109当前最高价
high==Price("m1109","New");//表示判断m1109当前最高价是否等于当前价格。
} | = | 为变量进行赋值 |
VAR Price;
VOID MAIN()
{
Price=Price("m1109","New");//表示将合约m1109的当前价格赋值给Price变量。 |
|
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|