mt4指標(biāo)求改寫謝謝管理員 [文華財(cái)經(jīng)]
- 咨詢內(nèi)容:
#property copyright "Copyright 2010, Free Scalping Indicator"#property link "freescalpingindicators.com"
#property indicator_separate_window#property indicator_buffers 3#property indicator_color1 Blue#property indicator_color2 Yellow#property indicator_color3 Red
extern int intensity = 18;extern int periods = 800;double G_ibuf_84[];double G_ibuf_88[];double G_ibuf_92[];
int init() { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2, Yellow); SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 2, Red); SetIndexBuffer(0, G_ibuf_84); SetIndexBuffer(1, G_ibuf_88); SetIndexBuffer(2, G_ibuf_92); IndicatorShortName("All Free - FREESCALPINGINDICATORS.COM"); SetIndexLabel(1, NULL); SetIndexLabel(2, NULL); return (0);}
int start() { int Li_0; double Ld_8; double Ld_16; double Ld_80; int Li_4 = IndicatorCounted(); double Ld_32 = 0; double Ld_40 = 0; double Ld_unused_48 = 0; double Ld_unused_56 = 0; double Ld_64 = 0; double Ld_unused_72 = 0; double low_88 = 0; double high_96 = 0; if (Li_4 > 0) Li_4--; if (periods > Bars || periods == 0) Li_0 = Bars - intensity; else Li_0 = periods - intensity; for (int Li_104 = Li_0; Li_104 >= 0; Li_104--) { high_96 = High[iHighest(NULL, 0, MODE_HIGH, intensity, Li_104)]; low_88 = Low[iLowest(NULL, 0, MODE_LOW, intensity, Li_104)]; Ld_80 = (High[Li_104] + Low[Li_104]) / 2.0; Ld_32 = 0.66 * ((Ld_80 - low_88) / (high_96 - low_88) - 0.5) + 0.05 * Ld_40; Ld_32 = MathMin(MathMax(Ld_32, -0.999), 0.999); G_ibuf_84[Li_104] = MathLog((Ld_32 + 1.0) / (1 - Ld_32)) / 2.0 + Ld_64 / 2.0; Ld_40 = Ld_32; Ld_64 = G_ibuf_84[Li_104]; } bool Li_108 = TRUE; for (Li_104 = Li_0 - 2; Li_104 >= 0; Li_104--) { Ld_16 = G_ibuf_84[Li_104]; Ld_8 = G_ibuf_84[Li_104 + 1]; if ((Ld_16 < 0.0 && Ld_8 > 0.0) || Ld_16 < 0.0) Li_108 = FALSE; if ((Ld_16 > 0.0 && Ld_8 < 0.0) || Ld_16 > 0.0) Li_108 = TRUE; if (!Li_108) { G_ibuf_92[Li_104] = Ld_16; G_ibuf_88[Li_104] = 0.0; } else { G_ibuf_88[Li_104] = Ld_16; G_ibuf_92[Li_104] = 0.0; } } return (0);} - 文華技術(shù)人員:
上面編寫中用到了數(shù)組和循環(huán)的嵌套,目前暫不支持改寫
建議您參考下帖,學(xué)習(xí)一下文華的麥語言,來實(shí)現(xiàn)您的思路:http://help.shwebstock.com.cn/dispbbs.asp?boardid=14&Id=472786
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容