fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. fxDreema
    3. Posts
    • Profile
    • Following 0
    • Followers 691
    • Topics 32
    • Posts 7485
    • Best 277
    • Controversial 18
    • Groups 1

    Posts made by fxDreema

    • RE: Testing "Start Trades Loop"

      By the way I started to update blocks descriptions and names, and "Start trades loop" will be renamed, but I can't find the right word that describes the process of loading trades one after another. Suggestions? 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Testing "Start Trades Loop"
      1. Yes, most of the blocks. There are only few exceptions like this block.
        This block can be considered as a "driver" - one that does things. Most of the blocks, when executed can reach one of their outputs and that's all. This block, when executed once, can reach it's orange output more than once depending on how many trades (mathcing the filter) there are.

      Ask yourself something. If you have 100 tardes (some of them buys, some of them sells) and you want to modify SL of some of them. How will you do this logically?

      1. Yes, it meand that they are not filtered by magic number. Other filters - by market and type remains. Conditions are fine.
      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Testing "Start Trades Loop"
      1. It's not the same EA. The yellow output of "Start trades loop" is activated when the loop ends, no matter if there were trades or not.

      2. It is not "any open order".

      About "Start trades loop" block:

      This block loops through all trades that matches the filter settings. For each trade the next blocks are executed, and they are supposed to be blocks (from the same category) that will check the trade's attributes (stop loss, take profit...) or modify/close the trade. You can also access the attributes using "Condition" block.

      When it's all over the yellow output becomes active.

      How it Works?

      1. It checks how many trades are running at the moment.
      2. Depending on the selected loop direction it starts to load all available trades one after another (loading a trade means that it's attributes (open price, volume size...) are ready to be checked and it is prepared to be modified or closed)
      3. If the currently loaded trade matches the filter settings, the orange output is activated. Otherwise it skips the trade and it continues to the next one.
      4. The orange output of this block can be activated as many times as many trades are passed the filter settings! When you have blocks connected after this block, they are executed immediately, so the next trade will be loaded after the next blocks does their work.
      5. When all available trades are checked and the orange output was activated as many times as needed, the block goes to it's yellow output. Or basically, it goes to the yellow output always after the work is finished.
      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Pending order Martingale

      Martingale is when you open initial lot size after profitable trade or if it is losable - to double it's lot size.
      Pending orders are placed at time X and opened somewhere in the future... if ever opened.
      There is a block to place pending orders in grid - N pending order at some distance from each other. Optionally their lot size can be different (see gradient settings). So, if this is what you imagine... it can be made.
      Or you want to open pending order instead of trade every time?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Fibonacci

      When you have some indicator, get "Levels tester (for indicators and more)" block and connect it with "Just pass". Select inside the indicator you want to test and on the chart you will see what values it gives to the EA. Knowing these values you can use them with Condition block. Or you can also try blocks from "Indicators" category - they should work for most indicators.

      This exact indicator has two buffers (two lines) and I guess they can be accessed from the EA and used. They are simply two levels. The indicator also draws fibonacci, which is named "AutoFibo" and if it does not rename it while running, it can be used with this name as an object.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: calculation between 2 points

      This is very basic, but something like this? http://fxdreema.com/shared/8OoGYPVqd

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: TVI v2

      This is how to check buffers of this indicator:
      http://fxdreema.com/shared/JV911LqN
      Here I selected buffer #4 which is the white line. The other buffers have values like 2147483647 or price level.
      You can try to use it with blocks from "Indicators" category.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: "Modify each trade" block

      Mmmm now I don't understand this 🙂
      This block is like the combination I wrote above, only if it's output has to be connected with other blocks - in the combination this output goes from the yellow out of "Start trades loop" - this is the point where it goes after the loop is over.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Modify error: Not initialized string in array (4009)

      Well... ok.
      Is there still the same error?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Swing Trade EA using Heikin Ashi

      I don't see trailing stop or break even, but if they are somewhere around, they will also modify trades. What these blocks do is to internally loop trades and modify their stops when needed.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: "Modify each trade" block

      This is one of the oldest blocks and I didn't updated it for months (I have no excuse for that). But "Start trades loop -> (in loop) Modify SL and TP" does the same.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Modify error: Not initialized string in array (4009)

      I can't get this error right now, but I have some idea where it comes to, so I can check that.

      What are you trying to do?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: MQL4 Studio Working?

      Something is not working well with this address, but I will check it later. Try this one: http://fxdreema.com/generator/studio.php?MQL=MQL4 (this is the actual adress) or click on MQL4 near the logo.

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Swing Trade EA using Heikin Ashi

      Is this "Dynamic value (pips input)" the correct one? I think that "Dynamic value (price input)" is the correct one.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Fibonacci

      "Indicator moves within limits" is normally for indicators, but let's look at Candle[0] as indicator. So...
      http://fxdreema.com/shared/5qeaRpUqc
      Fibonacci object is selected by name (myfibo).

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Trades Position Block?

      You are counting how many arrows there are? Then answer the question - what does "Once per bar" do? 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Trades Position Block?

      __... how can I check if the block is actually looping through all of the orders and not just checking the first (newest) order?[/quote:7rex6bgg]
      If I have to do it, I will connect "Draw arrow" and "Terminate EA" after that block and I will count arrows. Also "Alert message" is good for showing information. But your "Start trades loop" should loop all trades as it's not configured to work with only one of them.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Trades Position Block?

      Well, Levels tester draws single value per candle and if new information comes within that candle, it just overwrites the last value.

      By the way, for your last project, go to Options -> Project Blocks: Normalize IDs. I still don't know how block IDs starts to become so big, at least this did not happened to me, but this option turns them back to normal 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Trades Position Block?

      __also, is there a way to check whether another trade is open close to the current market value? For example, if trade exists within 10 pips of candle close[0], then don't open new trade[/quote:1a9ogw44]
      I might be wrong here as well (again not tested), but something like this could work: http://fxdreema.com/shared/am8G3OUpb

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Trades Position Block?

      You can always check if OP is above or below some value, but in this scenario is a little bit more complex. And no, there is no block for this and it can be made with loop, but this will be rude. The code for such a thing takes less space (literally) compared to what will be if you use blocks and variables for them, and in this case it's better to use it as a code. So I wrote this code that can be used in a custom block:

         // input parameters for the block
         int Hours=12;
         int MaxTrades=3;
         double HighLevel=1.9999;
         double LowLevel=0.9999;
         
         int trades_found=0;
         int total=OrdersTotal();
         for (int pos=total-1; pos>=0; pos--) {
            if (OrderSelect(pos, SELECT_BY_POS, MODE_TRADES)==false) {
               continue; // can't load this trade - continue with the next one
            }
            if (TimeCurrent()-OrderOpenTime()>Hours*60*60) { // the difference in time is in seconds
               break; // too old trade, exit the loop
            }
            if ( (HighLevel==0 || OrderOpenPrice()<HighLevel) && (LowLevel==0 || OrderOpenPrice()>LowLevel) )
            {
               trades_found++; // trade's OP is within the limits, increment trades_found variable
            }
            if (trades_found>=MaxTrades) {
               break; // max trades found, no need to continue searching, exit the loop
            }
         }
         if (trades_found>=MaxTrades) {~next~} else {~inext~}
      

      I have to say that I didn't tested that! I just wrote it like this and it can be wrong somewhere, but you can try it at least.
      You can leave input variables like this, or remove them from the code and define it with the program (http://fxdreema.com/studio/MQL4), but for now maybe it's better to edit them inside the code.
      I wrote values like 1.9999 and 0.9999 for levels, but you can replace those with some Variable name.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • 1
    • 2
    • 320
    • 321
    • 322
    • 323
    • 324
    • 374
    • 375
    • 322 / 375