欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → MC转金字塔哈

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2633人关注过本帖树形打印复制链接

主题:MC转金字塔哈

帅哥哟,离线,有人找我吗?
gogokuer
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:25 积分:0 威望:0 精华:0 注册:2017/3/7 9:53:14
MC转金字塔哈  发帖心情 Post By:2017/12/18 11:11:30    Post IP:61.140.26.145[只看该作者]

 Inputs:lots(1),malen1(2),malen2(78),bolen(28),pp(0),pp2(0),dqsma(296);
variables:
v_AT_highest_bolen(0), v_AT_lowest_bolen(0), AV_Range(0), AV_MA1(0), AV_MA2(0),AV_DQ(0),highest_bolen(0),
AT_highest_bolen(0),lowest_bolen(0),AT_lowest_bolen(0),b_price(0),s_price(0),sell_price(0),btc_price(0),t_av_range(0);
AV_Range= AvgTrueRange(14);
AV_MA1 = Average(C, malen1); 
AV_MA2 = Average(C, malen2); 
AV_DQ = Average(C, dqsma); 
t_av_range= AV_DQ;
highest_bolen = Highest(H, bolen); 
AT_highest_bolen = AV_Range * pp + highest_bolen;
v_AT_highest_bolen= AT_highest_bolen;
lowest_bolen = Lowest(L, bolen); 
AT_lowest_bolen = lowest_bolen - AV_Range * pp2;
v_AT_lowest_bolen= AT_lowest_bolen;
if (MarketPosition= 0 and AV_MA1> AV_MA2 and Close> t_av_range)then   buy("LE") lots shares next bar at v_AT_highest_bolen stop;
if (MarketPosition= 0 and AV_MA1< AV_MA2 and Close< t_av_range) then  sellshort("SE") lots shares next bar at v_AT_lowest_bolen stop;
if (MarketPosition= 1 and AV_MA1< AV_MA2 )then  sell("SX") all shares next bar at   v_AT_lowest_bolen stop;
if (MarketPosition= -1 and AV_MA1> AV_MA2 )then buytocover("LX") lots shares next bar at v_AT_highest_bolen stop;


其实策略还蛮简单的,就是短均线大于长均线,并且收盘穿上轨做多~麻烦改一下,谢谢老师~谢谢!


 回到顶部
帅哥哟,离线,有人找我吗?
FireScript
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:14496 积分:0 威望:0 精华:0 注册:2017/7/4 13:40:18
  发帖心情 Post By:2017/12/18 11:26:14    Post IP:180.169.30.6[只看该作者]

MC里面的函数和关键字 只是很模糊的懂是什么意思。 具体细节不得而知了。 你可以把上面策略详细的描述下,这样更方便我们处理。


命数如织,当如磐石。
 回到顶部