And what is the lot size and profit of the previously closed trade? Martingale should only get information from trades, not pending orders. Expired pending order is basically nothing.
Posts made by fxDreema
-
RE: bug on buy/sell pending orderposted in Bug Reports
-
RE: Too much Warning!posted in Bug Reports
You can define those timeframe constants with data type ENUM_TIMEFRAMES and instead of values such as 60 and 15, you can use PERIOD_H1 and PERIOD_15. Plus, in the properties of the EA this parameter will appear in a better way, you will see
-
RE: Time Filtersposted in Questions & Answers
I guess that people have hard times understanding what Magic Number is used for, and it was hard for me too, but there is a good reason for it to exists. You have only one "pool" of trades and orders, but you are also able to put not one, but many EAs at the same time + to create trades manually. This number is used to separate trades. Each EA should work with it's own trades and not touch others.
Magic Number is not mandatory, but by default in fxDreema this thing is set (via MagicStart). If it wasn't that way, I believe that every 3rd question to me would be something like "What happened to my trades? I added this EA and everything was closed, everything! I don't want that!"
-
RE: comments text sizesposted in Questions & Answers
But what is wrong with the way it is now? I just tried it with font size 19 and it looks very nice. It's a little bigger because it is something like a title, but not too big.
-
RE: NOTHING working on .EX5posted in Questions & Answers
I still don't understand what you are trying to do, at least I can't recoglize the idea looking at your project, but here is something from me.
3 in 1
- Comment in the upper left corner - Equity price that is stored at the first moments of every new day
- Comment in the upper right corner - The total profit (in $) of al trades closed after 00:00 at the current day. In the moment of the screenshot the value is 50, because 2 trades (with TP = 25 pips) were closed at profit.
- In the middle you can see the Open Price of the latest running trade with continuous blue line. And also the equity value of 1), but as vertical lines and text labels.
https://fxdreema.com/shared/TyXlLl6Db
http://prntscr.com/ada3jq
http://i.imgur.com/xOxERGl.png -
RE: Turing Off EA after set $/Pips madeposted in Questions & Answers
And what happens when I see problems in people's projects unrelated to their question...
http://prntscr.com/ad9ufw
http://i.imgur.com/sKHP9yX.pngYou just wrote that Terminal Variables are NOT to be used, and this is true. That's why I added this warning This is NOT for Variables. Terminal Variables are to be used in other situation and here is more about them:
https://fxdreema.com/help/-/working%20w ... 0variablesVariables should be places in Value -> Numeric (or String, or whatever...)
Another issue. Blocks 6 and 30. Connected this way, block 6 runs before block 30. The same goes with all the other "parallel" connections. Just make sure that everything is connected properly. Connect blocks one after another when possible, this is how you can be sure that one things really follows another.
Now what was the question...
-
RE: Turing Off EA after set $/Pips madeposted in Questions & Answers
Pipologist, this is absolutely true for me, sometimes I don't understand people or I understand them wrong
I guess that something is now wrong with me after few years of programming and answering (mostly the same) questions over and over again. I prefer short and direct questions instead of long long stories. When I read long stories, everything I am thinking is "This person should try to write this in 1 short sentence... or in code :D". Also, english is not native for me and very often I completely don't understand what people want to say. Sorry about these things 
Then, when I respond to one question, in only few minutes I will completely forget what was the problem of that person. I don't know if you can see, but now when I enter the forum I have to answer to about 10 questions of 10 different people. Plus some questions in the email. And sometimes I got personal messages here. I guess I started to give failures already

