fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. rafaelgrecco
    3. Posts
    R
    • Profile
    • Following 0
    • Followers 1
    • Topics 28
    • Posts 111
    • Best 7
    • Controversial 0
    • Groups 0

    Posts made by rafaelgrecco

    • RE: "For Each Closed Position" block is not working.

      @ambrogio is it couting the closed trades?

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: "For Each Closed Position" block is not working.

      @l-andorrà Thank you for the reply.

      But the project I shared as example is new, I made it just as I posted here... it means even new blocks are not working.

      Have you tried the example? It's pretty simple. Just add it to your MT5 and wait for you other EAs or manual trades do complete. The counter should add 1 each time a trade is closed, but it is not working (at least not on my terminal...)

      posted in Bug Reports
      R
      rafaelgrecco
    • "For Each Closed Position" block is not working.

      The block described in the title (For Each Closed Position) is not working anymore.

      Projects I made around a month ago (begnning of February) that used this block were working correctly.

      When I import those same projects and compile them again, those blocks stops working.

      I made a very simple project as example: https://fxdreema.com/shared/j4rfm1PBc

      In this simple project, everytime a trade (any symbol any magic number) is closed the counter should be implemented by 1, but it is not.

      Can you have a look please?

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: For Each Closed Trade - Block Filters

      @l-andorrà Thanks for the info!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: For Each Closed Trade - Block Filters

      @l-andorrà thanks for replying.

      I don't know if I made myself clear on my original post.

      Imagine you are running the EA "X". You configure 10 on that field (just as you posted) to loop the last 10 trades.

      Now imagine you also run EA "Y" on the same account. Let's suppose the last 9 closed trades were from the EA "Y", the 10th trade is from EA "X".

      How will the block work on this scenario?

      1. Will it just find a single trade to loop? Because of the last 10 trades, only one of them was from EA "X"

      2. Will it look for the last 10 trades from EA "X" - this means it will keep looking through the trades history until it finds 10 closed trades from EA "X"

      Thanks!

      posted in Questions & Answers
      R
      rafaelgrecco
    • For Each Closed Trade - Block Filters

      Hi,

      When using the block For Each Closed Trade, we should set a maximum number os trades so the EA does not loop through all trades in history.

      If we set for example the last 100 hundred trades, does it mean it will look at the last 100 trades on this exact EA (using this EA's Magic Number) or it will look at the last 100 trades overall (any Magic Number)?

      Does this apply to any filter? Using the same example above, if I ask the block to filter only "Buy" trades, will it look for the last "100 buy trades" or it will look for the last "100 trades" and maybe only 50 of those trades are buy - so It will loop through 50 buy trades?

      Thanks!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How can info be included on the 'comment' column when closing a trade?

      @l-andorrà It cannot be changed on MT4, but can be changed on MT5.

      I believe we don't have a block for that function, so you would have create a Custom MQL Code block like this:

      m_request.comment = PositionGetString(POSITION_COMMENT);

      I'm not sure if you could just use a Close Position block and then use the Custom MQL Code block to change the comment or if you have to create the entire close function, something like:

      m_request.action =TRADE_ACTION_DEAL;
      m_request.position =ticket;
      m_request.symbol =symbol;
      m_request.volume =PositionGetDouble(POSITION_VOLUME);
      m_request.magic =m_magic;
      m_request.deviation=(deviation==ULONG_MAX) ? m_deviation : deviation;
      m_request.comment = PositionGetString(POSITION_COMMENT);

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Check Age filter

      Thank you!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How can info be included on the 'comment' column when closing a trade?

      I think it's only possible to include a comment when opening a trade. It cannot be changed afterwards.

      posted in Questions & Answers
      R
      rafaelgrecco
    • Check Age filter

      Hi,

      I'm wondering if when using the days parameter on the Check Age block, it considers 24 hours or the date?

      For example, If I set "Newer than 1 Day", like the image below:

      0_1615401726194_checkage.png

      Will it consider any trade within the last 24 hours or it will only consider trades that opened after 00:00? (for example, if it is 5 am it will only consider trades that were opened on the last 5 hours, that same day).

      What I need to do is filter the trades that happens on the same day - between 00:00 and 23:59.

      Thanks!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Trades opening on inferior time frames

      @ovidiuzav as l'andorrà said, you need to separate the "close trades"blocks. You can do it like this:

      0_1593114852556_tree.JPG

      Notice that the orange exit of "No Trade" works when there is NO trade, so it is looking to buy. The yellow exit of the same blocks works when THERE IS a trade, so it is looking for the closing strategy.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Trades opening on inferior time frames

      The indicator values will oscilate whitin the hour candle. It could cross and "uncross" during that hour.

      If you want to check the cross once the candle is closed, you can add the Time Filter block "Once per bar" and change the condition block to check Candle ID 1 (previous candle) instead of 0 (current Candle).

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Basic Question: How to control One EUR/USD Buy Or Sell at a time

      NoTrade->Condtion->OnceADay->CloseTrades->BuyNow

      That should work! You only need to set Block NoTrade to filter only Buy trades.
      That way it will only open a new Buy trade on the current pair (EURUSD for example) if there isn't one opened yet.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Possible bug using "For Each Closed Position" on MQL5 block.

      I managed to find a different solution. I'll just keep this topic here, eventually the admin/programmer will read this and have a look at this bug.

      Thanks for your time.

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: Possible bug using "For Each Closed Position" on MQL5 block.

      Thank you for you replay.
      I've made some additional testing.

      Those blocks actually work correctly when used on "Every Tick". The problem seems to be related to detecting Stop Loss and Take Profit (which I was trying to use).

      https://fxdreema.com/shared/pIYUDZWzd

      posted in Bug Reports
      R
      rafaelgrecco
    • Possible bug using "For Each Closed Position" on MQL5 block.

      Hi,
      I want to print the Profit of the last closed trade. This is how it should be done:
      https://fxdreema.com/shared/WCAWB3F2e
      This works perfectly on MQL4, but it's not working on MQL5.
      This project is printing the oldest trade Profit, like if the Loop direction is reversed (instead of selecting the newest trade, it is selecting the oldest one).
      If I change it to print the Oldest trade (invert the Loop direction), it does nothing (does not print anything). Again, just to make it clear, this exact same project works perfectly using MQL4 blocks.
      Is this a bug?
      Thanks

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: EA for Renko bars

      For MT4 I recommend this renko sold on this site:
      https://ovo.cz/products/offline-charts-for-mt4/renko-bars/
      For MT5 I recommend this renko sold on MQL5 market:
      https://www.mql5.com/pt/market/product/29005
      I personally use both products I mentioned above.

      To make a simple EA like mentioned on the first post, you have to simply use a condition box to compare how the last candle was closed:

      If Close of Candle ID 1 is > Open of Candle ID 1 = it was a up candle -> open buy position
      If Close of Candle ID 1 is < Open of Candle ID 1 = it was a down candle -> open sell position

      While it is simple to make such EA, it does not mean it will be profitable...

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How to cancel order if it takes too long to open

      @trader-philipps Yeah, I've talked to other people that also uses my current Broker (or any Broker in Brazil) and it seems it is a common problem.

      Unfortunately there's nothing I can do, like changing brokers... all I wanted was a way to cancel the trade if it took too long to be executed, but I don't think that's possible 😞

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How to cancel order if it takes too long to open

      @paragorundu @CPxiom

      Hey, just to be clear I am using a VPS with a ping of 3 ms to the broker.

      My VPS is actually on the same data center that the broker uses. Connection is not an issue.

      Today all trades are getting executed in 30-40 ms.

      My problem is that eventually the broker messes something up and trades takes several seconds (sometimes up to 40 or 50 seconds) to execute the trade, and I wanted a way to prevent the trade from being executed when that happens.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How to cancel order if it takes too long to open

      @trader-philipps thanks for the tips.

      I don't think "expiration" field will help. The lowest value possible is 1 minute. I would have to use something like 10 or 15 seconds (which is already a looong time for a trade to be executed).

      The asset I am trading is the most liquid asset in Brazil. I'll contact my broker's support to see their explanation.

      posted in Questions & Answers
      R
      rafaelgrecco
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 1 / 6