Hold the mouse over one of these and orange "?" sign will appear on the left side. Click on it.
Best posts made by fxDreema
-
RE: what i can use it ? and when ? options indicatorposted in Questions & Answers
-
RE: i use the no trade and once ber but there problem ?posted in Questions & Answers
Block "Once per bar" can only pass 1 time per bar. You can put this block directly on top level in "on Tick" (which means that the block will run many many times, maybe few times per second) and it will pass only 1 time per bar.
https://fxdreema.com/demo/mt4-once-per-bar
When you use the crossover options in "Condition" (x> and x<), you could have multiple signals (passes of the block) in the same candle, but then after that candle closes all signals stop, at least for the whole next candle. This is because of the way these crossovers are detected, you just can't have crossover detected in one candle and then another crossover on the very next candle.
Again, while in the same candle you will see many many signals (passes of the Condition block), because the crossover detection is made out of 2 simple IF checks, as it is described here: https://fxdreema.com/help/working-with/crossover That's why the "Once per bar" block is normally used before or after this Condition block, as described here: https://fxdreema.com/demo/mt4-once-per-bar
-
RE: About Ask/Bid and custom price levelsposted in Questions & Answers
There are 10s of different objects that can be printed on the chart. The simplest objects - horizontal and vertical lines have only 1 coordinate - price (horizontal line) or time (vertical line). But some objects are made out of 3 points, where each point is one price-time coordinate. So Price level 2 and Price level 3 can only be used for particular objects. And even Price level 1 - there is no reason to use this for vertical line.
Ask and Bid are properties of the price. A horizontal lines are just line placed on particular price.
-
RE: Place 3 Break evenposted in Questions & Answers
In the Trailing stop block try this option http://prntscr.com/el6d4i
-
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: Trailing stop not workingposted in Questions & Answers
The Trailing stop block needs to run on every tick (in most cases, this is not mandatory). Just placing the block somewhere does not guarantee that it will do the job continuously. When I first made this block, it was automatically working all the time. But then I decided that the person should be able to decide when to run this block by placing it under "Hours filter" or other blocks.
-
RE: Can you use Heiken-Ashi candles as normal candles?posted in Questions & Answers
Somewhere in Condition block you can find Heiken-Ashi indicator. This one is listed with the built-in indicators, but uses external .mq4 file (which comes with MetaTrader anyway). I programmed this, because otherwise it's tricky to work with the buffers from this indicator
-
RE: How create 1-2-3 breakout based on Zigzag?posted in Questions & Answers
Well, you can play with the Zig-Zag indicator that is in the list of built-in indicators. This indicator comes with MetaTrader as an example indicator, but long time ago I decided to add some options to it. But to be honest, I have no idea how this indicator should be used

-
RE: important questions about pending order ?posted in Questions & Answers
I'm not sure I understand... Your pending order is placed at some price and then this pending order is triggered on the server, but with the spread at the time.
-
RE: Loop through bucket of tradesposted in Questions & Answers
MQL4 is relatively easy in my opinion and that's why so many people are making EAs and Indicators. Yes, you need to know variables, functions, data types, "if" and "for"... but that's almost everything. Then you only need to go to the MQL4 documentation and see what functions can you use.
Now MQL4 is very much like MQL5, which includes Object Oriented Programming, but for a simple loop this is absolutely not needed. You basically need to do something like this:
for (int pos=0; pos<OrdersTotal(); pos++) { if (OrderSelect(pos, SELECT_BY_POS) == false) continue; // do something here using other functions like OrderLots(), OrderStopLoss(), OrderTicket()... }OrdersTotal() gives you the current count of orders (trades + pending orders). Let's say you have 3 trades.
The next job is to load the first one and do something with it, then load the second one and do basically the same thing with it, and then do the same with the third. This is what this "for" cycle does. "pos" is just a variable, which is 0 in the first iteration, 1 on the second and 2 on the third.
OrderSelect() obviously select an order by position number. You got the position number from "pos". Just imagine that MetaTrader has a database (table) of all orders and they are sorted by time. I think 0 points to the oldest one. So what OrderSelect() does is to select the order from a certain row of the database.
And OrderSelect() is needed, because it "fills" all the other functions with data. For example OrderLots() - this function gives you the lot size of the currently selected order. Remember that you can have many many orders at the same time and that's why you must select one before working with it.
And the row where OrderSelect() is used does something else - if OrderSelect() returns false (which means that for some reason MetaTrader cannot select order with that "pos" number, then the "for" loop would continue (the rows below the word "continue" are skipped).
If for example you see the word "break" in a loop, this means that the loop breaks at that point, or in other word that word sends you outside the loop, it finishes the loop in the middle of the work. This is useful when you don't have anything else to do in the loop and it's better to escape it.
-
RE: Select Object By Name - Several Objectsposted in Questions & Answers
Well, each object has different name and you can't have 2 or more objects with the same name. So if you know one name, you can only get/set information to only 1 particular object, if exists. If you want to do something else over multiple objects, then you need to find those objects.
-
RE: tweet order information on twitterposted in Questions & Answers
I have no idea, I can't find anything about "twitter" in the MQL documantation. I guess it can be done with the help of some other tool which accepts a signal in some form and connects with Twitter. An EA can send notification to a phone or it can send HTTP request to particular web address, but I don't know the rules of Twitter.
-
RE: help for find buffer and mode of xtreme_binary_robot_channelposted in Questions & Answers
You can obviously have indicator without any buffers. This is how its made, you can see that the code is full with "Object..." functions - so it doesn't use buffers, it creates objects on the chart. The normal way is to fill the buffers with data and then from the information in them MetaTrader decides what to draw, but in this case the indicator tells MetaTrader to draw objects.
-
RE: Slow backtestingposted in Questions & Answers
You are asking for strategy tester?
Who will do that and why 
Unfortunately this is true. Indicators are slowing the process and also EAs generated with an EA builder are normally bulk and heavy. But you know, it also depends on the logic itself. To make things faster, try to Not run some blocks all the time if this is not necesarry. This depends on the strategy of course. For example you can put "Once per bar" somewhere where you don't really need something to work on every tick and the result will be the same if it runs once per bar.
EAs are slow on backtesting, because certain functions are running again and again, millions of times. There are many ticks to be backtested, and that's why everything is slow as a whole. But if you imagine that you only have 1 tick, then everything is ultra fast.
-
RE: Timeframe as inputposted in Questions & Answers
For the Constant that is the timeframe, the data type should be ENUM_TIMEFRAMES instead of double. And the default value should be something like PERIOD_H1.
https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes
-
RE: Condition for spreadposted in Questions & Answers
In "Value", where "Numeric" is, there is "Pips" as well. There is this option there to get a value "as price fraction", by which I mean the difference between two prices, exactly what ask-bid is.
-
RE: Trading multiple pairs with 1 chartposted in Questions & Answers
But of course it's a little bit different than having the same EA on different charts. Remember that if you put one EA under say EURUSD, then it only works because of the EURUSD ticks.
Check this block: Set Current Market" for next blocks
