Try using long datatype

Best posts made by roar
-
RE: WHAT A WONDERFUL SURPRISE!!!posted in General Discussions
@ambrogio lol

Well, he created the software 10 years ago, its understandable if he doesn't want to be on the forum all day anymore. Especially when most of the questions can be answered with the detailed instructions he has already written long time ago
https://fxdreema.com/instructions -
RE: Scam alert...!!!posted in General Discussions
I don't really want to get involved in this dispute, but in general you should avoid these kind of risk graphs - bad trades are solved by increasing the lot size:

-
RE: struct member undefinedposted in Questions & Answers
@bluemoon This bug happens when you insert a variable to some field (so it turns blue), but the builder doesn't actually register it as a variable (for some reason, maybe there was already some value in the field).
Solution: as Philipps said, go to your metaeditor and find the corresponding block ID -> then return to the builder and re-create that block.
-
RE: Optimization and Backtestingposted in General Discussions
Tick data can be expected to take 10x more time...
Fxdreema projects are inherently slower, but there are some performance optimization you can do:- move the "once per bar" to the top of your flow
- dont use the yellow (false) output of the "once per bar" I think its just a mistake in your project
- "close positions" block is known to cause infinite loops, see here: https://fxdreema.com/forum/topic/16494/close-positions-when-market-is-closed
-
RE: BE lets me go crazy - i really need help after watching every tutorial and x hoursposted in Questions & Answers
@tom-5 If you turn off block 85, everything below it will also be off, because the signal never reaches the below blocks.
Your problem is easier solved with a simple variable, look them up

-
RE: We need to have an in-built News Filter...It is high time we have this MT4 and MT5posted in General Discussions
News filters dont make much sense to me, for a couple reasons:
- Some times the biggest news will come out of the blue, not in any calendar
- Very often the "high impact" news dont cause much impact at all, except NFP and FOMC
- You cannot backtest with news filter, so developing a good EA becomes impossible
- Using a simple volatility filter gives some of the benefits of a news filter, and you can backtest it
-
RE: Help needed in modifying values in a sequenceposted in Questions & Answers
@rafaels919 Hi!
That's right, my approach is to convert the sequence string to an int array (because you can't use a string in any calculation). This converting is done in the "on Init" tab.
- What is the Variable "seq[]" used for?
This is a special kind of variable: an array. Arrays dont store just one value, but multiple values - like a list, or a table.
In MQL, array indexing starts from 0, so the first value of your sequence is seq[0] = 1,
if the original sequence string was "1,2,3,4,5,6".
Last value would be seq[5].
^ This part is for resetting the sequence, in case we go to a 7th loss (and the array doesn't have a value for that). "seqLen" is the size of the array, and because arrays start from 0, the actual last index in the array is seqLen - 1.I admit, this is very confusing setup, lol. But you don't necessarily need to know every detail, just know that you can modify the loses variable to set the sequence to whatever value you like.
If you want revert to 2nd sequence value, modify variable loses to 1.
For 3rd sequence value, modify variable loses to 2. -
RE: Poor countries, poor peopleposted in General Discussions
What an interesting thread, couldn't agree more with the admin.
-
RE: Betting System: Fibonacci first lotsize base on balance, is it possible?posted in Questions & Answers
@tom-5 To use 0.1 lots for every 1000$ in balance, put this string into the initial volume field:
AccountBalance()/1000*0.1
-
RE: Backtesting, lets talk about it!posted in General Discussions
@seb-0 I agree, I've thought about this effect many times myself... In essence, if your TP (or trailing SL) triggers at such a price point where the tester doesnt have data, you get extra profit all the way to the nearest available price point.
The effect is negligible if you trade big timeframes, or check your triggers on candle close only (in this case "open prices only" testing mode is perfectly fine to use), but it will cause serious problems when you make your trading actions on every tick and small scale, especially with trailing stop.
Naturally, 99% of those glorious mql5.com Market EAs abuse the heck out of this.
-
RE: How to validate and reset conditions?posted in Questions & Answers
Here's an example how to create such "time windows":
https://fxdreema.com/shared/Oyixkzrod- Create a variable that increases a count on every new bar (1,2,3,4,5....)
- When 1st condition passes, reset that count back to 0
- Now 2nd condition must pass before that condition gets bigger than 6 again
-
RE: Backtesting, lets talk about it!posted in General Discussions
Actually, I think the issue is a bit more nuanced than simply taking the closest available data point. Lets say the SL and TP are both inside the H and L of a history candle. Now the tester has to decide, did the trade hit TP before it hit SL, because they both were possible with certain intra-candle movement patterns. Now, I think the tester favors the profitable side there as well - it always acts like TP was hit before SL.
-
RE: candle idposted in Questions & Answers
how does the candle id work
Current candle is candle ID 0
Last completed candle is ID 12 candles back = candle id 2
4 candles back = candle id 42 candles into the future = candle id -2
4 candles id into the future = candle id -4 -
RE: about block numberposted in Questions & Answers
Block IDs set the procedure when one block triggers multiple blocks.
This setup will have an SL:

This setup will NOT have any SL:

However, I don't bother fixing the block IDs in my projects, as I constantly copy and rearrange multiple blocks. A somewhat clearer way is to take the "Loop (pass n times)" block and set the looping cycle 1. This block will now set the procedure regardless of the block IDs.
This setup will have SL:

-
RE: Poor countries, poor peopleposted in General Discussions
Alright, maybe its a mistake for me to throw my opinions and talk off topic, but well this is the general section and it feels wrong to stay silent, so here goes:
In Iran, another young girl has been beaten to death, by authorities, for not wearing her hat properly. For such a country, being called poor is the absolute least of problems. This truly makes me sick.
-
RE: Day of month filterposted in Questions & Answers
@nmbruno mql4 documentation is often helpful

https://docs.mql4.com/dateandtime/monthPut Month() into a variable once a week (once a bar, period 1W) and when Month() is != than that variable, new month must have been started