There is a pink block "check profit" (with small letters) that is more special, it should be used inside a loop made with one of the "For each...." blocks.
Posts made by fxDreema
-
RE: Difference between "Check Profit" and "Check Profit (Unlealized)posted in Questions & Answers
-
RE: Can't attach my EA's anymoreposted in Questions & Answers
I know for some problem, but I fixed it yesterday. Right now I don't have an idea what could be wrong. I tried your "Breaker" project and I get many many trades as a result.
-
RE: Nothing happen, not a trade open, maybe becouse of flags or variables, I dont know.posted in Questions & Answers
I think you are using too much blocks that deal with variables - Modify Variables, Flags, Turn OFF. They are literally more than the blocks that actually do something. So, I think that it's better idea to make this project in in different way by using less blocks as possible. These flags only lead to confusion, I don't even want to check where is the problem

-
RE: EA with Cycleidentifierposted in Questions & Answers
Probably. I don't know this indicator, but there is a good chance for most of the indicators to be used in an EA. You can have problems with too slow (badly written) indicators or indicators that does not have output buffers and only draw some objects on the chart... but even then the objects could be read.
When you get new custom indicator, check it in this block: https://fxdreema.com/demo/mt4-trace-multiple
-
RE: About "time filters".posted in Questions & Answers
Yes it is correct to put them there. And yes, each block adds some "extra work", including time filters.
-
RE: Error with custom indicatorposted in Questions & Answers
Remove this "string " here http://prntscr.com/ezalgc
-
RE: pending ordersposted in Questions & Answers
I always prefer to explain how things work in general

SL/TP of the trades is also important. And also what happens if that sell limit (in 2) for some reason is never reached... let's say that the price goes up
-
RE: Testing pass stopped due to a critical error in the EAposted in Bug Reports
I think it's ok now, I fixed it yesterdy
-
RE: Buy Trades Not Being Openedposted in Questions & Answers
Something doesn't work because of the too big value of SL in "Buy now". I guess that SL is calculated to be somewhere in negative area, which is not correct.
-
RE: Error with custom indicatorposted in Questions & Answers
Oh, something is wrong with this input fields where you normally put EURUSD. Yes, it is supposed to write things like EURUSD, but it gives these errors. This is a bug that I need to fix. It works if you write it like this - "EURUSD", but this is not the way it should be. I will try to fix this problem today.
-
RE: iCustomposted in Questions & Answers
This function is used to load custom indicators into the EA. fxDreema is an EA builder and as such, it is supposed to be used from people that does not understand programming very well => using MQL functions directly is not a focus, but it's possible. You can use MQL code almost in every input field, but this particular function is kinda "crazy" and I will just suggest to work with custom indicators in the way people work with them in this EA builder: https://fxdreema.com/help/working-with/custom-indicators
-
RE: How to get running orders countposted in Questions & Answers
I would suggest something like this: https://fxdreema.com/shared/eJY9ZYWnc
But there is a catch. The thing is that these Bucket blocks normally does not pass when they can't find any trade. I connected both of their outputs because of that, but as a result you will see some big values instead of 0. Basically these blocks can't be easily put to work with 0 trades and I need to decide how to deal with this. -
RE: pending ordersposted in Questions & Answers
If a pending order is just deleted, I don't know how to then get it in MQL4. If a pending order is triggered (turned into a trade), then you can work with that trade.
How to get data from the latest trade/order/history trade?
It's good to understand what these blocks do: https://fxdreema.com/examples#Loop-(For each...)
So, depending on what you need to load (trade, pending order, history trade), you would use one of these darker pink blocks whose name starts with "For each...". To only load 1 trade (or order, depending on the block), open the block and set the value of 1 in "Not more than n ...." parameter. You will find this parameters, it's somewhere at the bottom.Ok, so now we have that dark pink block that is supposed to load the latest one trade, order or whatever. Then what?
- You can use any of the other light pink blocks, or...
- Let's say you have "Condition" block. You have a category "(in loop) Trade/Order in Loop". Go to that category and select any of the things that will appear. Now you have values such as SL, TP, Open Price, Close price and everything that belongs to the loaded trade or order. But guess what - you can use these in any other block, not only in "Condition". For example, you can get the Open Price of that latest trade and use that Open Price to open pending order on it. Just navigate to Open Price, but in let's say "Buy pending order" block. Something like this: http://prntscr.com/eybpt2
-
RE: Block "play sound" not working correctlyposted in Bug Reports
I will take a look. I did some updates with this block these days and I probably did something wrong
-
RE: Compilation errorsposted in Bug Reports
I fixed this for now. The problem is that I copied MQL4 code (regarding virtual stops) and put it into MQL5, but it seems that some function doesn't exists in MQL5. So now I removed that function call, but I guess this means that virtual stops would not work in some situation. But your project does not use virtual stops, so anyway

-
RE: Remove indicator repaintingposted in General Discussions
EAs are different than indicators. I always say that it's not a good idea to make EA to do what a custom indicator is supposed to do. Indicators are best for calculation and printing the information on the chart, while EAs are best for working with trades and orders. I will suggest to change the code in the indicator itself. Or maybe the indicator is just working properly and that repainting is normal.
-
RE: Average spread > fixed levelposted in Questions & Answers
In MQL4 try "Spread filter" block. There is extra setting for this. But I made this long time ago, the code is complex and I'm not sure if it still works

-
RE: check profit (unrealized) as money total sumposted in Questions & Answers
The block doesn't return a value. There is a value that is calculated, but it stays "inside the block" where it can be checked. You can see in the properties of this block that you can select how to check the unrealized profit (to compare it with some numeric value).
If you want to get the value and use it in another block, you can use those "Bucket..." blocks.
-
RE: Trades, BE not getting triggeredposted in Questions & Answers
It depends so much. Which project is this?
-
RE: How to make buy stop, sell stop scriptposted in General Discussions
Note that "Script" is different that "Expert Advisor". Both are similar, but something is very different - Scripts work once. I'm not sure that you are asking for a Script.
But anyway. I think it's enough to make 2 pending orders. You can find the blocks for that. Note that in these blocks (let's say "Buy pending order") you don't have an option to define the type of the order. The type is automatically decided by the open price. What you need to define is the price at which the order will be opened. By default for Buy order that price is Ask + 20 pips. You can see that Ask is selected and there is 20 in "Price offset". If you change 20 to -20 you will see that the order will be created on the opposite side.
And you have SL and TP options, so you can set that TP of 25 pips.
There is something more interesting. You can use 2 blocks, one for Buy and one for Sell and that's ok. But if you want to close the Sell order when the Buy order is triggered (or to close the Buy when the Sell is triggered), then you can create only one block (let's say Buy pending order) and enable the OCO option. Now this block will create 1 Buy and 1 Sell order, and when one of them is triggered, the other will be deleted automatically.