您需要 登录 才可以下载或查看,没有帐号?注册
#property copyright Copyright ?2007, 520FX Corp.
#property link http://www.520fx.com
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Yellow
double Ma[];
extern int N=20;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(1);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,Ma);
//----
Del();
return(0);
}
int start()
{
int i;
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars0) counted_bars--;
limit=Bars-counted_bars;
for (i=limit-1;i i--)
{
Ma i =iMA(NULL,0,N,0,MODE_SMA,PRICE_CLOSE,i);
}
Write();
return(0);
}
void Write()
{
writetext( 均线价格 ,DoubleToStr(Ma[0],Digits),10,15,Yellow,12);
}
void Del()
{
ObjectDelete( 均线价格
}
void writetext(string Labelname,string data,int x,int y,color ColorValue,int FontSize)//通过Object写文字
{
ObjectDelete(Labelname);
ObjectCreate(Labelname, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Labelname, data, FontSize, Arial , ColorValue);
ObjectSet(Labelname, OBJPROP_CORNER, 0);
ObjectSet(Labelname, OBJPROP_XDISTANCE, x);
ObjectSet(Labelname, OBJPROP_YDISTANCE, y);
}
帮我把里面的代码改下,改成这个图这样 价格显示在均线末端的?file:///C:documents and SettingsAdministratorApplication DataTencentUsers23692983QQWinTempRichOle}(3A7Z_R$C6@O%2DWH)@685.jpg 2012-10-11 22:07 上传
下载附件 (55.19 KB)
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!