金字塔交易系统中移动止损得范例
-
相关简介:金字塔公式 金字塔模型策略源码: VARIABLE: aspect=0; //初始化假定做多头 VARIABLE: stopprice=0;//止损价格变量 VARIABLE: stopnum = 10; //止损价差 RUNMODE:0; //工作于逐周期模式 if barpos = 0 then stopprice := l - stopnum; if aspect = 0 then begin //多头处理 if l = stopprice then begin //多反空 aspect:
-
文章来源:公式网 发布时间:2015-10-25浏览次数:
金字塔公式 金字塔模型策略源码:
VARIABLE: aspect=0; //初始化假定做多头
VARIABLE: stopprice=0;//止损价格变量
VARIABLE: stopnum = 10; //止损价差
RUNMODE:0; //工作于逐周期模式
if barpos = 0 then
stopprice := l - stopnum;
if aspect = 0 then
begin
//多头处理
if l <= stopprice then
begin
//多反空
aspect:= 1;
stopprice := h+stopnum;
end
//处理移动的底部
if l - stopnum > stopprice then
stopprice := l-stopnum;
end
if aspect = 1 then
begin
//空头处理
if h >= stopprice then
begin
//空反多
aspect:= 0;
stopprice := l-stopnum;
end
//处理移动的底部
if h + stopnum < stopprice then
stopprice := h+stopnum;
end
//画线


现在就去充值积分
加入VIP可下载100以下的所有资源