fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. miro1360
    3. Posts
    M
    • Profile
    • Following 0
    • Followers 257
    • Topics 27
    • Posts 1611
    • Best 192
    • Controversial 5
    • Groups 0

    Posts made by miro1360

    • RE: Any explanation for a single missed execution of a condition?

      SolarWind is indicator from group "most repaint", is based on calculation on ehler formula and not best coded. You can look for non repaint one: "ehlers fisher nrp" or "fisher transform nrp" from user "mladen" - I think he made it non repaint ...
      because repainting make for you this issue ...
      or you can try my old solution for this repaint issue (but has not removed issue completly) and it is smoothing values with MA ( it slowed indicator) and take values from this MA buffer, smoothing MA value can be set ... is attached ...

      ......
      Fisher_Yur4ik_miro1360_noRepaint_1_robot_oneMA.mq4

      posted in Questions & Answers
      M
      miro1360
    • RE: Movable buttons in MT4

      ____try this:
      https://fxdreema.com/shared/uUwliI43c
      ;)[/quote:2iph71rm]

      Thank you very much, after some experimenting I managed to get into the right direction.
      -I created a rectangle from which xy are stored in variables;
      -Button 1 looks at these stored xy variables and uses them to reposition when rectangle is moved;

      The problem I am facing now is as following:

      • Button 1 gets it's coordinates from the xy variables, the other buttons should look at the same x-variable (which is no problem), but the y variable is different for each button.
      • So Buttons 2-6 should look at variable_y - value

      Is there a block that I can use for this, and if so which one?

      Thanks![/quote:2iph71rm]

      here for you, hope you learn something new - be aware on blocks order, numbers, etc. ... dont forget to check OnInit section and OnChart section, both are used 😄
      https://fxdreema.com/shared/SbS1f5g0c

      posted in Questions & Answers
      M
      miro1360
    • RE: Help with Renko EA

      renko can repaint ... second, you can not trust MT4 tester results with renko box ... dont forget for spread

      posted in Questions & Answers
      M
      miro1360
    • RE: Movable buttons in MT4

      try this:
      https://fxdreema.com/shared/uUwliI43c
      😉

      posted in Questions & Answers
      M
      miro1360
    • RE: Draw A candlestick

      try this way:

      //code inspired from "Ęčě Čăîđü Â. aka KimIV"
      //code inspired from "http://www.kimiv.ru"
      //this created by miro1360@azet.sk
      
      #property copyright ""
      #property link             "http://www.forexfactory.com/showthread.php?p=8844325"
      #property description      "idea from vasily"
      #property description      "coded by miro1360"
      #property description      "code inspired from KimIV"
      
      #property indicator_chart_window
      
      
      extern int    NumberOfDays = 100;    
          
      extern string PacificBegin    = "23:00";   
      extern string PacificEnd      = "23:00";   
      //extern color  PacificColor    = clrGoldenrod; 
      extern color  PacificColorBodyUp    = clrDodgerBlue;
      extern color  PacificColorBodyDn    = clrTomato;
      extern color  PacificColorWickUp    = clrAquamarine;
      extern color  PacificColorWickDn    = clrBisque;
      
      extern string AsiaBegin     = "01:00";   
      extern string AsiaEnd       = "09:00";   
      //extern color  AsiaColor     = clrTan;        
      extern color  AsiaColorBodyUp    = clrDodgerBlue;
      extern color  AsiaColorBodyDn    = clrTomato;
      extern color  AsiaColorWickUp   = clrAquamarine;
      extern color  AsiaColorWickDn    = clrBisque;
      
      extern string EuropeBegin     = "09:00";   
      extern string EuropeEnd       = "14:00";   
      //extern color  EuropeColor     = clrPaleGreen; 
      extern color  EuropeColorBodyUp    = clrDodgerBlue;
      extern color  EuropeColorBodyDn    = clrTomato;
      extern color  EuropeColorWickUp   = clrAquamarine;
      extern color  EuropeColorWickDn    = clrBisque;
      
      extern string AmericaBegin     = "14:00";   
      extern string AmericaEnd       = "23:00";   
      //extern color  AmericaColor     = clrLightSalmon; 
      extern color  AmericaColorBodyUp    = clrDodgerBlue;
      extern color  AmericaColorBodyDn    = clrTomato;
      extern color  AmericaColorWickUp   = clrAquamarine;
      extern color  AmericaColorWickDn    = clrBisque;
      
      
      //+------------------------------------------------------------------+
      //| Custom indicator initialization function                         |
      //+------------------------------------------------------------------+
      void init() {
        DeleteObjects();
        for (int i=0; i<NumberOfDays; i++) {
      //    CreateObjects("Pa"+i, PacificColor);
      //    CreateObjects("As"+i, AsiaColor);
      //    CreateObjects("Eu"+i, EuropeColor);
      //    CreateObjects("Am"+i, AmericaColor);
      
          CreateObjects("PaBody"+i, PacificColorBodyUp);
          CreateObjects("PaWickBull"+i, PacificColorWickUp);
          CreateObjects("PaWickBear"+i, PacificColorWickUp);
      
          CreateObjects("AsBody"+i, AsiaColorBodyUp);
          CreateObjects("AsWickBull"+i, AsiaColorWickUp);
          CreateObjects("AsWickBear"+i, AsiaColorWickUp);
          
          CreateObjects("EuBody"+i, EuropeColorBodyUp);
          CreateObjects("EuWickBull"+i, EuropeColorWickUp);
          CreateObjects("EuWickBear"+i, EuropeColorWickUp);
      
          CreateObjects("AmBody"+i, AmericaColorBodyUp);
          CreateObjects("AmWickBull"+i, AmericaColorWickUp);
          CreateObjects("AmWickBear"+i, AmericaColorWickUp);
          
        }
        Comment("");
      }
      
      //+------------------------------------------------------------------+
      //| Custor indicator deinitialization function                       |
      //+------------------------------------------------------------------+
      void deinit() {
        DeleteObjects();
        Comment("");
      }
      
      void CreateObjects(string no, color cl) {
        ObjectCreate(no, OBJ_RECTANGLE, 0, 0,0, 0,0);
        ObjectSet(no, OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet(no, OBJPROP_COLOR, cl);
        ObjectSet(no, OBJPROP_BACK, True);
      }
      
      void DeleteObjects() {
        for (int i=0; i<NumberOfDays; i++) {
      //    ObjectDelete("Pa"+i);
      //    ObjectDelete("As"+i);
      //    ObjectDelete("Eu"+i);
      //    ObjectDelete("Am"+i);
      
          ObjectDelete("PaBody"+i);
          ObjectDelete("PaWickBull"+i);
          ObjectDelete("PaWickBear"+i);
         
          ObjectDelete("AsBody"+i);
          ObjectDelete("AsWickBull"+i);
          ObjectDelete("AsWickBear"+i);
      
          ObjectDelete("EuBody"+i);
          ObjectDelete("EuWickBull"+i);
          ObjectDelete("EuWickBear"+i);
          
          ObjectDelete("AmBody"+i);
          ObjectDelete("AmWickBull"+i);
          ObjectDelete("AmWickBear"+i);
        }
      }
      
      //+------------------------------------------------------------------+
      //| Custom indicator iteration function                              |
      //+------------------------------------------------------------------+
      void start() {
        datetime dt=CurTime();
      
        for (int i=0; i<NumberOfDays; i++) {
      //    DrawObjects(dt, "Pa"+i, PacificBegin, PacificEnd);
      //    DrawObjects(dt, "As"+i, AsiaBegin, AsiaEnd);
      //    DrawObjects(dt, "Eu"+i, EuropeBegin, EuropeEnd);
      //    DrawObjects(dt, "Am"+i, AmericaBegin, AmericaEnd);
      
          DrawObjectsBody(dt, "PaBody"+i, PacificBegin, PacificEnd, PacificColorBodyUp, PacificColorBodyDn);
          DrawObjectsWick(dt, "PaWickBull"+i, "PaWickBear"+1, PacificBegin, PacificEnd, PacificColorWickUp, PacificColorWickDn);
      
          DrawObjectsBody(dt, "AsBody"+i, AsiaBegin, AsiaEnd, AsiaColorBodyUp, AsiaColorBodyDn);
          DrawObjectsWick(dt, "AsWickBull"+i, "AsWickBear"+i, AsiaBegin, AsiaEnd, AsiaColorWickUp, AsiaColorWickDn);
          
          DrawObjectsBody(dt, "EuBody"+i, EuropeBegin, EuropeEnd, EuropeColorBodyUp, EuropeColorBodyDn);
          DrawObjectsWick(dt, "EuWickBull"+i, "EuWickBear"+i, EuropeBegin, EuropeEnd, EuropeColorWickUp, EuropeColorWickDn);
          
          DrawObjectsBody(dt, "AmBody"+i, AmericaBegin, AmericaEnd, AmericaColorBodyUp, AmericaColorBodyDn);
          DrawObjectsWick(dt, "AmWickBull"+i, "AmWickBear"+i, AmericaBegin, AmericaEnd, AmericaColorWickUp, AmericaColorWickDn);
      
          dt=decDateTradeDay(dt);
          while (TimeDayOfWeek(dt)>5) dt=decDateTradeDay(dt);
        }
      }
      
      void DrawObjectsBody(datetime dt, string no, string tb, string te, color bodyUpClr, color bodyDnClr) {
        datetime t1, t2;
        double   p1, p2, p11, p12;
        int      b1, b2;
      
        t1=StrToTime(TimeToStr(dt, TIME_DATE)+" "+tb);
        t2=StrToTime(TimeToStr(dt, TIME_DATE)+" "+te);
        b1=iBarShift(NULL, 0, t1);
        b2=iBarShift(NULL, 0, t2);
        p1=Open&#91;b1&#93;;
        p2=Close&#91;b2&#93;;
        p11=Close&#91;b1&#93;;
        p12=Open&#91;b2&#93;;
        
        if (p1<p12) {
          ObjectSet(no, OBJPROP_TIME1, t1);
          ObjectSet(no, OBJPROP_PRICE1, p1);
          ObjectSet(no, OBJPROP_TIME2, t2);
          ObjectSet(no, OBJPROP_PRICE2, p12);
          ObjectSet(no, OBJPROP_COLOR, bodyUpClr);
        }
        else {
          ObjectSet(no, OBJPROP_TIME1, t1);
          ObjectSet(no, OBJPROP_PRICE1, p1);
          ObjectSet(no, OBJPROP_TIME2, t2);
          ObjectSet(no, OBJPROP_PRICE2, p12);
          ObjectSet(no, OBJPROP_COLOR, bodyDnClr);
        }
      }
      
      void DrawObjectsWick(datetime dt, string no, string no2, string tb, string te, color wickUpClr, color wickDnClr) {
        datetime t1, t2;
        double   p1, p2, p11, p12;
        double   wH1, wL1;
        int      b1, b2;
      
        t1=StrToTime(TimeToStr(dt, TIME_DATE)+" "+tb);
        t2=StrToTime(TimeToStr(dt, TIME_DATE)+" "+te);
        b1=iBarShift(NULL, 0, t1);
        b2=iBarShift(NULL, 0, t2);
        p1=Open&#91;b1&#93;;
        p2=Close&#91;b2&#93;;
        p11=Close&#91;b1&#93;;
        p12=Open&#91;b2&#93;;
        wH1=High&#91;iHighest(NULL, 0, MODE_HIGH, b1-b2+1, b2)&#93;;
        wL1=Low&#91;iLowest(NULL, 0, MODE_LOW, b1-b2+1, b2)&#93;;
        
        if (p1<p12) {
          ObjectSet(no, OBJPROP_TIME1, t1);
          ObjectSet(no, OBJPROP_PRICE1, p12);
          ObjectSet(no, OBJPROP_TIME2, t2);
          ObjectSet(no, OBJPROP_PRICE2, wH1);
          ObjectSet(no, OBJPROP_COLOR, wickUpClr);
          
          ObjectSet(no2, OBJPROP_TIME1, t1);
          ObjectSet(no2, OBJPROP_PRICE1, p1);
          ObjectSet(no2, OBJPROP_TIME2, t2);
          ObjectSet(no2, OBJPROP_PRICE2, wL1);
          ObjectSet(no2, OBJPROP_COLOR, wickUpClr); 
        }
        
        else {
          ObjectSet(no, OBJPROP_TIME1, t1);
          ObjectSet(no, OBJPROP_PRICE1, p1);
          ObjectSet(no, OBJPROP_TIME2, t2);
          ObjectSet(no, OBJPROP_PRICE2, wH1);
          ObjectSet(no, OBJPROP_COLOR, wickDnClr);
      
          ObjectSet(no2, OBJPROP_TIME1, t1);
          ObjectSet(no2, OBJPROP_PRICE1, p12);
          ObjectSet(no2, OBJPROP_TIME2, t2);
          ObjectSet(no2, OBJPROP_PRICE2, wL1);
          ObjectSet(no2, OBJPROP_COLOR, wickDnClr);
        }
      }
      
      /*
      void DrawObjects(datetime dt, string no, string tb, string te) {
        datetime t1, t2;
        double   p1, p2;
        int      b1, b2;
      
        t1=StrToTime(TimeToStr(dt, TIME_DATE)+" "+tb);
        t2=StrToTime(TimeToStr(dt, TIME_DATE)+" "+te);
        b1=iBarShift(NULL, 0, t1);
        b2=iBarShift(NULL, 0, t2);
        p1=High&#91;iHighest(NULL, 0, MODE_HIGH, b1-b2, b2)&#93;;
        p2=Low&#91;iLowest(NULL, 0, MODE_LOW , b1-b2, b2)&#93;;
        ObjectSet(no, OBJPROP_TIME1 , t1);
        ObjectSet(no, OBJPROP_PRICE1, p1);
        ObjectSet(no, OBJPROP_TIME2 , t2);
        ObjectSet(no, OBJPROP_PRICE2, p2);
      }
      */
      
      datetime decDateTradeDay (datetime dt) {
        int ty=TimeYear(dt);
        int tm=TimeMonth(dt);
        int td=TimeDay(dt);
        int th=TimeHour(dt);
        int ti=TimeMinute(dt);
      
        td--;
        if (td==0) {
          tm--;
          if (tm==0) {
            ty--;
            tm=12;
          }
          if (tm==1 || tm==3 || tm==5 || tm==7 || tm==8 || tm==10 || tm==12) td=31;
          if (tm==2) if (MathMod(ty, 4)==0) td=29; else td=28;
          if (tm==4 || tm==6 || tm==9 || tm==11) td=30;
        }
        return(StrToTime(ty+"&#46;"+tm+"&#46;"+td+" "+th+"&#58;"+ti));
      }
      //+------------------------------------------------------------------+
      
      

      ......
      i-Sessions_Candles_1.01.mq4

      posted in Questions & Answers
      M
      miro1360
    • RE: How to use multi-pairs in mt5 and mt4

      hedge it into triangle: EURUSD+USDCHF+EURCHF (Buy+Buy+Sell), in long term it is safetly like only 2 pairs 😉

      posted in Questions & Answers
      M
      miro1360
    • RE: Movable buttons in MT4

      you can try make one object like reference object (your rectangle) and others block x y calculated from this rectangle - after rectangle is moved - store into variables its position, and x y for buttons is calculated from this position ...

      posted in Questions & Answers
      M
      miro1360
    • RE: Renko chart tips?

      I am sure, fxdreema is working with renko 😉

      posted in Questions & Answers
      M
      miro1360
    • RE: Indicator buffers issue

      I dont know this because I am not using it this way. Maybe it is possible with blocks Condition for Indicators 😄
      You can try solution with my previous post

      posted in Questions & Answers
      M
      miro1360
    • RE: Indicator buffers issue

      read data only from buffer0, so if buffer0 < 0 than it is "color1" and when buffer0 > 0 than it is "color2"
      dont use buffer1 because it is filled with color0 before comparing and setting to right color

      posted in Questions & Answers
      M
      miro1360
    • RE: Using Multiple Break Even Blocks

      use Trailing stop with Loop for trades:

      1. For each Trade (yes output-orange) - pips away from open price (12) (yes output-orange) - pips away from open price (30) (no output-yellow) - Trailing stop (parameters1)
      2. For each Trade (yes output-orange) - pips away from open price (30) (yes output-orange) - pips away from open price (50) (no output-yellow) - Trailing stop (parameters2)
        .
        .
      3. For each Trade (yes output-orange) - pips away from open price (90) (yes output-orange) - Trailing stop (parameters5)

      not sure if this can work, I have not tryied 😉

      posted in Questions & Answers
      M
      miro1360
    • RE: Working with objects

      search for one with buffers, with google and I am sure, there are those indicators with buffers (I found few in past)
      😉

      posted in Questions & Answers
      M
      miro1360
    • RE: How to find Elliot Wave Pattern

      you can do this in fxdreema with zigzag indicator, but you need a lot of time to understand how zigzag is working
      probably you need few lines of own code in custom mql4/5 code block, but I am sure it can be done 8-)

      posted in Questions & Answers
      M
      miro1360
    • RE: ZigZag Indicator

      Start with "Trace" block to learn how exactly zigzag works. 😉

      posted in Questions & Answers
      M
      miro1360
    • RE: Get trade entry price

      if you will work with open price, you can play with blocks:
      For each Trade + modify stops (here can you directly modify stops relative to open price) ....
      For each Trade + Modify Variables (select "in loop Trade order in loop")
      dont forged select parameters in For each Trade to define what trade you will get, it is loop - sometimes it is better to work inside this loop like outside
      there even exist better solution, but sometimes I am lazy to think 😄

      posted in Questions & Answers
      M
      miro1360
    • RE: Open position above or below the previous position.

      if you will compare only last opened buy or last opened sell prices, you can open prices save into variables, like:
      variable_open_sell
      variable_open_buy
      and before/after opened position you save bid/ask price into these variables - but dont forget, that variables are deleted after restart EA into new chart
      you can than before opening new trade compare variables with bid/ask prices if is more or less depended on how you will open ...
      there are even other/better solutions - with checking prices from opened positions 🙂

      posted in Questions & Answers
      M
      miro1360
    • RE: Please help: Place ATR Stop Loss?

      in blocks where you compare MA, you compare null candle, it means that as time goes this flight up and down and can cross and not cross, you can try compare candle 1 (More Settings - Candle ID in block for comparison).
      Be sure, that you have same period in EA like in chart for visualization results
      check what happens with visual tester mode

      posted in Questions & Answers
      M
      miro1360
    • RE: Place line at Highest open and Lowest open?

      https://fxdreema.com/shared/k88FEQhwb

      posted in Questions & Answers
      M
      miro1360
    • RE: mark past MA crossovers

      work in onInit section or use block pass once, use loop function block or counter (from counters), use increased or decreased variable for looking candles in condition block with indicators and this crossing you can mark with something from objects with specific time/candle ... 🙂

      posted in Questions & Answers
      M
      miro1360
    • RE: EA malfunction

      I guess you have same issue as I had many times and in my case it was not only fxdreema EA, it was EAs created with "my own code" - this problem is something with MT4 and I have rule:
      after a couple of tests EA (mainly on different pairs) is great restart MT4, or delete big log files in mql4 tester folder

      posted in Questions & Answers
      M
      miro1360
    • 1
    • 2
    • 77
    • 78
    • 79
    • 80
    • 81
    • 79 / 81