购买的指标如何调用

要添加评论,请登录注册
Wen Jin Zhao
129
Wen Jin Zhao  
求解
Ziheng Zhuang
30816
Ziheng Zhuang  

我给你一个MT4的示范, 假设指标的名称叫 XXX

//+------------------------------------------------------------------+
//|                                     test_callMarketIndicator.mq4 |
//|                                          Copyright 2018,fxMeter. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018,fxMeter."
#property link      "https://www.mql5.com/en/users/fxmeter/"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
//--call market indicator with default paremeters.
   double v=iCustom(NULL,0,"\\Market\\XXX",0,0);
   Comment("v = ",DoubleToString(v,2));
  }
//+------------------------------------------------------------------+
enbo lu
版主
1971
enbo lu  
你应该问下卖给你指标的人,指标的输出值有哪些,对应关系等。让他给你说明。然后自己再用icustom调用输出值
要添加评论,请登录注册