fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. QuantEngineer
    3. Posts
    Q
    • Profile
    • Following 1
    • Followers 22
    • Topics 17
    • Posts 79
    • Best 17
    • Controversial 1
    • Groups 0

    Posts made by QuantEngineer

    • RE: Finally, News Filter for MT5 in 1 easy to use Block !!

      Hello Developers, I am happy to announce that I have done some improvements to this code and now it also displays the events on the chart, for reference...

      Here is how the block looks like
      fbd1ea6f-6967-488f-a71a-1e412ce39968-image.png

      Enjoy the latest main code

      /*
      int minbeforeEvent = 60*24;
      int minAfterEvent = 60*24;
      string currency_code = "";
      string country_code=NULL;   //--- country code (ISO 3166-1 Alpha-2)
      ENUM_CALENDAR_EVENT_IMPORTANCE min_event_importance = CALENDAR_IMPORTANCE_HIGH;
      */   
      
      int FilteredEventsCount = 0;
      MqlCalendarValue values[];
      //--- set the boundaries of the interval we take the events from
      datetime date_from=TimeCurrent() - (60*minbeforeEvent);  
      datetime date_to=TimeCurrent() + (60*minAfterEvent);                // 0 means all known events, including the ones that have not occurred yet
      //Print(TimeToString(TimeCurrent(), TIME_DATE|TIME_SECONDS), " -> Searching from ", TimeToString(date_from, TIME_DATE|TIME_SECONDS), " to ", TimeToString(date_to,TIME_DATE|TIME_SECONDS));
      //--- request event history since the beginning to future time
      
      //if(verbose) Print("Begin Searching for events from " + TimeToString(date_from,TIME_DATE|TIME_SECONDS) + " to " + TimeToString(date_to,TIME_DATE|TIME_SECONDS) + " For Country " + country_code + ", currency " + currency_code );
      if(!CalendarValueHistory(values, date_from, 0, country_code, currency_code))
        {
         PrintFormat("Error! Failed to get events for country_code=(%s), currency=(%s)", country_code, currency_code);
         PrintFormat("Error code: %d", GetLastError());
      
        } else {
      	  //if(verbose) Print("Found some events");
           //PrintFormat("Received event values for country_code=(%s), currency=(%s) is (%d)", country_code, currency_code, ArraySize(values));
      		int total=ArraySize(values);
      		string commentString = "";
      		for(int i=0; i<total; i++)
      			  {
            //if(values[i].impact_type < )
               MqlCalendarEvent event;
               ulong event_id=values[i].event_id;
               if(CalendarEventById(event_id,event))
                 {
                 if(((ENUM_CALENDAR_EVENT_IMPORTANCE)event.importance >= min_event_importance )
                     && (values[i].time <= date_to)
                     )
                    {
                     FilteredEventsCount++;
      					  
                     commentString = commentString + TimeToString(values[i].time,TIME_DATE|TIME_SECONDS) + " " + event.name + " " + EnumToString((ENUM_CALENDAR_EVENT_IMPORTANCE)event.importance ) + "\n";
                    }
                 }
           }
         commentString = "MQL5 returned " + FilteredEventsCount + " events from " + TimeToString(date_from,TIME_DATE|TIME_SECONDS) + " to " + TimeToString(date_to,TIME_DATE|TIME_SECONDS) + " For Country " + country_code + ", currency " + currency_code  + "\n" + commentString;
      	if(verbose) Comment(commentString);  
      }
      if( FilteredEventsCount > 0 )
        {~next~}
      else 
        {~inext~}
      
      posted in Tutorials by Users
      Q
      QuantEngineer
    • RE: Simple Custom Block to detect Hedging or Netting Accounts

      Currently, I am not accepting work requests via forums. in case this is important enough to have a budget associated with it, you are welcome to let me know via Inbox and I will be happy to help.

      posted in Tutorials by Users
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      @fxDreema Thanks for working on the "Position Created" block.
      You are Amazing !! Thank you for the feedback !

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Tutorial - Create Custom Blocks with "FXDreema Studio"

      Yes, I have found the same error with enumerations... I think the text parser that fxdreema uses on custom blocks prior to compiling the code is not compatible with enumerations ... The only way I could get enumerations into FX Dreema without having to copy-paste every time a new compilation was needed, was to place the enumerations into a custom indicator and import the indicator into the fxdreema EA via "My Indicators-> Add Custom Indicator" and use the indicator anywhere in the decision trees... once the indicator is part of the fxdreema project, now you can use any of it's enumerations freely...

      posted in Tutorials by Users
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      I did 1 custom blocks to fix the issue of detecting a new position. I will share it here for you and others who might be facing the same problem.
      Usage: Place the custom blocks before the FX Dreema Position Created Block, like this
      image.png

      The first block is called "is position created", can be done in 3 steps, here they are

      image.png

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      Here is how it looks... Very simple...
      image.png

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      I have created this small project just to isolate the operations of the blocks: Position Created, Position Closed, Order Created, and Order deleted....
      https://fxdreema.com/shared/qgHw0tp6c

      The custom code will only print the action detected by the 4 blocks at the upper part of the code to the console.

      When the user creates or closes a position, either ways, the Position Created block is falsely triggered several times...

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      Today, I just noticed that the block "Position Created" is also triggering as a false positive when a position is closed...
      I was even working on a custom block to detect false positives, but when it happens, the ticket comes with a different number... a

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      If anyone has any experience with this, welcome to share

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      Here is the link to the test project
      https://fxdreema.com/shared/B5sSQ70Wc

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      For some reason, this is what happens in the log... Only the first time that the block runs, it works correctly... after that, is has some unexpected behavior where it runs multiple times even if the user only opens 1 position... and it runs also even if the user "closes a position"

      image.png

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Position Created block with failure.

      I am also finding a problem in the "Position Created" Block... I have isolated the issue to a minimum project, where it becomes really easy to reproduce the issue....
      image.png

      The only purpose of this project is to detect when a position is created...

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Finally, News Filter for MT5 in 1 easy to use Block !!

      @stevenpham1996 That sounds right... Line 13 Prints received 0 events, etc etc when there are no events near, for the items in the events filter, on that date time when the block is running. if there would be any events in the array, it would say how many events were received.

      posted in Tutorials by Users
      Q
      QuantEngineer
    • RE: Time GMT is reading time from the wrong watch, while assigning values to variables.

      I did send via the contact form today. Thankyou for helping.

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: Time GMT is reading time from the wrong watch, while assigning values to variables.

      Since this is a recent issue, he might be even searching for it these days on his current work.
      What is the best way to let him know?

      posted in Bug Reports
      Q
      QuantEngineer
    • Time GMT is reading time from the wrong watch, while assigning values to variables.

      I have recreated the experiment with a small very specific EA, to confirm the hypothesis above, and here is the result in full.

      On this small project, both variables are receiving TimeGMT, but in different ways, one from FX Dreema, and the other from TimeGMT() MQL5 function.

      0_1651771913717_d301b33d-2c1d-413e-bb10-60167fbda6cc-image.png

      Here is the Shared Project https://fxdreema.com/shared/djeEKV9Ud

      And here is the result of execution, notice that in the experts tab, the console is showing 2 different readings of time, even though, both should be Time GMT read at the same time.

      0_1651780080195_f753af93-0e7c-49b1-88ab-634d4ec4e844-image.png

      Apparently, this started to happen recently, because on prior tests, it was good, last month.

      I hope this report helps further develop FX Dreema.

      Sincerely, Quant.

      Peace!

      posted in Bug Reports
      Q
      QuantEngineer
    • RE: How to do include in "Custom MQL code" ?

      @fxdreema This message is very clarifying to help build with the FX Dreema Studio.
      I am working on building some tutorials for the studio and would like to know if there is somewhere, a list of all the things that we can use with this ~~ notation, like:

      {~next~} is used to move from the current block to the next block
      {~inext~} is used to move to the other block, the orange dot output
      etc... etc...

      Specifically, I am currently looking for ways to assign values in FX Dreema Studio, to variables created on the FX Dreema Builder....

      On this Screenshot, I want the custom FX Dreema Block "testBlock" to replace the initial value "initial value", but what is in the custom code, "Hello World".
      0_1650760093405_1f24e0c5-972d-4f4b-a9e6-8e816280de4d-image.png

      And here is a screenshot of the custom code that I am working on to figure out how to make happen.
      0_1650760389032_29df4a05-dfdc-4807-8408-ba7c5a41d695-image.png

      And here is the link to the project shared/m7CchTVcd

      posted in Questions & Answers
      Q
      QuantEngineer
    • RE: [Custom Block Release] Send a message or screenshot to Telegram Blocks

      @Spuzy You are AMAZING ! Thank you so much for your post ! Extremely helpful, I was already dealing with the issue with the JSON objects, and found out that you already went through and described all of it.

      In case you want to have 2 exits from the FX Dreema custom Block for when the Telegram Message was sent successfully, or Not Successful, you can use the {~next~} and {~inext~} on your custom block. There is a more detailed description on the usage here: https://fxdreema.com/forum/topic/14131/simple-custom-block-to-detect-hedging-or-netting-accounts

      Thank you so much for sharing ! Peace !

      posted in Tutorials by Users
      Q
      QuantEngineer
    • RE: how to create 3 condition block runing separeately

      Maybe use the block "AND" to get more than 1 condition simultaneously.

      posted in Questions & Answers
      Q
      QuantEngineer
    • How to Upload *.mqh files to be compiled by FX Dreema

      Hello Everyone,

      Thanks for reading this post.
      I am creating new custom blocks for FX Dreema, but I am receiving an error because the online compiler is not finding the *.mqh include files.

      0_1650328487643_0cd01058-c5ea-4d53-b9cf-8755adadf158-image.png

      I know exactly where this error is coming from, since I am creating a custom block to make it easy to send Telegram MEssages using FX Dreema...
      See below, the code that generated the error on FX Dreema Studio.
      0_1650328578314_b026d3ac-808d-4911-bf00-00b0fab72122-image.png

      posted in Questions & Answers
      Q
      QuantEngineer
    • 1
    • 2
    • 3
    • 4
    • 2 / 4