fxDreema

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

    tiag01

    @tiag01

    0
    Reputation
    682
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    tiag01 Unfollow Follow

    Latest posts made by tiag01

    • RE: What is the right way to do this with Fx Dreema

      __
      Now I got another idea. To make block buffers, very similar to those of custom indicators. In some way each block will be able to hold it's own set of values that can be received from next block (or all the other blocks). If such feature exists you can for example build a block to calculate some things and put the result into buffer to be read from next blocks. And you can call this block "Calculator..." or something, and it will be clearly visible as a module.
      [/quote:awvnnzmr]

      That would be great, that would make it very, very useful. That flexibility would allow me to create complex interactions and make modules that others could share.

      posted in Questions & Answers
      T
      tiag01
    • RE: What is the right way to do this with Fx Dreema

      Thanks for the quick reply 😄

      The penny dropped when you said, " But blocks are not designed to return values, because they are not capable of reading values from other blocks (today). They comuunicate each other with logical connections". That makes sense - your builder for blocks is about determining programmatic flow - next block.

      "When you want to return values you can create custom functions (lower right part of the screen)."
      I can see in Library studio that I can create custom functions - just usage of them seems a little too constrained. I would like to be able to easily use these functions where I can set dynamic value to a result of a custom function (even via a formula is fine). Today you can pass in the results of a formula. Looking at formula if it could have an option on an operand to call one of the custom functions and store that in the result value, that would work great. (For now it doesn't need to be able to browse custom functions, having to type it in works as well. Over time it would be nice to have the ability to set the different function parameters to how you do that for other blocks today - nice but not must have.) Then I can create lots of functions that can be re-used by nearly all blocks for dynamic values.

      I would definitely like to take up your offer on how to learn Library Studio via TeamViewer - that would be great. I live in Australia - so would need to work out the right timezone.

      Just a little point, the word correction maybe you could look at the word adjustment. Correction seems to indicate you did something wrong and need to correct it, or in market correction means something else. Adjustment is adjusting the value to suit. Not a biggie, just first time seeing a UI that has the word correction and it took me for a spin, like what the heck is that feature?

      On Ideas - lots of ideas for ya - will hold back the flood gates for now - we are just getting started 😉

      posted in Questions & Answers
      T
      tiag01
    • RE: What is the right way to do this with Fx Dreema

      Hi All,

      I think what your doing with fxDreema is fantastic!

      It allows me to focus my time on the conditions of entry and exit. My custom indicators worked a treat with determining the buffers and such - great stuff.

      I am trying where-ever possible to make everything use blocks, so that I can re-arrange and add other conditions or flow without having to change by hand hard-coded blocks.

      I have a few common tasks I write within my EAs and wonder what is the right fxDreema way to do these things:

      On the init() in my EA usually works on one timeframe and either on one particular currency pair or other currency pairs that have different global values such as stop loss, take profit, trailing stop, etc.

      Question 1:

      In my code today if I do the following:

       if (Period() != PERIOD_M5) {
            Comment("ERROR: This EA needs works on the 5 minutes interval, Please CLICK the M5 button.  EA STOPPED.  Please click on the M5 for this EA to work.");
            StopEA = true;  // this in start will just return on tick, exiting ea with message would be nice as well.
            return (-1);
         }
      

      I understand that Comment is available as a block and creating a Flag called StopEA is available as a block.

      I can't see a block that contains the actual major MT4 properties for the chart / timeframe. There is account and such which is great but I can't see it.

      If you could add this that would be great.

      if (StringSubstr(Symbol(), 0, 6) != "EURUSD"){
            Comment("ERROR: Currency Chart needs to be AUDUSD chart. EA STOPPED.  Remove EA from current chart and Attach EA to AUDUSD 5M Chart. Currently on chart:", StringSubstr(Symbol(), 0, 6) );
            StopEA = true;
            return (-1);
         } 
      

      Once again I can't see Symbol, I do the string substr as a number of brokers add a suffix.

      At the top of my start() block i have the StopEA flag true or false. with False just putting an error message.

      I don't mind coding for some of my esoteric functions, however I thought these simple points would be out of the box.

      In library studio how do I make these two functions be in a block? Is there any good examples that actually give a true /false value that I can use as a basis. I couldn't actually find any good documentation and a meaningful example for the library studio. An example where you have a function that returns values.

      Another example is I want to set the buy lot size to a result of my own function. I would like to avoid custom MQL4 code and make this a block.

      Say I wanted the lot size determined by dividing the account balance by 1,000

      Lots = MathMax( NormalizeDouble( (((MathFloor(AccountBalance() /1000))) * 0.01) , LotsDigits) , MinLots) ;
      

      How do I make this function as a block so I can put that in before the buy/sell block?. Your help would be much appreciated.

      I don't mind make a number of my blocks I create - provided they are useful for others / and it's easy to do in Library studio - available to everyone.

      I would like to make some function blocks so that other people could use them as well.

      Looking at a number of my EAs I notice a few functions not available from the system library, that might be beneficial to others: (Apologies if this is already available out of the box - new to this tool)

      • after an on bar event, whenever the order history has changed and it's either a buy or sell (not a pending order cancel, manual cancel, credit or debit) then call a function adding these orders to a Loop, with this let let me send this data to a file or to a server with a list of parameters while returning the new lot size.

      • A cool feature for me would be a stats table that holds distances from different values such as distance from 100 SMA and other SMA, and distance from price. You set all these values and then when a trade is completed you output these values with the profit and can be used to determine what other values can be used to make the EA profitable.

      • I would like you to support a PSAR trailing stop and a ATR trailing stop (I can provide code for this, if that makes it easier)

      • detect a GAP, i don't want to trade on after a GAP.

      • a simple volatility check, if the average distance between the high and the low for the last n bars is >=N

      • liquidity check - too little ticks, get average number of ticks.

      • for Money management you normally have five strategies
        1 = fixed lot
        2 = fixed fraction
        3 = fixed ratio
        4 = percent risk
        5 = percent volatility

      • please support lot size as fixed ratio
        Fixed ratio MM uses a variable % risk to ensure a constant ratio between position size and the rate at which position sizes increase: your risk is higher when your account is small than it is when your account is large.

      See http://www.forexfactory.com/showthread.php?t=171200 for more details

      Some of the functions available are very powerful and I think some documentation is holding back people getting their full worth from this product. It would be nice to have an FAQ that points to features of the blocks that support different problems. For example, "If the trade is older than say 2 days then close the trade."
      This can be achieved from the Category: "Actions over the group of trades"
      Close each trade has the ability to close trades that have meet a user specified expiration time.

      posted in Questions & Answers
      T
      tiag01