fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. PayBack
    3. Posts
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 9
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by PayBack

    • RE: Need help with order opening when my indicator draws arrows!

      Oh, thanks allot!!! 😄 I just have problems with English knowledge, and have not understand all correctly, sorry for that!
      I made a custom block, started testing in MT4, but still have some problems 😞 . Now he can`t to find the symbols - http://savepic.net/5389600.jpg

      posted in Questions & Answers
      P
      PayBack
    • RE: Need help with order opening when my indicator draws arrows!

      Hello again!
      Shame on me, i have not been able to deal with this code you wrote to me.
      Separately i understand it and how to use blocks in fxDreema. But i can not to connect this code to fxDreema blocks.
      And if you have the opportunity, please help me to add the custom block with custom code based on my indicator - "SpundsStochastic" to my project.
      Only what i want to my EA detects new symbols - Arrows, by type(number, for example 236) or by color.
      Here is the picture how it must to work - http://savepic.net/5384677.jpg
      And below is code of my indicator.
      Thanks allot if would help me again! 😏

      //+------------------------------------------------------------------+
      //|                                              SpudsStochastic.mq4 |
      //|                               Copyright © 2012, Vladimir Hlystov |
      //+------------------------------------------------------------------+
      #property copyright "Copyright © 2012, Vladimir Hlystov"
      #property link      "cmillion@narod.ru"
      //+------------------------------------------------------------------+
      extern bool AlertON     = false;
      extern bool DrawARROW   = true;
      extern int  LevelUp     = 85;
      extern int  LevelDn     = 15;
      //+------------------------------------------------------------------+
      /*8 стохастических осцилляторов. 
      Параметры «замедление» и «период %D» оставляем по умолчанию – 3. 
      Параметр %K будет меняться от 6 до 24. 
      Таким образом, мы имеем 8 стохастиков с параметрами (6, 3, 3), 
      (7, 3, 3), (8, 3, 3) … (24, 3, 3). 
      У всех индикаторов используется только главная линия, а сигнальную мы 
      отключаем. */
      //+------------------------------------------------------------------+
      #property indicator_separate_window
      #property indicator_minimum 0
      #property indicator_maximum 100
      #property indicator_level1	15
      #property indicator_level2	85
      #property indicator_levelcolor	Silver
      #property indicator_levelwidth	0
      #property indicator_levelstyle	2
      #property indicator_buffers 8
      #property indicator_color1 Blue
      #property indicator_style1 2
      #property indicator_width1 1
      #property indicator_color2 Blue
      #property indicator_style2 2
      #property indicator_width2 1
      #property indicator_color3 Blue
      #property indicator_style3 2
      #property indicator_width3 1
      
      #property indicator_color4 Yellow
      #property indicator_style4 2
      #property indicator_width4 2
      
      #property indicator_color5 Red
      #property indicator_style5 2
      #property indicator_width5 1
      #property indicator_color6 Red
      #property indicator_style6 2
      #property indicator_width6 1
      #property indicator_color7 Red
      #property indicator_style7 2
      #property indicator_width7 1
      #property indicator_color8 Red
      #property indicator_style8 2
      #property indicator_width8 1
      //---- buffers
      double BUFFER_1[];
      double BUFFER_2[];
      double BUFFER_3[];
      double BUFFER_4[];
      double BUFFER_5[];
      double BUFFER_6[];
      double BUFFER_7[];
      double BUFFER_8[];
      int Signal;
      //+------------------------------------------------------------------+
      int init()
        {
      //---- indicator lines
         SetIndexStyle(0,DRAW_LINE);
         SetIndexBuffer(0,BUFFER_1);
         SetIndexStyle(1,DRAW_LINE);
         SetIndexBuffer(1,BUFFER_2);
         SetIndexStyle(2,DRAW_LINE);
         SetIndexBuffer(2,BUFFER_3);
         SetIndexStyle(3,DRAW_LINE);
         SetIndexBuffer(3,BUFFER_4);
         SetIndexStyle(4,DRAW_LINE);
         SetIndexBuffer(4,BUFFER_5);
         SetIndexStyle(5,DRAW_LINE);
         SetIndexBuffer(5,BUFFER_6);
         SetIndexStyle(6,DRAW_LINE);
         SetIndexBuffer(6,BUFFER_7);
         SetIndexStyle(7,DRAW_LINE);
         SetIndexBuffer(7,BUFFER_8);
      //---- name for DataWindow and indicator subwindow label
         SetIndexLabel(0,"(6, 3, 3)");
         SetIndexLabel(1,"(9, 3, 3)");
         SetIndexLabel(2,"(12, 3, 3)");
         SetIndexLabel(3,"(14, 3, 3)");
         SetIndexLabel(4,"(16, 3, 3)");
         SetIndexLabel(5,"(19, 3, 3)");
         SetIndexLabel(6,"(21, 3, 3)");
         SetIndexLabel(7,"(24, 3, 3)");
         string Name="Spuds Stochastic";
         IndicatorShortName(Name);
         ObjectCreate("SpudsStochastic_on",OBJ_LABEL,WindowFind(Name),0,0);// Создание объ.
         ObjectSet("SpudsStochastic_on",OBJPROP_CORNER,0);
         ObjectSet("SpudsStochastic_on",OBJPROP_XDISTANCE,5);
         ObjectSet("SpudsStochastic_on",OBJPROP_YDISTANCE,15);
         if(AlertON)ObjectSetText("SpudsStochastic_on","Alert ON",8,"Arial",Blue);
         else ObjectSetText("SpudsStochastic_on","Alert OFF",8,"Arial",Red);
         return(0);
        }
      //+------------------------------------------------------------------+
      int start()
        {
         int counted_bars=IndicatorCounted();
         if(counted_bars<0) return(-1);
         if(counted_bars>0) counted_bars--;
         int limit=Bars-counted_bars;
         if(counted_bars==0) limit-=1+1;
      
         string name;
         for(int i=limit; i>=0; i--)
           {
            BUFFER_1*  = iStochastic(NULL,0,6,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_2*  = iStochastic(NULL,0,9,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_3*  = iStochastic(NULL,0,12,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_4*  = iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_5*  = iStochastic(NULL,0,16,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_6*  = iStochastic(NULL,0,19,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_7*  = iStochastic(NULL,0,21,3,3,MODE_SMA,0,MODE_MAIN,i);
            BUFFER_8*  = iStochastic(NULL,0,24,3,3,MODE_SMA,0,MODE_MAIN,i);
      
            if((BUFFER_1*>LevelUp && BUFFER_2*>LevelUp && BUFFER_3*>LevelUp && BUFFER_4*>LevelUp && BUFFER_5*>LevelUp && BUFFER_6*>LevelUp && BUFFER_7*>LevelUp && BUFFER_8*>LevelUp) || 
               (BUFFER_1*<LevelDn && BUFFER_2*<LevelDn && BUFFER_3*<LevelDn && BUFFER_4*<LevelDn && BUFFER_5*<LevelDn && BUFFER_6*<LevelDn && BUFFER_7*<LevelDn && BUFFER_8*<LevelDn))
              {
               Signal=0;
              }
      
            if((BUFFER_1*>LevelDn && BUFFER_2*>LevelDn && BUFFER_3*>LevelDn && BUFFER_4*>LevelDn && BUFFER_5*>LevelDn && BUFFER_6*>LevelDn && BUFFER_7*>LevelDn && BUFFER_8*>LevelDn) && 
               (BUFFER_1*<LevelDn || BUFFER_2*<LevelDn || BUFFER_3*<LevelDn || BUFFER_4*<LevelDn || BUFFER_5*<LevelDn || BUFFER_6*<LevelDn || BUFFER_7*<LevelDn || BUFFER_8*<LevelDn))
              {
               if(DrawARROW && Signal==0)
                 {
                  name=StringConcatenate("SpudsStochastic_",TimeToStr(Time*,TIME_DATE|TIME_MINUTES));
                  ObjectDelete(name);
                  ObjectCreate(name,OBJ_ARROW,0,Time*,Low*,0,0,0,0);
                  ObjectSet(name,OBJPROP_ARROWCODE,236);
                  ObjectSet(name,OBJPROP_COLOR,Blue);
                  Signal=1;
                 }
               if(AlertON && i<2) Alert(Symbol()+" Spuds Stochastic Buy");
              }
      
            if((BUFFER_1*<LevelUp && BUFFER_2*<LevelUp && BUFFER_3*<LevelUp && BUFFER_4*<LevelUp && BUFFER_5*<LevelUp && BUFFER_6*<LevelUp && BUFFER_7*<LevelUp && BUFFER_8*<LevelUp) && 
               (BUFFER_1*>LevelUp || BUFFER_2*>LevelUp || BUFFER_3*>LevelUp || BUFFER_4*>LevelUp || BUFFER_5*>LevelUp || BUFFER_6*>LevelUp || BUFFER_7*>LevelUp || BUFFER_8*>LevelUp))
              {
               if(DrawARROW && Signal==0)
                 {
                  name=StringConcatenate("SpudsStochastic_",TimeToStr(Time*,TIME_DATE|TIME_MINUTES));
                  ObjectDelete(name);
                  ObjectCreate(name,OBJ_ARROW,0,Time*,High*,0,0,0,0);
                  ObjectSet(name,OBJPROP_ARROWCODE,238);
                  ObjectSet(name,OBJPROP_COLOR,Red);
                  Signal=-1;
                 }
               if(AlertON && i<2) Alert(Symbol()+" Spuds Stochastic Sell");
              }
      
           }
         return(0);
        }
      //+------------------------------------------------------------------+
      int deinit()
        {
         remove_objects("SpudsStochastic_");
        }
      //+------------------------------------------------------------------+
      int remove_objects(string PreName)
        {
         for(int k=ObjectsTotal()-1; k>=0; k--)
           {
            string Obj_Name=ObjectName(k);
            string Head=StringSubstr(Obj_Name,0,StringLen(PreName));
      
            if(Head==PreName)
              {
               ObjectDelete(Obj_Name);
              }
           }
         return(0);
        }
      //--------------------------------------------------------------------+
      
      
      posted in Questions & Answers
      P
      PayBack
    • RE: Need help with order opening when my indicator draws arrows!

      Thanks for answer!

      My indicator has 8 buffers (0;1;2;3;4;5;6;7) - 8xStochastics with different values.
      There is no buffer for those arrows, they are drawing when all 8 buffers (Stochastic oscillator lines) are crossing a level line.

      May be there is another way to catch those object on chart by color checking.
      For example: for each object ---> check color ---> if blue then open buy, if red then sell. I have tried that way but nothing exist...

      Additional inf. - http://savepic.net/5365660.jpg

      Thanks!

      posted in Questions & Answers
      P
      PayBack
    • RE: Need help with order opening when my indicator draws arrows!

      Hello!

      I have indicator that draws up and down arrows (blue/red) on chart when i need to open order. I wand to made an EA on its base. EA must open orders when arrows are drawn.
      Here is link on my wrong EA.

      https://fxdreema.com/shared/9idWYi2Jb

      Some additional information:

      1. When indicator is dropped on chart, he draws arrows on history. I want to EA do not use old arrows, but only those who ware draws after next tick (new arrows).
      2. Arrows are redrawing inside one candle, on next candle arrow freezes. I need EA to open order only on first time arrow is drawn (once per candle; first time drawn).

      Here screenshot of indicator working - http://savepic.net/5370997.htm

      Help me please to build working EA!
      Thanks!

      posted in Questions & Answers
      P
      PayBack
    • RE: Problems with "close each profitable trade" block

      If i will set TP 3 pips broker never opens my orders with this amount of point, because minimal Sl and TP for USDJPY is 6 pips (roboforex fix-standart). But here it does not mather how many pips is in a closing moment, because it closes on crossover. At first i tried my EA with value of block = 0. It means that EA must close orders on crossover with positiv value (more than 0). So i think it does not mather what number is there. Maybe troble is in some logical point? Maybe don't use this block and try another combination of blocks with formula result (open price - close price > 0), how you think?

      posted in Questions & Answers
      P
      PayBack
    • RE: Problems with "close each profitable trade" block

      http://savepic.su/3462736.jpg

      posted in Questions & Answers
      P
      PayBack
    • RE: Problems with "close each profitable trade" block

      http://savepic.su/3411548.jpg

      How you can see it closes orders not on each crossing above point. I need to close orders on every crossover above but with profit 3 pips+, if profit is not reached then it must ignore those signal. What else can be wrong. Maybe a signal has not enough time to be execute, because values are rapidly changing​​?

      posted in Questions & Answers
      P
      PayBack
    • RE: Problems with "close each profitable trade" block

      EA description:
      http://savepic.su/3416652.jpg

      I want to EA open an order when fast ema crosses slow ema below and close an order when fast ema crosses slow ema above, but only if a trade is profitable. That EA what I have made opens a trade but does not close it when there is some profit on crossing.
      Take a look at the picture and some one tell me please what is wrong.
      Thank you!
      Sorry for bad English.

      posted in Questions & Answers
      P
      PayBack
    • RE: 'cClose' - variable not defined

      When i have add Trialling Stop to my EA and when i wanted to export EA to .ex4 it shows - 'cClose' - variable not defined. What is wrong?

      posted in Bug Reports
      P
      PayBack
    • 1 / 1