I don't know how to use previous indicator's data in MQL4
Posts made by fxDreema
-
RE: How to formula (MA X > MA Y price applied (previos indicator's data - [MA X])posted in Questions & Answers
-
RE: price is close to support or resistance before tradingposted in Questions & Answers
Because you are working with objects, it's also important that they exist and they can be loaded. Are you sure that you can get their levels correctly? Hint - visualize these values with Trace or Comment blocks.
-
RE: Backtestingposted in Questions & Answers
@luisri said in Backtesting:
Cuando hago Backtesting, el MT5 se me queda atascado, se para y no continua, He reinstalado y me lo sigue haciendo, alguna solución ?
Do you have error messages?
If not, and the CPU goes to 100%, this tells me that there is an infinite loop somewhere. But if this loop is not in your project, it should be somewhere in the code, which is possible in MQL5 (I know I used such loops somewhere). Do you have an idea which block causes that?
-
RE: Indicator moves within limits BBposted in Questions & Answers
crossing BB below of upper - what does that mean?
Otherwise imagine that this block checks whether your value (whatever you select on the top) is between the other 2 values - the upper and the lower. And this is done for each candle of the range of candles.
-
RE: compileposted in Questions & Answers
I see only 1 project now in your projects, but it compiles, I don't see problems. You fixed it or it only works for me?
-
RE: HOW CONVERT FROM mq5 TO mq4 BY FXDREEMA?posted in Questions & Answers
@josecortesllobat said in HOW CONVERT FROM mq5 TO mq4 BY FXDREEMA?:
No, don't do that. This converter is for internet experts. Blocks can be copied between projects, and there is also another trick. Download the file as .mq5, rename the extension to .mq4 and import it. I will not guarantee that this will work forever, but at the moment I think it works.
-
RE: ATR related lot size?posted in Questions & Answers
By the way, there is one undocumented thing you can do in Adjust. Normally we start with +, -, * or / and the things we write in this field are put somewhere in the code after the value. For example, let's say the value is called ATR. Then we write + 0.1. At the end we have something like this:
ATR = ATR + 0.1...where the ATR = ATR part is outside our reach, only the + 0.1 part is added.
One day I added new functionality. Let's write = $ + 0.1. Then the result will be the same:
ATR = ATR + 0.1but now we control the whole = ATR + 0.1 part. The dollar symbol is replaced with the variable that represents the indicator or whatever it is. In my example this is ATR. But let's make it different. Let's write = 2 * $ in Adjust. Then we will have something like this:
ATR = 2 * ATRSome example here: https://fxdreema.com/shared/UNvVIVJJ
The important thing here is to start with =. Some people doesn't even write + or - or whatever. By default, if the contents in Adjust doesn't start with +, -, *, / or =, then + is used.
-
RE: How to make ADJUST field as an optimization input?posted in Questions & Answers
The Adjust field is MQL4/MQL5 code, it is not one single variable. But if you have some Constant, which is actually an input parameter of the EA and can be used for optimization, you can just write the name of the constant in Adjust. Something like this:
- MyConstant
or evven...
- MyConstant pips
-
RE: How to make SL or TP after X hours?posted in Questions & Answers
Or this:

But for this to work, the EA should work. It's not exactly like the pending orders, where you can set expiration, turn off the PC and wait for the pending order to be deleted automatically. -
RE: How to buy/sell/tp/sl at a main price level like 1.13, 1.14 ... etc?posted in Questions & Answers
If you open at round prices, then SL and TP can be placed at almost round prices also. But if in any case you want to use exact round price, it can be calculated. Try this for example: https://fxdreema.com/shared/b8l8pXC4e
Sometimes the SL can be placed too close to the trade, but I want to show how to round the price, which is pure math. So I have this formula:
MathFloor(Ask * 100) / 100Here Ask is Ask, this is a predefined variable that MetaTrader changes on every tick, so its value is the current Ask. MathFloor is described here: https://www.mql5.com/en/docs/math/mathfloor Also look at MathCeil().
Let's say that Ask is 1.2345. Then Ask * 100 is 123.45. After MathFloor() it becomes 123.00. Then we divide by 100 and at the end we have 1.2300.
-
RE: Using Supertrend Indicatorposted in Questions & Answers
You work in the desktop version? Because I can't see your projects for some reason
-
RE: A simple EA questionposted in Questions & Answers
Every "Once per..." block is checked on every tick if you place it on top level under "on Tick". In other words, such block will check if it is allowed to pass or not every time it runs. And it will pass 1 time in its period. "Once per bar" for example, when it runs, it can recognize if the current candle is new for it and will pass is this is true, then until the candle is the same it will not pass again.
-
RE: Builder does not openposted in Bug Reports
There is some new bug that I don't know why it happens. How did you created the last project, from New Project?
-
RE: Envelopes indicator doesn't work on MT5posted in Bug Reports
I can't detect the problem now. Here is some simple example - https://fxdreema.com/shared/5aiiXHbKc This is the result of it for me:

I see these green and yellow lines where I want them to see them. How this works for you, do you have one line over "Upper line" and another over "Lower line" of the indicator, or both, the yellow and the green lines are both on the lower side?
-
RE: "Renko Style" EA with trailling Stop, without indicator.posted in Questions & Answers
If you are depressive, I don't think the place for you is in Forex. We all know the reality - most people lose money in Forex. This is brutal speculation where you have no control on the price. And when we add margin, eventually you will only sit and pray for the price to go back in your favor.
-
RE: A simple EA questionposted in Questions & Answers
Hedging or netting - this is one small check when you make a new account in MT5.
"Once a day" means that the block can pass max 1 times in a day. You see that it has some settings inside to choose the hour - it's more like a period of 1 particular minute in which the block is allowed to pass once. With default settings if you have this block on the top (and under the "on Tick" event of course) it will pass once in 00:00 every day. Well, on the first tick of the day, which is normally at 00:00.
-
RE: Using Supertrend Indicatorposted in Questions & Answers
But why it doesn't work, you have error messages?
-
RE: Is FXdreema a SCAMposted in Questions & Answers
Wow, you sent 15 emails to me. For a Bitcoin holder you are not really patient. I'm not even that late, it's just about 1 day. it looks that we are at least in the Anger stage of the market cycle:


