Numeric hh;
hh = Highest(h,mypos ); //mypos是开仓后onbaropen +1
Numeric ll;
ll = lowest(l,mypos );
If( A_BuyPosition > 0 )
{
HighestAfterEntry = Max(myhigh,High); //记录开仓最高
myhigh = High;
If( mypos >0 )
{
myhigh = hh ;
}
}
If( A_SellPosition > 0 )
{
LowestAfterEntry = Min(low,mylow);
mylow = Low;
If( mypos >0 )
{
mylow = ll ;
}
}
我想用手动计算BAR的数量来计算最高最低,这样好像不成功。有没有好的办法能记录开仓后的最高最低价。
http://www.tbquant.net/dist/index.html#/?navigate=tbfn&cid=510&position=toc42 看看帮助文档经典案例中是如何记录开仓后的最高价最低价的