小公式语法

2019-08-29  本文已影响0人  风___________

关键字

high : 当前最高价
open : 当前开盘价
close : 当前收盘价
low : 当前最低价
high[n] : 当前往前数第n根线的最高价.

变量声明

variable: max_high = -1;

变量赋值

max_high := 999;

if 语句

if max_high>1 then
// 逻辑
else if max_high>0 then
// 逻辑
else
// 逻辑
endif

for循环

for i in 1 to 20 do
// 逻辑
end

函数声明

function max(a,b) do
    variable: max = a;
    if a < b then
     max := b;
    endif
    return max;
end

function add(a,b) do
return a+b;
end
上一篇 下一篇

猜你喜欢

热点阅读