您需要 登录 才可以下载或查看,没有帐号?注册
因本人刚转学MT4编程(之前用POLO),刚开始模拟使用MT4,还很吃力,请论坛里面高手帮忙修改下这个MT4的多空线指标源码,请把里面的蓝色线去掉或隐藏即可,有请各位大虾援手!附图为源码和贴图:
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 blue
#property indicator_color2 Yellow
#property indicator_color3 Red
extern int iMaPeriod = 10;
extern int iSep = 30;
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];
int init() {
SetIndexStyle(0, DRAW_LINE);
SetIndexStyle(1, DRAW_LINE);
IndicatorDigits(Digits + 1);
SetIndexStyle(2, DRAW_LINE);
SetIndexBuffer(0, g_ibuf_84);
SetIndexBuffer(1, g_ibuf_88);
SetIndexBuffer(2, g_ibuf_92);
IndicatorShortName( DKX( + iMaPeriod + )
SetIndexLabel(0, MID
SetIndexLabel(1, DKX
SetIndexLabel(2, DKXMa
return (0);
}
int deinit() {
return (0);
}
int start() {
double ld_4 = 0;
int li_12 = IndicatorCounted();
if (li_12 0) return (-1);
if (li_12 0) li_12--;
int li_0 = Bars - li_12;
for (int li_16 = 0; li_16 li_0; li_16++) {
g_ibuf_84[li_16] = (3.0 * Close[li_16] + Low[li_16] + Open[li_16] + High[li_16]) / 6.0;
Print(li_16 + : + g_ibuf_84[li_16]);
}
for (li_16 = 0; li_16 li_0; li_16++) {
ld_4 = 0;
for (int l_count_20 = 0; l_count_20 l_count_20++) ld_4 += (20 - l_count_20) * (g_ibuf_84[l_count_20 + li_16]);
g_ibuf_88[li_16] = ld_4 / 210.0;
Print( DKX: + li_16 + + g_ibuf_88[li_16]);
}
for (li_16 = 0; li_16 li_0; li_16++) g_ibuf_92[li_16] = iMAonArray(g_ibuf_88, Bars, iMaPeriod, 0, MODE_SMA, li_16);
return (0);
}
你好!我想编写一平仓条件,可一直不成功。当下单成功后赢利超过7点之后赢利又小于6点平仓。就这个平仓条件能辛苦帮我写一下吗?这样能保住赢利不会变亏损。先行谢谢了!!!~~~
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!