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: Live testing

      Ok, now I think there is something wrong with the strategy or with the broker. MT4 and MT5 are so different in the way they handle trades/positions, so I don't know how the same weird bug is possible. Which has not been reported for MT4, and you know that MT4 users are more than those in MT5. But maybe there is something, who knows.

      You can send me your TeamViewer details on PM. But I prefer to work on some demo, I don't want to be guilty of some losses while I'm doing checks :)))

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: The strategy from scratch questions and problems

      It is possible to define and manage some variables, like what I have here: https://fxdreema.com/shared/pdqIetwpb
      Here I use the global account profit and that native MQL4 function AccountProfit() which gives us the current account profit.
      And this data is collected while the trade is running, which is what I thought you are asking for before.

      I don't really understand what "If history is a loss of -100 $" means, so...

      History trades... note that in live account you have many old history trades, let's say from months and even years ago. So the question is which history trades to work with, which one will be the oldest one. And what value you want to get from them - the average profit/loss, the total negative profit from all losable history trades (skipping the profitable ones) or something else...

      Or you want to get the difference between the starting Balance (when the EA was started) and the current Balance (or Equity)?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      I registered demo account and I tested this, it has problems before. But now it works for me as expected. Is there a chance that you use some old EA, generated before?

      There can be something else that I'm not aware of, MT5 always gives me surprises. Some screenshots maybe? It's a little bit confusing with text logs, MT5 is confusing anyway with it's deals and orders and positions 😕

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Betting parameters of the block and Buy Now Sell Now.

      No no, these are not boolean values, these are numeric. How many profits/losses we need in order to reset the lot size to it's initial value.
      Well, 0 means that the option is off - we never reset in this case. 1 means that after the first profit it will reset.

      With these values you can turn Martingale into Anti-Martingale (Paroli). And if you have values like 2, 3, 4... into something that is not Martingale anymore. It's more flexible with numeric values like this.

      But 0 is the same as false and 1 is the same as true, so you can probably use boolean values for these.

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Betting parameters of the block and Buy Now Sell Now.

      😕 Can you ask this again with different words?

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Live testing

      https://fxdreema.com/shared/ekaoCABkb

      I use this to test what is going on. It contains some blocks for messaging, but in general this closes everything at start and then creates a new position with size 0.1 lots. So everytime you run this EA it should close whatever is opened and create new position with 0.1 lots, not 0.2, 0.3 ot something else lots.
      Is this EA working like this on your side?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: self updating/refreshing grid, compare two groups of trades

      P1, P2, P3 - these represents input parameters of the blocks.

      Dalembert block, and all the blocks in the category that no longer exists work ONLY when all trades from the group are closed. You know, these are betting systems after all, which means that you bet, then wait to see if that bet will win or lose and after that you bet again depending on the last bet. If you open 2 or more trades at the same time, this is something else that is not Dalembert, Martingale ot any other betting system.

      But now those betting systems are in Buy now and Sell now, and I allowed them to work with currently running trades... somehow. When going to create a new trade it will check the last running trade first. If there are no running trades then it will go to check the last closed trade, which is the normal situation.

      For anything other than that I think some variable should be used. By the way check "Betting: Custom sequence" option.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Problem with custom indicator ex5

      Do you have this indicator for MQL4? If it works when you manually add it, then it must work in visual backtest if it's parameters are fine. Look at the log for some error messages.

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Live testing

      If the strategy itself can be converted, why not. You can copy-paste blocks, but then you will need to check them all, because there are some differences. Some blocks looks the same, but they are with different name in the database and such a block will not appear correctly (this is something that I should fix some day). And there are blocks with options designed only for MQL4/MQL5, and in this case you will need to change the strategy... probably.

      The other way to copy project is for example to generate mq5 file, rename it to mq4 file and import it back again. It should create MQL4 project now. And again, blocks needs to be checked.

      The best (and time consuming) is to recreate everything in MQL4, starting from scratch. Or this is how I normally do things... well, this takes time, but when I do that, I always fix something and I'm making it a little bit better 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Problem with custom indicator ex5

      I don't use any indicators for myself, because I don't trade. But if you want to use some, the first thing is to know how it will help you. Use something that you need. Don't use a custom indicator only because it looks beautiful and you think it should have some magical power. No, indicators are not crystal balls, they just convert history data into lines or signals.

      When you know that some indicator will help you, then check if it will work in the EA. Indicators have buffers (or those channels where they send information to the EA) and you must know what is inside those buffers in order to use them. Why? Because custom indicators are made by different people and even if there are general rules, often people does not follow them exactly. Someone will use EMPTY_VALUE, other will use 0, other will use -1, other will use something else. So check that indicator before use. I made this block "Indicator tester" to do that... of course it's not the best, but it works, it's better than nothing.

      How to add indicator into fxDreema... when it is .mq4/.mq5 it's probably easy. When it is .ex4/.ex5... a little bit complicated, but no so hard: https://fxdreema.com/documentation/proj ... indicators

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Live testing

      People use history data from other sources, some work with Ticks Data Suite, others with Tickstory (free). How to work with these... I don't know 🙂 Or delete all the history files and download the data again... this helps to cover some holes, but normally creates others.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      Because there is no OrderClose() or PositionClose() function. Positions are closed with another opposite position with the same lot lot size.

      I think I tricked it, now it should work fine.

      I'm gonna say that I don't know why peope are using MT5 🙂 MT5 started in 2010 and years later most people and brokers still work on the previous version - MT4. Last year MetaQuotes even decided to update MT4 (finally updated this year), so now MT4 has all the positives from MT4 and MT5. Well, MT4 still has problems with it's history data anyway...

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      Why there are no problems in backtest - because the backtester is really synchronous, it can't be another way

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      Oh damn, now I really dislike MT5 😮

      Here is the problem basically.

      MT5 sends trading request to the server with OrderSend() function, the same function is used to open and close positions. It sends the request and then it waits for a response from the server. Depending on the response (some code that means something) the EA decides what to do next. Everything should be synchronous, but it appears that it does not work that way... sometimes. While the communication between MetaTrader 5 and the server is synchronous, the way MetaTrader 5 handles it's local database appears to be asynchronous.

      Here is what happens basically.

      1. You have 1 position => PositionsTotal() returns 1
      2. You close that position, successfully, and the EA knows that
      3. Because there is an endless loop for "Close all positions", the EA checks PositionsTotal() again. And sometimes PositionsTotal() returns 1 even if there is no position anymore! Now the EA thinks that there is some position to be closed, and it actually tries to close the same position as before, because all it's data is still available to the EA, it's still not updated from MetaTrader 5. It will be... after some milliseconds, I think it depends on how slow is the PC at that moment.

      I found topic about this problem in mql5.com: http://www.mql5.com/en/forum/16492

      I knew that something like this happens for indicators, but I didn't expected MT5 to behave in such a weird way for it's positions. Now I have to find some way to trick this.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      Ok, I found weird behavious when closing positions. For some reason it tries to close a position more than once sometimes, which leads to multiple opposite positions. I'm still not sure why that happens, but I will fix it.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Store and compare orders count

      Try this: http://prntscr.com/43w81o

      Setting the variable to 0 is needed, because it will then be incremented and you don't want to incremenet it on every tick without resetting.
      In my case I use "V1" to descrive the variable, not it's real name. This "V1" is valid only in this small window, it is not a variable name... just something short to use instead the variable's name.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Live testing

      Is there another EA working in parallel?

      I see 1 "Long position" at the top and all of the other rows in the log ends with "closed". Some screenshot maybe? 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Debugging

      Randomly...
      This is how I made it initially, and it's the same way today. If you cross MA5 and MA20 with x>, the conditions are these:

      MA5[0] > MA20[0] and MA5[1] < MA20[1]

      where 0 and 1 are candle id's.
      This works for indicators, because each indicator has 1 value per candle. It becomes a little bit weird when candle data is used:

      Close[0] > MA[0] and Close[1] < MA[1]

      Here it will be more correct if Close[1] is Open[0] instead. But in "Condition" is not. That's why I created 2 more blocks for price crossovers, which work in a little bit different way - they detect when the price crosses some value, but using data from the current tick and the previous tick.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Debugging

      It's block 343 I guess. So the condition inside is not working. Are you sure you want to work with Candle Open? And maybe try with the block named "Price x< Indicator", if this is the idea.

      x< in Condition block works a little bit... it depends. In your case it compares Candle Open vs Indicator for the current candle, and also for the previous candle.

      Try this condition alone.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Problem with custom indicator ex5

      Indicator errors are ok if they are small numbers, because of... long story, but when these appears all the time it's not ok 😮
      If you have some simple custom indicator with 2-3 parameters, will it work correctly?

      posted in Bug Reports
      fxDreema
      fxDreema
    • 1
    • 2
    • 273
    • 274
    • 275
    • 276
    • 277
    • 374
    • 375
    • 275 / 375