Maybe it helps to use MathFloor in combination with the DoubleToString?
Posts made by roar
-
RE: Bug with DoubleToStringposted in Bug Reports
-
RE: Flags switching valueposted in Questions & Answers
@seb-0 I've never used flags, they are not necessary if you use variables.
Just make some (boolean) variables and set their values to TRUE/FALSE (or 1/0) according the logic. -
RE: put a pending order on object after x pipsposted in Questions & Answers
Glad it works for you!
@fabien-s said in put a pending order on object after x pips:
Why do we need this block when firstlevel starts with 0
This is just because I wanted a simple example with fixed grid.
The EA checks if firstlevel has ever been modified, if not, it modifies it 1 time and then always uses the same value for ever after.A proper EA will need some new way to calculate the firstlevel as price moves on.
-
RE: put a pending order on object after x pipsposted in Questions & Answers
@fabien-s Great! It may be a bit over-complicated, just made it in a fly..
Note that I use adjust-field a lot, and I convert the raw values to pips:

If there's any particular section that needs more explanation, just ask!
-
RE: put a pending order on object after x pipsposted in Questions & Answers
This will refill the levels without using any objects (they are always a mess):
https://fxdreema.com/shared/xtZo20GheHow it works:
- first establish firstlevel variable, this is the lowest level in the grid
- then check if price has moved below firstlevel and there are less than maximum number of orders
- then make a loop that goes through every grid level
- if the EA finds an order at the grid level, it moves on to next level
- if an order is missing from a level, new pending order is placed there
This is just a template that uses fixed firstlevel parameter, you will need to modify it to fit your system.
Constants and variables:


-
RE: Fxdreema (lack of) Customer careposted in General Discussions
Yes, the advertising might paint a bit too rosey picture, and yes there could be more extensive help material and tutorials. The tutorials-section is a great place to share knowledge, but unfortunately it seems to be flooded with help requests, which is not a place for them. Couple of moderators would be great for the forum.
Most of the questions are very basic stuff made by novices that have used the demo builder for 10 minutes. It is simply not worth it to provide costly support for such. It's a sad reality of a niche business like this. Hiring some support staff would potentially result in higher sales, but it is a huge risk as well.
Fxdreema projects, even fairly advanced ones, do not require coding knowledge. They do require a very high degree of logical thinking and patience. Making success in the world's most competitive markets can never be easy and everyone can't be winners, no matter how good the support is. That's just my opinion.
-
RE: Help need in Simple MA EAposted in Questions & Answers

Dotted red: 144-MA
Red lines: envelopes of 144-MA with 0.1 deviation
Blue: 5-MA
Green: 13-MARule: Open buy when blue is below lower envelope AND crosses above green.
Project: https://fxdreema.com/shared/WKQyhyvecThis is not a good trading strategy, though.
I can tell that you don't actually want to specify a distance between moving averages - what you actually want is to find volatility. This is done via RSI or some combination of ATR and standard deviation, for example. -
RE: pending order count/ delete pending orderposted in Questions & Answers
@sli1-0 Here's one problem:

This adds a whole number - in case of EURUSD, that means something like price 2.10305
Try using "+1 pips" in the adjust. Maybe that breaks the system -
RE: pending order count/ delete pending orderposted in Questions & Answers
Expiry: you can't use the blue block, that deletes all orders. Try using the pink "close" block instead of it.
Count:
What are you trying to do here? Currently the logic is as follows:
If there are 2 or more orders -> activate ORANGE
If there are 0 or 1 orders -> activate YELLOW -
RE: Generate a random chartposted in General Discussions
@cpxiom I have the same methodology - money management shouldn't be the critical part, trading logic comes first!
-
RE: Problem with spread can someone help me ??posted in Questions & Answers
@venum I don't see anything wrong with it
-
RE: Problem with spread can someone help me ??posted in Questions & Answers
@venum 130 pips in forex is huge. How do you know it doesn't work?
-
RE: I need help with my Grid EA please!posted in Questions & Answers
@ggtrader welcome!

As you can see, the position-increasing logic flow doesn't contain any condition for bear candles - you must add it there as well.
It opens 2 orders at a time, because "add to volume" does the first and "sell now" does the second. Remove one of those blocks.I'm too lazy to make corrected project, you seem a smart guy and probably will succeed!
-
RE: Help need in Simple MA EAposted in Questions & Answers
@vishaal Hi!
Try using the envelopes indicator in combination with the cross condition, so you can visually see the restriction.
-
RE: Generate a random chartposted in General Discussions
I revisited this project today, and noticed there were some stupid logical mistakes in the data manipulation..
Made a better one! In this dataset on EURUSD 2009-2019 M1 OHLC candles,
every 2nd one-minute candle is flipped upside down. All gaps are removed. As a result, the weekly chart starts quickly deviating from real EURUSD. Backtest reports 98% accuracy.
Because significant m1 candle moves don't occur in binary fashion (0,1,0,1...), the resulting price movement is pseudorandom.Why use this? If my EA works well in both real EURUSD and this modified one, it is a bad signal - my EA probably just exploits some flaw in the backtester.
Import M1 OHLC bars: https://drive.google.com/open?id=1SuxvO2sjLPu0dVnwyVfauG2azC7r0cV8


-
RE: Create Martingale effect without closing tradesposted in Questions & Answers
@specialfx
Single is not a valid data type.
Try Double for decimal numbers,
Int for integer numbers -
RE: MQL5 Files cannot be compiled anymore/impossibile to make some custom indicator workposted in Bug Reports
Ok, I'm sorry, can't spot where the problem is. Here's the mql5 documentation, maybe it helps:
https://www.mql5.com/en/docs/trading/ordercalcmargin -
RE: Testing out Swap, can't get it to workposted in Questions & Answers
Did you try my example in visual mode? It works for me.

I'm not sure how the "Alert message" block works, but you may be using it wrong - put your variables in the data rows.
-
RE: MQL5 Files cannot be compiled anymore/impossibile to make some custom indicator workposted in Bug Reports
The Ask-function is case-sensitive: try exactly Ask(Symbol())
-
RE: MQL5 Files cannot be compiled anymore/impossibile to make some custom indicator workposted in Bug Reports
@gabrielebrignoli Try modifying the .mq5 as per my suggestion, and test if it compiles