股票分析:三倍波动性跟踪系统代码
2015-1-31 11:36:18 http://rumen.southmoney.com 来源:股票入门
股票分析:三倍波动性跟踪系统代码。下面南方财富网的小编为你介绍股票分析:三倍波动性跟踪系统代码。
三倍波动性跟踪系统: WLD代码
var Bar: integer;
var N: float;
PlotStops; //在主图绘损止点,方便观察。
for Bar := 45 to BarCount - 1 do //WLD中每个系统必需要从一个主循环开始。
begin
N := ATR( Bar, 10 );//计算N值
if not LastPositionActive then// 判断最近头寸是否活跃,以确定是否挂单。
begin
BuyAtStop( Bar + 1, Highest( Bar, #High, 45), ‘Buy’);//STOP挂单买进,价格45新高。
end
else
begin
SellAtStop( Bar + 1, Highest( Bar, #High, 45)-3*N, LastPosition , ‘Stop’)//损止价在45新高-3*N。
end;
end;
分析家
Input:ChannelUp(45),ATRPer(10),ATRMult(3);
TR :=max(high,close[1])-min(low,close[1]);
if barpos=ATRPer then
ATR:=ma(TR,ATRPer);
if barpos》=ChannelUp then begin
ATR:=((ATRPer-1)*ATR+TR)/ATRPer;
buyPoint:=hhv(high,ChannelUp);
sellPoint:=buyPoint-ATRMult*ATR;
if Holding = 0 then buy(100%,stop,buyPoint);
if Holding 》0 then sell(100%,stop,sellPoint);
end;
更多股票分析:三倍波动性跟踪系统代码的相关信息请关注南方财富网。
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。