5赞

2065评论

28收藏

变色趋势指标,指标不求多,够专业就好

 

评论|共 2065 个

fengdu

发表于 2017-10-17 18:35:54 | 显示全部楼层

/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website: H T t p :// w Ww.M ET a Q U Ote S .NEt
   E-mail : S U P p O R T @m e t AQu OtES .N E T
*/

#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Red
#property indicator_color5 Blue
#property indicator_color6 Red

extern int Length = 25;
extern int Deviation = 1;
extern double MoneyRisk = 1.0;
extern int Signal = 1;
extern int Line = 1;
extern int Nbars = 5000;
int G_count_104 = 0;
double G_ibuf_108[];
double G_ibuf_112[];
double G_ibuf_116[];
double G_ibuf_120[];
double G_ibuf_124[];
double G_ibuf_128[];
extern bool SoundON = FALSE;
bool Gi_136 = FALSE;
bool Gi_140 = FALSE;

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   SetIndexBuffer(0, G_ibuf_108);
   SetIndexBuffer(1, G_ibuf_112);
   SetIndexBuffer(2, G_ibuf_116);
   SetIndexBuffer(3, G_ibuf_120);
   SetIndexBuffer(4, G_ibuf_124);
   SetIndexBuffer(5, G_ibuf_128);
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(4, DRAW_LINE);
   SetIndexStyle(5, DRAW_LINE);
   SetIndexArrow(0, 159);
   SetIndexArrow(1, 159);
   SetIndexArrow(2, 233);
   SetIndexArrow(3, 234);
   IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS));
   string Ls_0 = "BBands Stop(" + Length + "," + Deviation + ")";
   IndicatorShortName(Ls_0);
   SetIndexLabel(0, "UpTrend Stop");
   SetIndexLabel(1, "DownTrend Stop");
   SetIndexLabel(2, "UpTrend Signal");
   SetIndexLabel(3, "DownTrend Signal");
   SetIndexLabel(4, "UpTrend Line");
   SetIndexLabel(5, "DownTrend Line");
   SetIndexDrawBegin(0, Length);
   SetIndexDrawBegin(1, Length);
   SetIndexDrawBegin(2, Length);
   SetIndexDrawBegin(3, Length);
   SetIndexDrawBegin(4, Length);
   SetIndexDrawBegin(5, Length);
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   int Li_24;
   double Lda_28[25000];
   double Lda_32[25000];
   double Lda_36[25000];
   double Lda_40[25000];
   int Li_0 = Time[0] + 60 * Period() - TimeCurrent();
   double Ld_4 = Li_0 / 60.0;
   int Li_12 = Li_0 % 60;
   Li_0 = (Li_0 - Li_0 % 60) / 60;
   ObjectDelete("time");
   if (ObjectFind("time") != 0) {
      ObjectCreate("time", OBJ_TEXT, 0, Time[0], Close[0] + 0.0005);
      ObjectSetText("time", "                  <" + Li_0 + ":" + Li_12, 12, "Arial", Fuchsia);
   } else ObjectMove("time", 0, Time[0], Close[0] + 0.0005);
   for (int shift_20 = Nbars; shift_20 >= 0; shift_20--) {
      G_ibuf_108[shift_20] = 0;
      G_ibuf_112[shift_20] = 0;
      G_ibuf_116[shift_20] = 0;
      G_ibuf_120[shift_20] = 0;
      G_ibuf_124[shift_20] = EMPTY_VALUE;
      G_ibuf_128[shift_20] = EMPTY_VALUE;
   }
   for (shift_20 = Nbars - Length - 1; shift_20 >= 0; shift_20--) {
      Lda_28[shift_20] = iBands(NULL, 0, Length, Deviation, 0, PRICE_CLOSE, MODE_UPPER, shift_20);
      Lda_32[shift_20] = iBands(NULL, 0, Length, Deviation, 0, PRICE_CLOSE, MODE_LOWER, shift_20);
      if (Close[shift_20] > Lda_28[shift_20 + 1]) Li_24 = 1;
      if (Close[shift_20] < Lda_32[shift_20 + 1]) Li_24 = -1;
      if (Li_24 > 0 && Lda_32[shift_20] < Lda_32[shift_20 + 1]) Lda_32[shift_20] = Lda_32[shift_20 + 1];
      if (Li_24 < 0 && Lda_28[shift_20] > Lda_28[shift_20 + 1]) Lda_28[shift_20] = Lda_28[shift_20 + 1];
      Lda_36[shift_20] = Lda_28[shift_20] + (MoneyRisk - 1.0) / 2.0 * (Lda_28[shift_20] - Lda_32[shift_20]);
      Lda_40[shift_20] = Lda_32[shift_20] - (MoneyRisk - 1.0) / 2.0 * (Lda_28[shift_20] - Lda_32[shift_20]);
      if (Li_24 > 0 && Lda_40[shift_20] < Lda_40[shift_20 + 1]) Lda_40[shift_20] = Lda_40[shift_20 + 1];
      if (Li_24 < 0 && Lda_36[shift_20] > Lda_36[shift_20 + 1]) Lda_36[shift_20] = Lda_36[shift_20 + 1];
      if (Li_24 > 0) {
         if (Signal > 0 && G_ibuf_108[shift_20 + 1] == -1.0) {
            G_ibuf_116[shift_20] = Lda_40[shift_20];
            G_ibuf_108[shift_20] = Lda_40[shift_20];
            if (Line > 0) G_ibuf_124[shift_20] = Lda_40[shift_20];
            if (SoundON == TRUE && shift_20 == 0 && (!Gi_136)) {
               Alert("Trend Naik, BUY MODE - ", Symbol(), "-", Period());
               Gi_136 = TRUE;
               Gi_140 = FALSE;
            }
         } else {
            G_ibuf_108[shift_20] = Lda_40[shift_20];
            if (Line > 0) G_ibuf_124[shift_20] = Lda_40[shift_20];
            G_ibuf_116[shift_20] = -1;
         }
         if (Signal == 2) G_ibuf_108[shift_20] = 0;
         G_ibuf_120[shift_20] = -1;
         G_ibuf_112[shift_20] = -1.0;
         G_ibuf_128[shift_20] = EMPTY_VALUE;
      }
      if (Li_24 < 0) {
         if (Signal > 0 && G_ibuf_112[shift_20 + 1] == -1.0) {
            G_ibuf_120[shift_20] = Lda_36[shift_20];
            G_ibuf_112[shift_20] = Lda_36[shift_20];
            if (Line > 0) G_ibuf_128[shift_20] = Lda_36[shift_20];
            if (SoundON == TRUE && shift_20 == 0 && (!Gi_140)) {
               Alert("Trend Turun, SELL MODE - ", Symbol(), "-", Period());
               Gi_140 = TRUE;
               Gi_136 = FALSE;
            }
         } else {
            G_ibuf_112[shift_20] = Lda_36[shift_20];
            if (Line > 0) G_ibuf_128[shift_20] = Lda_36[shift_20];
            G_ibuf_120[shift_20] = -1;
         }
         if (Signal == 2) G_ibuf_112[shift_20] = 0;
         G_ibuf_116[shift_20] = -1;
         G_ibuf_108[shift_20] = -1.0;
         G_ibuf_124[shift_20] = EMPTY_VALUE;
      }
   }

   return (0);
}

wx_bb0LkxEf

发表于 2017-10-17 19:19:29 | 显示全部楼层

[s:132][s:132][s:132]

沉默是金12

发表于 2017-10-17 19:40:48 | 显示全部楼层

6666666666666666666666

hlh808

发表于 2017-10-17 21:39:48 | 显示全部楼层

主图标绘制两根变色均线,

Davide

发表于 2017-10-17 22:34:54 | 显示全部楼层

cgjhgjkhkhjl

duchaoaioo

发表于 2017-10-17 22:36:44 | 显示全部楼层


回复看看。。。。。。。。。。

boy1246670735

发表于 2017-10-18 00:11:03 | 显示全部楼层

巴巴爸爸不不不不不不不

zbcxy

发表于 2017-10-18 11:32:46 | 显示全部楼层

感谢楼主分享指标,下载收藏!!

alantanrl

发表于 2017-10-18 14:14:09 | 显示全部楼层

期刊模压晨进东奔西走时期杳士大夫

baofu

发表于 2017-10-18 18:07:49 | 显示全部楼层

[s:132][s:132]

您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则