-
RE: Trade depending the last candleposted in Questions & Answers
If needed, there is another pink block called "once per trade/order". It's useful when something should be done only once for a given trade/order. Again, Counter: Pass once is something global, this block does not care of trades and does not even know that they exist, it's just not to be used for your situation.
But I think that Once per bar should be enough, especially if it stands right there on the top. This block by itself makes everything to happen 1 time per bar and there is no need to use something else for this. Just check the candle type and the current price vs last trade price. I think this is what you need, but remove 25 and 39.
-
RE: Trailing Stop at Only Order.posted in Questions & Answers
It's easy to make Trailing Stop to move TP, look at "Trail what?". But this block does not ask the trade if it already has SL/TP or not. If the trade does not have stop, it is automatically created. It would be interesting option to be added to this block, but now it doesn't exists, so I will suppose to use the Group to separate those trades from the others
-
RE: Time Filtersposted in Questions & Answers
Pass is not switch, this block does nothing, it just passes. By "pass" I mean that the orange output becomes active and the blocks connected to it are caused to run. So this block does nothing inside, but it's useful sometimes.
This: https://fxdreema.com/shared/1KmucIQM
gives me this: http://prntscr.com/ad9g3c
http://i.imgur.com/54159mY.pngI think you are working with the desktop version, but I don't expect problems in these block in either version. Note that the desktop version is now 1/2 year old and I don't remember reports about these blocks. Make sure that your trade/order has the same Group number, which is empty (or 0). Or, if you work with manually created trades/orders, set that Group parameter to "All..." or in the projects settings set Magic Start to 0. Manual trades/orders have magic number of 0 and here is the link between MagicStart, Group and the magic number - https://fxdreema.com/help/-/working%20w ... d%20groups
-
RE: NOTHING working on .EX5posted in Questions & Answers
Trailing Step is for the frequency of SL modifications. If this is 1 pip, then the price needs to move at least 1 pip and then SL is moved at Trailing Stop pips behind the current price. And by default the current price is Ask for buys and Bid for sells.
So, relative to SL, the current price must be at distance at least TrailingStop + TrailingStep from SL and then SL is put at TrailingStop distance from the current price.
-
RE: NOTHING working on .EX5posted in Questions & Answers
I used some custom code turn PERIOD_CURRENT into seconds and obviously in some specific situations it produced some errors. But now I found one native function PeriodSeconds(), which is probably new, and I replaced my code with this function. All this is needed when I want to finc candle by time - if you input 00:00 to find which candle stands around this time. But with your Options where most of the data is missing, I don't know how can you do that. Even if the closest candle is get, it's totally wrong. And I guess MetaTrader also don't know what to do, because when I don't see "zero divide" errors, I see nothing at all, like MetaTrader just hangs. What can I say, when you want to work with specific times of the day when most of the days there is not even a single candle... I can't see how this can ever work.
Unsigned int it integer, it's a whole number in any case. There are weird transformations when you work with with double and float, but when you put everything in integer, everything behind the dot is lost. What maters is how it's lost and I will suppose to check that value with "Comment" or something like that. I'm also confused with all these data types

-
RE: Check Profit > Close Trade - What am I doing wrong.posted in Questions & Answers
But this EA makes new trade on every tick. What is this, it doesn't look as it should be... Look at what I got:
http://prntscr.com/ad8xg2
http://i.imgur.com/oPYLE85.pngThese "AND" blocks are not needed there.
-
RE: comments text sizesposted in Questions & Answers
Yes, but I don't want to fill blocks with tons of options

-
RE: Indicator code mod helpposted in Questions & Answers
Comment is just a function in MQL4/MQL5 to print some info on the chart. I don't even know if this text can be read from the chart, but it would be stupid anyway.
There is a way to work with indicators, and this way is by reading their buffers. Here is more:
https://fxdreema.com/help/-/you%20shoul ... indicators
https://fxdreema.com/help/-/working%20w ... indicatorsYour indicator has only 1 buffer and it's name in the code is ExtMapBuffer1. It gives you information about this thisng iprice, whatever it is. But the indicator is pretty simple, so I guess you can add another buffers to output more information.
-
RE: How to test if Candleβs open/close straddles a horizontal Trend Line.posted in Questions & Answers
Go here https://fxdreema.com/examples/ and find those examples whose names start with "Get chart object's attribute...".
Note that you can only have 1 object with name "Buy line", because what makes objects unique is their name, they are indexed by their name.
-
RE: Help, the condition 6 does not worksposted in Bug Reports
Please, take a look at some examples here - https://fxdreema.com/examples/ This is more like tutorial, because those examples are some of the basics + explanation of what is going on.
Especially look at these - "Wrong: Closing rule" and "Custom loop: How it works (with "For each Trade")"
Lately I actually added a new option to make a block wait, for this you can look at the last example.
-
RE: Trade depending the last candleposted in Questions & Answers
Well, in my example each Sell will be above the previous one, only because I check if the previous candle is bull.
But you can get any parameter of the latest trade. Just use "For each Trade" with "Not more than N trades" set to 1, and then after this block you can use all the other pink block or "(in loop)...." in "Condition
-
RE: Indicator code mod helpposted in Questions & Answers
Comment() prints information in the upper left angle, but it doesn't have any options to make it look different. I don't recognize this code, you are probably trying to learn MQL4 or something. You can look at the documentation for ObjectCreate() - this function can draw many types of objects, including OBJ_LABEL - https://www.mql5.com/en/docs/constants/ ... /obj_label
Or, if you work with fxDreema, there is a block "Comment" that print the information using labels.
-
RE: WHY IS THIS TRIGGERING?posted in Questions & Answers
That is true, but you can manually add them to the chart. I don't know how to tell MT4 to draw indicators and I don't know if that is even possible, but again, they can be manually added