分析家公式网,提供指标公式,股票软件 用户登录  |  用户 注册

软件名称:[B]双均线 EA交易模型(指数移动均线和一条调整移动均线)[/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-20 02:35:14
软件简介:

  • 内容: 给大家一个双均线交易模型,欢迎大家试用指教 仅供参考或作范例之用。

    源码:

    //------------------------------------------------------------------------
    // 简称: EA
    // 名称: EA交易模型
    // 类别: 交易指令
    // 类型: 其他程序化交易 www.cxh99.com
    // 输出: 一条指数移动均线和一条调整移动均线(适应性移动平均线)
    //------------------------------------------------------------------------
    Params
            Numeric Length1(16);
            Numeric Length2(80);
        Numeric FastAvgLength(2);
            Numeric SlowAvgLength(30);
    Vars   
            NumericSeries AMA;
            NumericSeries EMA;
            Bool Condition1;
            Bool Condition2;
            Numeric TotalEquity;
            Numeric UseMargin;
            Numeric EntryLots;
    Begin
            TotalEquity = CurrentCapital()+ Abs(CurrentContracts()*Close*ContractUnit()*BigPointValue()*MarginRatio());
            UseMargin = Close*ContractUnit*BigPointValue*MarginRatio;
            EntryLots = IntPart(TotalEquity*0.25/UseMargin);
            AMA = AdaptiveMovAvg(Close,Length1,FastAvgLength,SlowAvgLength);
            EMA = XAverage(Close, Length2);
            if (AMA>EMA)
            {
                    Buy(EntryLots,NextOpen,True);
            }
            if (EMA>AMA)
            {
                SellShort(EntryLots,NextOpen,True);
            }
    End


    //------------------------------------------------------------------------
    // 编译版本        GS2004.06.12
    // 用户版本        2010/07/26 13:21
    // 版权所有        mmc29170
    // 更改声明        TradeBlazer Software保留对TradeBlazer评台
    //                        每一版本的TrabeBlazer公式修改和重写的权利
    //------------------------------------------------------------------------

[url=http://www.70822.com/soft/sort013/sort083/down-59377.html]双均线 EA交易模型(指数移动均线和一条调整移动均线)[/url]

关于本站 | 网站帮助 | 广告合作 | 声明 | 友情连接 | 网站地图 |
分析家公式网声明:本站所有股票公式软件资料均网上公开收集,如侵权请联系删帖。站内所有广告,均与本站无关!
Copyright © 2003-2024 70822.Com. All Rights Reserved .
页面执行时间:31.25000 毫秒