帖子
作者
回复/查看
最后发表
对不起,我忽略了论坛的背景码.现在又重新打包了一下,有需要的同学下载后解压到mt4相应的文件夹中,再重打开一下mt4,调用"顺势短线系统"模板即可
其实这三个指标都是别人在2007年发过的.顺势短线系统.rar
2009-08-19 08:30
它实质就是均线系统. 看到这东西还有人这么推崇, 就把它的源码弄来放在下面 :lol (为符合tk的坛规,删除了某论坛的地址广告和时间限制):lol
1. 顺势超短线指标.mq4
//+------------------------------------------------------------------+ //| 顺势超短线指标.mq4 | //| Copyright ?2007 | //| http: | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Aqua #property indicator_color2 Tomato extern int period = 21; extern int method = 3; extern int price = 0; double g_ibuf_88; double g_ibuf_92; double g_ibuf_96; int init() { IndicatorBuffers(3); SetIndexBuffer(0, g_ibuf_88); SetIndexBuffer(1, g_ibuf_92); SetIndexBuffer(2, g_ibuf_96); ArraySetAsSeries(g_ibuf_96, TRUE); SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2); SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2); IndicatorShortName("顺势超短线指标(" + period + ")"); return (0); } int deinit() { return (0); } double WMA(int ai_0, int a_period_4) { return (iMA(NULL, 0, a_period_4, 0, method, price, ai_0)); } int start() { double lda_16; double lda_20; int l_ind_counted_0 = IndicatorCounted(); if (l_ind_counted_0 < 0) return (-1); int li_4 = 0; int l_period_8 = MathSqrt(period); int li_12 = Bars - l_ind_counted_0 + period + 1; if (li_12 > Bars) li_12 = Bars; ArrayResize(lda_16, li_12); ArraySetAsSeries(lda_16, TRUE); ArrayResize(lda_20, li_12); ArraySetAsSeries(lda_20, TRUE); for (li_4 = 0; li_4 < li_12; li_4++) lda_16[li_4] = 2.0 * WMA(li_4, period / 2) - WMA(li_4, period); for (li_4 = 0; li_4 < li_12 - period; li_4++) g_ibuf_96[li_4] = iMAOnArray(lda_16, 0, l_period_8, 0, method, li_4); for (li_4 = li_12 - period; li_4 >= 0; li_4--) { lda_20[li_4] = lda_20[li_4 + 1]; if (g_ibuf_96[li_4] > g_ibuf_96[li_4 + 1]) lda_20[li_4] = 1; if (g_ibuf_96[li_4] < g_ibuf_96[li_4 + 1]) lda_20[li_4] = -1; if (lda_20[li_4] > 0.0) { g_ibuf_88[li_4] = g_ibuf_96[li_4]; if (lda_20[li_4 + 1] < 0.0) g_ibuf_88[li_4 + 1] = g_ibuf_96[li_4 + 1]; g_ibuf_92[li_4] = EMPTY_VALUE; } else { if (lda_20[li_4] < 0.0) { g_ibuf_92[li_4] = g_ibuf_96[li_4]; if (lda_20[li_4 + 1] > 0.0) g_ibuf_92[li_4 + 1] = g_ibuf_96[li_4 + 1]; g_ibuf_88[li_4] = EMPTY_VALUE; } } } return (0); } //------------------------------------------------- 2. 顺势短线多空指标.mq4
//+------------------------------------------------------------------+ //| 顺势短线多空指标.mq4 | //| Copyright ?2007, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_minimum -0.05 #property indicator_maximum 1.05 #property indicator_buffers 2 #property indicator_color1 White #property indicator_color2 DarkOrange extern int MaMetod = 1; extern int MaPeriod = 40; extern int SoundAlertMode = 1; double g_ibuf_88; double g_ibuf_92; double g_ibuf_96; double g_ibuf_100; double g_ibuf_104; int gi_108 = 0; bool gi_112 = FALSE; bool gi_116 = FALSE; int init() { IndicatorBuffers(5); SetIndexStyle(0, DRAW_HISTOGRAM); SetIndexBuffer(0, g_ibuf_88); SetIndexStyle(1, DRAW_HISTOGRAM); SetIndexBuffer(1, g_ibuf_92); SetIndexBuffer(2, g_ibuf_96); SetIndexBuffer(3, g_ibuf_100); SetIndexBuffer(4, g_ibuf_104); SetIndexDrawBegin(0, 10); SetIndexDrawBegin(1, 10); return (0); } int deinit() { return (0); } int start() { double l_ima_0; double l_ima_8; double l_ima_16; double l_ima_24; double ld_32; double ld_40; double ld_48; double ld_56; string ls_68; if (Bars <= 10) return (0); gi_108 = IndicatorCounted(); if (gi_108 < 0) return (-1); if (gi_108 > 0) gi_108--; for (int li_64 = Bars - gi_108 - 1; li_64 >= 0; li_64--) { l_ima_0 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_CLOSE, li_64); l_ima_8 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_LOW, li_64); l_ima_16 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_OPEN, li_64); l_ima_24 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_HIGH, li_64); ld_32 = (g_ibuf_96[li_64 + 1] + (g_ibuf_100[li_64 + 1])) / 2.0; ld_56 = (l_ima_0 + l_ima_24 + l_ima_16 + l_ima_8) / 4.0; ld_40 = MathMax(l_ima_24, MathMax(ld_32, ld_56)); ld_48 = MathMin(l_ima_16, MathMin(ld_32, ld_56)); if (ld_32 < ld_56) { g_ibuf_104[li_64] = 1; g_ibuf_88[li_64] = 0; g_ibuf_92[li_64] = 1; if (SoundAlertMode > 0 && li_64 == 0 && g_ibuf_104[1] < 0.0) PlaySound("alert2.wav"); } else { g_ibuf_104[li_64] = -1; g_ibuf_88[li_64] = 1; g_ibuf_92[li_64] = 0; if (SoundAlertMode > 0 && li_64 == 0 && g_ibuf_104[1] > 0.0) PlaySound("alert2.wav"); } g_ibuf_96[li_64] = ld_32; g_ibuf_100[li_64] = ld_56; } if (g_ibuf_104[2] < 0.0 && g_ibuf_104[1] > 0.0 && Volume[0] > 1.0 && !gi_112) { ls_68 = " " + Symbol() + " M" + Period() + ": 买入信号"; if (SoundAlertMode > 0) Alert(ls_68); gi_112 = TRUE; gi_116 = FALSE; } if (g_ibuf_104[2] > 0.0 && g_ibuf_104[1] < 0.0 && Volume[0] > 1.0 && !gi_116) { ls_68 = " " + Symbol() + " M" + Period() + ": 卖出信号"; if (SoundAlertMode > 0) Alert(ls_68); gi_116 = TRUE; gi_112 = FALSE; } return (0); } //------------------------------------- 3. 顺势超短线趋势指标.mq4
//+------------------------------------------------------------------+ //| 顺势超短线趋势指标.mq4 | //| Copyright ?2007 | //| http: | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red extern int MA = 24; extern int MA_Mode = 2; extern int MA_Price = 0; extern double Step = 0.02; extern double Maximum = 0.08; extern bool Alert_Sound = TRUE; double g_ibuf_108; double g_ibuf_112; int gi_116; int gi_120; double gd_124; double gd_132; double gd_140; double gd_148; double gd_156; bool gi_164 = TRUE; int gi_168 = 0; int g_time_172 = 0; int init() { SetIndexStyle(0, DRAW_ARROW); SetIndexArrow(0, 159); SetIndexBuffer(0, g_ibuf_108); SetIndexStyle(1, DRAW_LINE); SetIndexBuffer(1, g_ibuf_112); return (0); } void SaveLastReverse(int ai_0, int ai_4, double ad_8, double ad_16, double ad_24, double ad_32, double ad_40) { gi_116 = ai_0; gi_120 = ai_4; gd_124 = ad_8; gd_140 = ad_16; gd_132 = ad_24; gd_148 = ad_32; gd_156 = ad_40; } int start() { bool li_0; double ld_4; double ld_12; double ld_20; double ld_28; double ld_36; double ld_44; double ld_52; double ld_60; int l_ind_counted_72 = IndicatorCounted(); for (int li_68 = 0; li_68 < Bars - MA - 2; li_68++) g_ibuf_112[li_68] = iMA(NULL, 0, MA, 0, MA_Mode, MA_Price, li_68); if (Bars < 0) return (0); li_68 = Bars - 2; if (l_ind_counted_72 == 0 || gi_164) { gi_164 = TRUE; li_0 = TRUE; ld_4 = Step; ld_12 = -10000000.0; ld_20 = 10000000.0; while (li_68 > 0) { gi_116 = li_68; ld_44 = g_ibuf_112[li_68]; if (ld_20 > ld_44) ld_20 = ld_44; ld_52 = g_ibuf_112[li_68]; if (ld_12 < ld_52) ld_12 = ld_52; if (ld_52 > g_ibuf_112[li_68 + 1] && ld_44 > g_ibuf_112[li_68 + 1]) break; if (ld_52 < g_ibuf_112[li_68 + 1] && ld_44 < g_ibuf_112[li_68 + 1]) { li_0 = FALSE; break; } li_68--; } for (int li_76 = li_68; li_76 < Bars; li_76++) g_ibuf_108[li_76] = 0.0; if (li_0) { g_ibuf_108[li_68] = g_ibuf_112[li_68 + 1]; ld_28 = g_ibuf_112[li_68]; } else { g_ibuf_108[li_68] = g_ibuf_112[li_68 + 1]; ld_28 = g_ibuf_112[li_68]; } li_68--; } else { li_68 = gi_116; ld_4 = gd_124; li_0 = gi_120; ld_12 = gd_132; ld_20 = gd_140; ld_28 = gd_148; ld_36 = gd_156; } while (li_68 >= 0) { ld_44 = g_ibuf_112[li_68]; ld_52 = g_ibuf_112[li_68]; if (li_0 && ld_44 < g_ibuf_108[li_68 + 1]) { SaveLastReverse(li_68, 1, ld_4, ld_44, ld_12, ld_28, ld_36); ld_4 = Step; li_0 = FALSE; ld_28 = ld_44; ld_20 = ld_44; g_ibuf_108[li_68] = ld_12; li_68--; continue; } if (!li_0 && ld_52 > g_ibuf_108[li_68 + 1]) { SaveLastReverse(li_68, 0, ld_4, ld_20, ld_52, ld_28, ld_36); ld_4 = Step; li_0 = TRUE; ld_28 = ld_52; ld_12 = ld_52; g_ibuf_108[li_68] = ld_20; li_68--; continue; } ld_60 = g_ibuf_108[li_68 + 1]; ld_36 = ld_60 + ld_4 * (ld_28 - ld_60); if (li_0) { if (ld_28 < ld_52 && ld_4 + Step <= Maximum) ld_4 += Step; if (ld_52 < g_ibuf_112[li_68 + 1] && li_68 == Bars - 2) ld_36 = g_ibuf_108[li_68 + 1]; ld_60 = g_ibuf_112[li_68 + 1]; if (ld_36 > ld_60) ld_36 = ld_60; ld_60 = g_ibuf_112[li_68 + 2]; if (ld_36 > ld_60) ld_36 = ld_60; if (ld_36 > ld_44) { SaveLastReverse(li_68, 1, ld_4, ld_44, ld_12, ld_28, ld_36); ld_4 = Step; li_0 = FALSE; ld_28 = ld_44; ld_20 = ld_44; g_ibuf_108[li_68] = ld_12; li_68--; continue; } if (ld_28 < ld_52) { ld_12 = ld_52; ld_28 = ld_52; } } else { if (ld_28 > ld_44 && ld_4 + Step <= Maximum) ld_4 += Step; if (ld_44 < g_ibuf_112[li_68 + 1] && li_68 == Bars - 2) ld_36 = g_ibuf_108[li_68 + 1]; ld_60 = g_ibuf_112[li_68 + 1]; if (ld_36 < ld_60) ld_36 = ld_60; ld_60 = g_ibuf_112[li_68 + 2]; if (ld_36 < ld_60) ld_36 = ld_60; if (ld_36 < ld_52) { SaveLastReverse(li_68, 0, ld_4, ld_20, ld_52, ld_28, ld_36); ld_4 = Step; li_0 = TRUE; ld_28 = ld_52; ld_12 = ld_52; g_ibuf_108[li_68] = ld_20; li_68--; continue; } if (ld_28 > ld_44) { ld_20 = ld_44; ld_28 = ld_44; } } g_ibuf_108[li_68] = ld_36; li_68--; } if (Time[0] <= g_time_172 && 1) return (0); g_time_172 = Time[0]; if (gi_168 <= 0) if (Close[1] - g_ibuf_108[1] > 0.0) gi_168 = 1; if (gi_168 >= 0) if (g_ibuf_108[1] - Close[1] > 0.0) gi_168 = -1; return (0); } //-------------------------------------------------------
//+------------------------------------------------------------------+ //| 顺势超短线指标.mq4 | //| Copyright ?2007 | //| http: | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Aqua #property indicator_color2 Tomato extern int period = 21; extern int method = 3; extern int price = 0; double g_ibuf_88; double g_ibuf_92; double g_ibuf_96; int init() { IndicatorBuffers(3); SetIndexBuffer(0, g_ibuf_88); SetIndexBuffer(1, g_ibuf_92); SetIndexBuffer(2, g_ibuf_96); ArraySetAsSeries(g_ibuf_96, TRUE); SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2); SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2); IndicatorShortName("顺势超短线指标(" + period + ")"); return (0); } int deinit() { return (0); } double WMA(int ai_0, int a_period_4) { return (iMA(NULL, 0, a_period_4, 0, method, price, ai_0)); } int start() { double lda_16; double lda_20; int l_ind_counted_0 = IndicatorCounted(); if (l_ind_counted_0 < 0) return (-1); int li_4 = 0; int l_period_8 = MathSqrt(period); int li_12 = Bars - l_ind_counted_0 + period + 1; if (li_12 > Bars) li_12 = Bars; ArrayResize(lda_16, li_12); ArraySetAsSeries(lda_16, TRUE); ArrayResize(lda_20, li_12); ArraySetAsSeries(lda_20, TRUE); for (li_4 = 0; li_4 < li_12; li_4++) lda_16[li_4] = 2.0 * WMA(li_4, period / 2) - WMA(li_4, period); for (li_4 = 0; li_4 < li_12 - period; li_4++) g_ibuf_96[li_4] = iMAOnArray(lda_16, 0, l_period_8, 0, method, li_4); for (li_4 = li_12 - period; li_4 >= 0; li_4--) { lda_20[li_4] = lda_20[li_4 + 1]; if (g_ibuf_96[li_4] > g_ibuf_96[li_4 + 1]) lda_20[li_4] = 1; if (g_ibuf_96[li_4] < g_ibuf_96[li_4 + 1]) lda_20[li_4] = -1; if (lda_20[li_4] > 0.0) { g_ibuf_88[li_4] = g_ibuf_96[li_4]; if (lda_20[li_4 + 1] < 0.0) g_ibuf_88[li_4 + 1] = g_ibuf_96[li_4 + 1]; g_ibuf_92[li_4] = EMPTY_VALUE; } else { if (lda_20[li_4] < 0.0) { g_ibuf_92[li_4] = g_ibuf_96[li_4]; if (lda_20[li_4 + 1] > 0.0) g_ibuf_92[li_4 + 1] = g_ibuf_96[li_4 + 1]; g_ibuf_88[li_4] = EMPTY_VALUE; } } } return (0); } //------------------------------------------------- 2. 顺势短线多空指标.mq4
//+------------------------------------------------------------------+ //| 顺势短线多空指标.mq4 | //| Copyright ?2007, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_minimum -0.05 #property indicator_maximum 1.05 #property indicator_buffers 2 #property indicator_color1 White #property indicator_color2 DarkOrange extern int MaMetod = 1; extern int MaPeriod = 40; extern int SoundAlertMode = 1; double g_ibuf_88; double g_ibuf_92; double g_ibuf_96; double g_ibuf_100; double g_ibuf_104; int gi_108 = 0; bool gi_112 = FALSE; bool gi_116 = FALSE; int init() { IndicatorBuffers(5); SetIndexStyle(0, DRAW_HISTOGRAM); SetIndexBuffer(0, g_ibuf_88); SetIndexStyle(1, DRAW_HISTOGRAM); SetIndexBuffer(1, g_ibuf_92); SetIndexBuffer(2, g_ibuf_96); SetIndexBuffer(3, g_ibuf_100); SetIndexBuffer(4, g_ibuf_104); SetIndexDrawBegin(0, 10); SetIndexDrawBegin(1, 10); return (0); } int deinit() { return (0); } int start() { double l_ima_0; double l_ima_8; double l_ima_16; double l_ima_24; double ld_32; double ld_40; double ld_48; double ld_56; string ls_68; if (Bars <= 10) return (0); gi_108 = IndicatorCounted(); if (gi_108 < 0) return (-1); if (gi_108 > 0) gi_108--; for (int li_64 = Bars - gi_108 - 1; li_64 >= 0; li_64--) { l_ima_0 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_CLOSE, li_64); l_ima_8 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_LOW, li_64); l_ima_16 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_OPEN, li_64); l_ima_24 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_HIGH, li_64); ld_32 = (g_ibuf_96[li_64 + 1] + (g_ibuf_100[li_64 + 1])) / 2.0; ld_56 = (l_ima_0 + l_ima_24 + l_ima_16 + l_ima_8) / 4.0; ld_40 = MathMax(l_ima_24, MathMax(ld_32, ld_56)); ld_48 = MathMin(l_ima_16, MathMin(ld_32, ld_56)); if (ld_32 < ld_56) { g_ibuf_104[li_64] = 1; g_ibuf_88[li_64] = 0; g_ibuf_92[li_64] = 1; if (SoundAlertMode > 0 && li_64 == 0 && g_ibuf_104[1] < 0.0) PlaySound("alert2.wav"); } else { g_ibuf_104[li_64] = -1; g_ibuf_88[li_64] = 1; g_ibuf_92[li_64] = 0; if (SoundAlertMode > 0 && li_64 == 0 && g_ibuf_104[1] > 0.0) PlaySound("alert2.wav"); } g_ibuf_96[li_64] = ld_32; g_ibuf_100[li_64] = ld_56; } if (g_ibuf_104[2] < 0.0 && g_ibuf_104[1] > 0.0 && Volume[0] > 1.0 && !gi_112) { ls_68 = " " + Symbol() + " M" + Period() + ": 买入信号"; if (SoundAlertMode > 0) Alert(ls_68); gi_112 = TRUE; gi_116 = FALSE; } if (g_ibuf_104[2] > 0.0 && g_ibuf_104[1] < 0.0 && Volume[0] > 1.0 && !gi_116) { ls_68 = " " + Symbol() + " M" + Period() + ": 卖出信号"; if (SoundAlertMode > 0) Alert(ls_68); gi_116 = TRUE; gi_112 = FALSE; } return (0); } //------------------------------------- 3. 顺势超短线趋势指标.mq4
//+------------------------------------------------------------------+ //| 顺势超短线趋势指标.mq4 | //| Copyright ?2007 | //| http: | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red extern int MA = 24; extern int MA_Mode = 2; extern int MA_Price = 0; extern double Step = 0.02; extern double Maximum = 0.08; extern bool Alert_Sound = TRUE; double g_ibuf_108; double g_ibuf_112; int gi_116; int gi_120; double gd_124; double gd_132; double gd_140; double gd_148; double gd_156; bool gi_164 = TRUE; int gi_168 = 0; int g_time_172 = 0; int init() { SetIndexStyle(0, DRAW_ARROW); SetIndexArrow(0, 159); SetIndexBuffer(0, g_ibuf_108); SetIndexStyle(1, DRAW_LINE); SetIndexBuffer(1, g_ibuf_112); return (0); } void SaveLastReverse(int ai_0, int ai_4, double ad_8, double ad_16, double ad_24, double ad_32, double ad_40) { gi_116 = ai_0; gi_120 = ai_4; gd_124 = ad_8; gd_140 = ad_16; gd_132 = ad_24; gd_148 = ad_32; gd_156 = ad_40; } int start() { bool li_0; double ld_4; double ld_12; double ld_20; double ld_28; double ld_36; double ld_44; double ld_52; double ld_60; int l_ind_counted_72 = IndicatorCounted(); for (int li_68 = 0; li_68 < Bars - MA - 2; li_68++) g_ibuf_112[li_68] = iMA(NULL, 0, MA, 0, MA_Mode, MA_Price, li_68); if (Bars < 0) return (0); li_68 = Bars - 2; if (l_ind_counted_72 == 0 || gi_164) { gi_164 = TRUE; li_0 = TRUE; ld_4 = Step; ld_12 = -10000000.0; ld_20 = 10000000.0; while (li_68 > 0) { gi_116 = li_68; ld_44 = g_ibuf_112[li_68]; if (ld_20 > ld_44) ld_20 = ld_44; ld_52 = g_ibuf_112[li_68]; if (ld_12 < ld_52) ld_12 = ld_52; if (ld_52 > g_ibuf_112[li_68 + 1] && ld_44 > g_ibuf_112[li_68 + 1]) break; if (ld_52 < g_ibuf_112[li_68 + 1] && ld_44 < g_ibuf_112[li_68 + 1]) { li_0 = FALSE; break; } li_68--; } for (int li_76 = li_68; li_76 < Bars; li_76++) g_ibuf_108[li_76] = 0.0; if (li_0) { g_ibuf_108[li_68] = g_ibuf_112[li_68 + 1]; ld_28 = g_ibuf_112[li_68]; } else { g_ibuf_108[li_68] = g_ibuf_112[li_68 + 1]; ld_28 = g_ibuf_112[li_68]; } li_68--; } else { li_68 = gi_116; ld_4 = gd_124; li_0 = gi_120; ld_12 = gd_132; ld_20 = gd_140; ld_28 = gd_148; ld_36 = gd_156; } while (li_68 >= 0) { ld_44 = g_ibuf_112[li_68]; ld_52 = g_ibuf_112[li_68]; if (li_0 && ld_44 < g_ibuf_108[li_68 + 1]) { SaveLastReverse(li_68, 1, ld_4, ld_44, ld_12, ld_28, ld_36); ld_4 = Step; li_0 = FALSE; ld_28 = ld_44; ld_20 = ld_44; g_ibuf_108[li_68] = ld_12; li_68--; continue; } if (!li_0 && ld_52 > g_ibuf_108[li_68 + 1]) { SaveLastReverse(li_68, 0, ld_4, ld_20, ld_52, ld_28, ld_36); ld_4 = Step; li_0 = TRUE; ld_28 = ld_52; ld_12 = ld_52; g_ibuf_108[li_68] = ld_20; li_68--; continue; } ld_60 = g_ibuf_108[li_68 + 1]; ld_36 = ld_60 + ld_4 * (ld_28 - ld_60); if (li_0) { if (ld_28 < ld_52 && ld_4 + Step <= Maximum) ld_4 += Step; if (ld_52 < g_ibuf_112[li_68 + 1] && li_68 == Bars - 2) ld_36 = g_ibuf_108[li_68 + 1]; ld_60 = g_ibuf_112[li_68 + 1]; if (ld_36 > ld_60) ld_36 = ld_60; ld_60 = g_ibuf_112[li_68 + 2]; if (ld_36 > ld_60) ld_36 = ld_60; if (ld_36 > ld_44) { SaveLastReverse(li_68, 1, ld_4, ld_44, ld_12, ld_28, ld_36); ld_4 = Step; li_0 = FALSE; ld_28 = ld_44; ld_20 = ld_44; g_ibuf_108[li_68] = ld_12; li_68--; continue; } if (ld_28 < ld_52) { ld_12 = ld_52; ld_28 = ld_52; } } else { if (ld_28 > ld_44 && ld_4 + Step <= Maximum) ld_4 += Step; if (ld_44 < g_ibuf_112[li_68 + 1] && li_68 == Bars - 2) ld_36 = g_ibuf_108[li_68 + 1]; ld_60 = g_ibuf_112[li_68 + 1]; if (ld_36 < ld_60) ld_36 = ld_60; ld_60 = g_ibuf_112[li_68 + 2]; if (ld_36 < ld_60) ld_36 = ld_60; if (ld_36 < ld_52) { SaveLastReverse(li_68, 0, ld_4, ld_20, ld_52, ld_28, ld_36); ld_4 = Step; li_0 = TRUE; ld_28 = ld_52; ld_12 = ld_52; g_ibuf_108[li_68] = ld_20; li_68--; continue; } if (ld_28 > ld_44) { ld_20 = ld_44; ld_28 = ld_44; } } g_ibuf_108[li_68] = ld_36; li_68--; } if (Time[0] <= g_time_172 && 1) return (0); g_time_172 = Time[0]; if (gi_168 <= 0) if (Close[1] - g_ibuf_108[1] > 0.0) gi_168 = 1; if (gi_168 >= 0) if (g_ibuf_108[1] - Close[1] > 0.0) gi_168 = -1; return (0); } //-------------------------------------------------------
2009-08-18 18:49
2008-03-07 10:31
2008-02-07 13:36
2008-01-26 05:04