Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]请老师转换。。。急,在线等

1楼
gxc 发表于:2012/4/24 15:20:47
    If(BarsSinceentry == 0)
    {
        HighestAfterEntry = Close;
        LowestAfterEntry = Close;
        If(MarketPosition <> 0)
        {
            HighestAfterEntry = Max(HighestAfterEntry,AvgEntryPrice);   // 开仓的Bar,将开仓价和当时的收盘价的较大值保留到HighestAfterEntry
            LowestAfterEntry = Min(LowestAfterEntry,AvgEntryPrice);     // 开仓的Bar,将开仓价和当时的收盘价的较小值保留到LowestAfterEntry
        }
    }else
    {
        HighestAfterEntry = Max(HighestAfterEntry,High); // 记录下当前Bar的最高点,用于下一个Bar的跟踪止损判断
        LowestAfterEntry = Min(LowestAfterEntry,Low);    // 记录下当前Bar的最低点,用于下一个Bar的跟踪止损判断
    }
2楼
rushtaotao 发表于:2012/4/24 15:23:08

试着给您转一下 稍等

 

3楼
rushtaotao 发表于:2012/4/24 15:44:19
variable:HighestAfterEntry=0;
variable:LowestAfterEntry=0;
If ENTERBARS=0 then
    begin
        HighestAfterEntry:=Close;
        LowestAfterEntry:=Close;
        If(holding <> 0) then
        begin       
            HighestAfterEntry:= Max( HighestAfterEntry,AVGENTERPRICE  );   // 开仓的Bar,将开仓价和当时的收盘价的较大值保留到HighestAfterEntry
            LowestAfterEntry:= Min(LowestAfterEntry,AVGENTERPRICE);     // 开仓的Bar,将开仓价和当时的收盘价的较小值保留到LowestAfterEntry
        end
    end
if  ENTERBARS<>0 then
begin  
        HighestAfterEntry:= Max(HighestAfterEntry,High); // 记录下当前Bar的最高点,用于下一个Bar的跟踪止损判断
        LowestAfterEntry:= Min(LowestAfterEntry,Low);    // 记录下当前Bar的最低点,用于下一个Bar的跟踪止损判断
end
共3 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03125 s, 3 queries.