比特币通信协议 - 币圈消息

比特币通信协议篇11、二、TURN简介。在典型的情况下,TURN客户端连接到内网中,并且通过一个或者多个NAT到 详细

调用神龙指标模拟报错

  [复制链接]
253 3
简单加法 发表于 2017-3-10 17:42:46 | 只看该作者 |阅读模式 打印 上一主题 下一主题
就做了个调用功能,报这个做 指标是神龙通道得指标。单独执行都没问题,我怀疑指标那里有问题。请高人指点
2017.03.10 17:28:43.969    2017.01.01 23:59:44  MHDMT_ZT GBPUSD,M5: unknown subwindow number -1 for ObjectCreate function
extern double    Lots=0.01;
extern color zhengdang=Gray;
double total;
double ic1;
int start()
  {
   开仓();
   return(0);
  }
void 开仓()
  {
   ic1=iCustom(Symbol(),0,"MHDMT_ZT",zhengdang,0,1);   
   Print(ic1+"的");
}
//////////////////////////////////////////////////////////////////////////////////////
MHDMT_ZT
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 White
#property indicator_color2 White
#property indicator_color3 Red
#property indicator_color4 Lime
#property indicator_color5 Gray
#property indicator_color6 Gray
extern color zhengdang = Gray;
double Gd_80 = 2022.0;
double Gd_unused_88 = 12.0;
double Gd_unused_96 = 31.0;
double Gd_unused_104 = 24.0;
int G_width_112 = 8;
double G_ibuf_116[];
double G_ibuf_120[];
double G_ibuf_124[];
double G_ibuf_128[];
double G_ibuf_132[];
double G_ibuf_136[];
int Gi_unused_140 = 0;
int Gi_unused_144 = 0;
string Gs_148 = "MHDMT_XMA";
string Gs_156 = "MHDMT_GRAY_BELT";
int init() {
// string Ls_unused_0;
   IndicatorBuffers(6);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, G_ibuf_116);
   SetIndexStyle(1, DRAW_LINE);
   SetIndexBuffer(1, G_ibuf_120);
   SetIndexStyle(2, DRAW_LINE, STYLE_DASH);
   SetIndexBuffer(2, G_ibuf_124);
   SetIndexStyle(3, DRAW_LINE, STYLE_DASH);
   SetIndexBuffer(3, G_ibuf_128);
   SetIndexStyle(4, DRAW_LINE);
   SetIndexBuffer(4, G_ibuf_132);
   SetIndexStyle(5, DRAW_LINE);
   SetIndexBuffer(5, G_ibuf_136);
   IndicatorShortName("MHDMT_ZT");
   SetIndexLabel(0, "ZD");
   SetIndexLabel(1, "ZK");
   SetIndexLabel(2, "KS");
   SetIndexLabel(3, "DS");
   SetIndexLabel(4, "GBH");
   SetIndexLabel(5, "GBL");
   return (0);
}
int deinit() {
   ObjectsDeleteAll(WindowOnDropped());
   return (0);
}
int start() {
   double Ld_0;
   double Ld_8;
   bool Li_16;
   bool Li_20;
   int ind_counted_24 = IndicatorCounted();
   ObjectsDeleteAll(WindowOnDropped());
   int Li_28 = WindowFirstVisibleBar();
   int highest_32 = iHighest(NULL, 0, MODE_HIGH, WindowBarsPerChart(), WindowFirstVisibleBar() - WindowBarsPerChart() + 1);
   double Ld_36 = (WindowPriceMax() - WindowPriceMin()) / 15.0;
   int window_44 = WindowOnDropped();
   ObjectDelete("duoqujian");
   ObjectCreate("duoqujian", OBJ_TEXT, 0, Time[Li_28 / 2], High[highest_32]);
   ObjectSetText("duoqujian", "【QQ:83218858红色多头区间:只做多,不做空】", 16, "黑体", Maroon);
   ObjectDelete("kongqujian");
   ObjectCreate("kongqujian", OBJ_TEXT, 0, Time[Li_28 / 2], High[highest_32] - Ld_36);
   ObjectSetText("kongqujian", "【绿色空头区间:只做空,不做多】", 16, "黑体", DarkGreen);
   ObjectDelete("zhendangqujian");
   ObjectCreate("zhendangqujian", OBJ_TEXT, 0, Time[Li_28 / 2], High[highest_32] - 2.0 * Ld_36);
   ObjectSetText("zhendangqujian", "【震荡区间:多空双向操作】", 16, "黑体", zhengdang);
   if (Year()  Ld_0 && G_ibuf_116[Li_48] > Ld_8) {
            ObjectCreate("duo" + DoubleToStr(Time[Li_48], 0), OBJ_TREND, window_44, Time[Li_48], G_ibuf_116[Li_48], Time[Li_48], G_ibuf_120[Li_48]);
            ObjectSet("duo" + DoubleToStr(Time[Li_48], 0), OBJPROP_COLOR, Maroon);
            ObjectSet("duo" + DoubleToStr(Time[Li_48], 0), OBJPROP_RAY, FALSE);
            ObjectSet("duo" + DoubleToStr(Time[Li_48], 0), OBJPROP_WIDTH, G_width_112);
            ObjectSet("duo" + DoubleToStr(Time[Li_48], 0), OBJPROP_BACK, TRUE);
         }
         if (G_ibuf_120[Li_48]  Ld_8) {
            ObjectCreate("dang" + DoubleToStr(Time[Li_48], 0), OBJ_TREND, window_44, Time[Li_48], G_ibuf_116[Li_48], Time[Li_48], G_ibuf_120[Li_48]);
            ObjectSet("dang" + DoubleToStr(Time[Li_48], 0), OBJPROP_COLOR, zhengdang);
            ObjectSet("dang" + DoubleToStr(Time[Li_48], 0), OBJPROP_RAY, FALSE);
            ObjectSet("dang" + DoubleToStr(Time[Li_48], 0), OBJPROP_WIDTH, G_width_112);
            ObjectSet("dang" + DoubleToStr(Time[Li_48], 0), OBJPROP_BACK, TRUE);
         }
         if (G_ibuf_116[Li_48 + 1]  Low[Li_48] && ((G_ibuf_120[Li_48] > Ld_0 && G_ibuf_116[Li_48] > Ld_8) || (G_ibuf_120[Li_48]  Ld_8))) {
            ObjectCreate("duosong" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], G_ibuf_128[Li_48]);
            ObjectSetText("duosong" + DoubleToStr(Time[Li_48], 0), "损", 10, "黑体", Red);
            ObjectCreate("zuoduo" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], Low[Li_48]);
            ObjectSetText("zuoduo" + DoubleToStr(Time[Li_48], 0), "多", 12, "黑体", Red);
            Li_16 = TRUE;
         }
         if (High[Li_48 + 1]  G_ibuf_120[Li_48] && ((G_ibuf_120[Li_48]  Ld_8))) {
            ObjectCreate("kongsong" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], G_ibuf_124[Li_48]);
            ObjectSetText("kongsong" + DoubleToStr(Time[Li_48], 0), "损", 10, "黑体", Lime);
            ObjectCreate("zuokong" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], High[Li_48]);
            ObjectSetText("zuokong" + DoubleToStr(Time[Li_48], 0), "空", 12, "黑体", Lime);
            Li_20 = TRUE;
         }
         if (G_ibuf_116[Li_48 + 1]  Low[Li_48] && ((G_ibuf_120[Li_48]  Ld_8)) && Li_16 == FALSE) {
            ObjectCreate("kongping" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], Low[Li_48]);
            ObjectSetText("kongping" + DoubleToStr(Time[Li_48], 0), "平", 12, "黑体", Yellow);
         }
         if (High[Li_48 + 1]  G_ibuf_120[Li_48] && ((G_ibuf_120[Li_48] > Ld_0 && G_ibuf_116[Li_48] > Ld_8) || (!G_ibuf_120[Li_48]  Ld_8)) && Li_20 == FALSE) {
            ObjectCreate("duoping" + DoubleToStr(Time[Li_48], 0), OBJ_TEXT, 0, Time[Li_48], High[Li_48]);
            ObjectSetText("duoping" + DoubleToStr(Time[Li_48], 0), "平", 12, "黑体", Yellow);
         }
      }
   }
   return (0);
}
收藏
收藏0
转播
转播
分享
分享
分享
淘帖0

精彩评论3

跳转到指定楼层
沙发
moli 发表于 2017-3-12 20:03:34 | 只看该作者
??????????????????
板凳
kl1998 发表于 2017-3-13 14:50:00 | 只看该作者
神龙指标不是漂移吗   这个指标做的ea能用吗
地板
 楼主| 简单加法 发表于 2017-3-13 14:50:31 | 只看该作者

漂移?
漂移是指得什么
,你说指标线乱跑?这倒无所谓 反正我是测试用
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题
阅读排行更多+

Powered by 顺水鱼MT4外汇EA网! X3.2© 2001-2017 顺水MT4外汇EA公司.( 陕ICP备17014341号-1