Happy New Year to you! 
Posts made by fxDreema
-
RE: Entry 20 pips over the 14 Moving Average Lineposted in Questions & Answers
-
RE: HOW TO CREATE LOOP FOR FRACTAL INDICATOR EXPERTposted in Questions & Answers
Fractals work, but Candle ID should be... I think it 3 for the default indicator settings. If you watch how it's arrows are formed (use Visual mode), you will see that a new arrow appears above/below older candle, not the current one. This is also true for most arrow-based indicators and it is expected, because they need to wait and see where the price is going before they say that there was a top/bottom few candles in the past. And they put their arrows on that candle in the past, so that's why you must use some positive Candle ID

Otherwise if you want to investigate for example the last 20 candles in order to find the last candle ID where there was an arrow, or the price value at that moment, or something else... well, there is no block for this, but this can be made as a custom code in a custom block.
-
RE: First ea, simple questionposted in Questions & Answers
I can see that you are working under "on Chart". Do you really need that? Actually "on Chart" works only when you run the EA live, it does not work while testing: http://docs.mql4.com/runtime/testing (look at the very bottom of the text here)
Try this under "on Tick". You can also use "Once per bar" block.
-
RE: How to trigger trade checking another trade's pip profitposted in Questions & Answers
I can see your project "Scinni!!!" and there are some things...
- You don't need "Once per tick". This block sounds like something active, but it is only a filter and it is supposed to be used in other situation (when you connect two blocks to it's input). Everything under "on Tick" already runs once per tick.
- You are using "pips away..." with "For each Trade" correctly, but "Close trades" does not need pink blocks in order to work. Blue blocks like "Close trades" contain the whole loop inside, everything is closed inside and these blocks does not care of everything around. Pink blocks are used to create custom loop using multiple blocks.
I guess you want to use the pink block "close" instead of the blue one "Close trades"

Why don't you just close the trade and continue with the trading instead of doing "hedge" and then wondering how to exit from the new situation?
Obviously I don't like this idea of "hedging" very much. There was a time when I believed in it and I tried to save some losing trades, but unfortunately it does not work that way, it's only a way to make the EA much more complex. -
RE: HOW TO CREATE LOOP FOR FRACTAL INDICATOR EXPERTposted in Questions & Answers
What value do you want to get from this loop?
-
RE: Adding sell ordersposted in Questions & Answers
There are different ways to do this, so it depends. Here are some ways:
- The easiest way is to use those blocks that create grid of pending orders - you will see them, I'm sure.
- Another way is like this: https://fxdreema.com/shared/8YhJbEFqb Note the settings in blocks 1 and 3. Here the problem is that "once per trade/order" remembers if a given trade was passed through it, but when you restart the EA it will remember everything. Again, note the setting in block 1, the "Not more than..." parameter, this is important one in this case.
- Another way is with this block called "Round numbers detector", but it snaps to round values, you still need to get TP from the last trade - in a similar way as in the example above if you only use blocks 1 and 4.
-
RE: self updating/refreshing grid, compare two groups of tradesposted in Questions & Answers
The same thing again - loops and "For each..." stuff

When you have 10 apples and you want to eat 1 apple, you must choose one of those 10, right? You must say "I want this big red/yellow apple right there in the middle!". The same thing happens for MetaTrader 4, because you can have as many trades and orders as you want for the same symbol, and for multiple symbols. You can have 10s, 100s, probably 1000s of them. But MetaTrader 4 does not work with all of them in parallel, it can work with only one of them at a time.
The same goes for objects. The only difference is that their unique ID is their name. The unique ID for your trades and orders is their ticket number, which is also unique for the broker. So the same thing goes here - you must choose the object that you want to work with. You can have not only 1 button, you can have tons of buttons. Even when you have 1, you still need to select it.
So in fxDreema there are some categories that contain "For each..." blocks on the top of the list. All blocks below these "For each..." blocks are supposed to work with them. If you want to use "check button state", you should have "For each Object" above.
There is alternative as well, in "Condition" block, in "Object on the chart". You can write the object name there and get that "Button state" attribute as well. I thin the attribute can be either true or false (1 or 0), so you can easily compare it with such a value.
-
RE: Entry 20 pips over the 14 Moving Average Lineposted in Questions & Answers
This is the way. Maybe not the best, but the fastest

-
RE: order managerposted in Questions & Answers
The normal crossover, but add something like +0.0006 in the "Adjust" field on one of both sides
-
RE: Simple question - How to access input parameters?posted in Questions & Answers
You can check these anyway. In Condition go to Value - Numeric (Text, Boolean), right click on the input field and choose a Constant.
-
RE: Simple question - How to access input parameters?posted in Questions & Answers
I don't really recommend to use those checkboxes. They are good if you want to do optimization, otherwise not. I will suggest to use "Constants"

But I don't understand why you want to check these input parameters, because you are the one who decide what their values will be.
-
RE: Closing trades when loss exeeds XX,XXposted in Questions & Answers
This looks like a tutorial

The first thing I notice is that you are using this block "check loss" in not the way that it is supposed to be used. Many people does not understand this concept by the way. This block is designed to work when "For each Trade" or another "For each..." block is placed above it. This block works on a single trade/order, it works for the currently selected trade (by some "For each..." block).
All the other blue blocks - they work on a whole group of trades/orders. They first create a list of all the trades/orders that should be closed, then the actual closing starts - one after another all trades/orders from the list are closed. And this happens within the block.
"check loss" and all the other blocks that have the same color are to be used inside a loop. Here is more about it: https://fxdreema.com/demo/mt4-loop-how-it-works. On this example all the pink block that you see form trailing stop, which otherwise exists as a single block. But using pink blocks is more open, because it's in a lower level.
Block "Check current unrealized profit" first creates a list of trades using all the filters, then for this list it calculates the profit in the way you have selected (money, pips...), and then compares that result to the value you have entered. If the comparison is true - the path to the orange output is taken.
In the last days I answered to a question about this block on e-mail. I will put my answer here just in case:
__You know that this block selects multiple trades, calculates their total/average profit and compares that value to what you have entered in "Profit amount". The first thing that this block does is to select those trades that have specific parameters, all the filter does exactly that. Each trade moves through these filters first and only the ones you need pass. "Filter trades with certain profit" is just some additional filter where you can say that you want only trades with given profit to be used.
Then, after all these filters you have only few trades, and you calculate their current unrealized profit. Well, by default only the Group filter is "on", all the others are optional. The one you ask for is the one where you can say "I know that I have trades here and there, but I want only those that have profit bigger than 10 dollars". Or you may want only those that have profit less than 5 pips. I think you get the idea now [/quote:280de3dp]
-
RE: Binary Options?posted in Questions & Answers
This was already done, now fxDreema is capable of doing that. I used another broker, but I think the rules are the same. The only thing is that I always forget to make a fix to set SL and TP to 0 automatically when working with BO, but everyone can (and probably should) do this manually.
Gabestar, thank you for the help anyway. There is actually no information on the internet of how to create a new BO trade in MetaTrader 4, or at least it was impossible for me to find such weeks ago.
And my small opinion about BO. Well, I only put few trades while working on the compatibility for fxDreema, but I think it's fun to play like this. Unfortunately the "spread" is really big compared to Forex
If the chance to win or lose is 50%, you can lose 100% of the investment or win something like 85% of the investment. The difference between these numbers is quite big if you ask me 
-
RE: EA for exampleposted in Questions & Answers
I can see your projects even without sharing

You need to buy and sell, this is forex after all. The question is when and how much to buy and sell. But there is no one rule for that. Someone may want to trade on each candle. Other may want to trade once a day, when some condition happens. Other may want to buy when conditions reverse. Other may want to have 1 trade all the time.
EAs are working on events. Certain part of the code is executed... sometimes, on a given event. The most important event is the "Tick" event. When a new tick comes, MetaTrader causes this part of the code to run. As you can suggest, all blocks under "on Tick" are running on every tick. Your block 59 is running once for every tick. Blocks below... depending on the block/s above.
Remove that block "AND", it's not needed, it's the same without it.
Your strategy is now like this:
- When a tick is received, check how many trades there are
- If there are 0 trades, check if RSI is above 50, otherwise stop here and wait for the next tick.
- Check if the server time is between 8:00 and 20:00. If not, stop here and wait for the next tick.
- Create Buy trade. That's all.
On the next tick everything will be the same. But when you finally create a new Buy trade, 1) will not pass anymore. When your Buy trade is closed for whatever reason, 1) will pass again.... until you got another Buy trade.
As I already said, if you want to limit the number of trades by time, add some block like "Once per bar" or "Once a day". There are other scenarios as well, this is the most simple.
-
RE: EA for exampleposted in Questions & Answers
You have limited trades by count, so you can't have 2 or more trades at the same time. But nothing limits the creation of trades in time, because your condition RSI > 50 is true probably half of the time while the EA is working. You also use Time filter, which is also true for all ticks between 8:00 and 12:00.
I don't know how exactly you want to limit the number of trades in the time, but try with "Once per bar" block. It matters where it is placed - before the condition or after.
-
RE: My EA with fxdreema not runningposted in Questions & Answers
Do you know how to backtest?
I found a bug when importing custom indicators when color parameters have values like C'255,164,177'. I fixed it now, but your project was giving error messages. I mean... how are you using it if you can't export it?
-
RE: My EA with fxdreema not runningposted in Questions & Answers
Buffers are always "running". Buffers are... let's say the interface between the EA and the indicators. The indicator puts numeric values there and the EA can then read them. In programming language, these are numeric arrays.
There is always some value in all existing buffers. For candle 0, for candle 1... for all candles on the chart. There is a specific value that tells the EA that the indicator is "invisible" and this value is the biggest possible 32 bit numeric value - 2,147,483,647. As a constant in MQL4/MQL5 this is also known as EMPTY_VALUE. If you use the 64 bit MT5 this value is the biggest 64 bit value, but anyway.
If the indicator is like MA or like oscillators, it should have normal price value for all candles. But if the indicator draws arrows, then most of the time it's value is EMPTY_VALUE, and only sometimes it has price values - where the arrows actually appear. Often these arrow-indicators work on some old candle - 1, 2, 3... and for the current candle they aways return EMPTY_VALUE. There are also indicators that draw something on the chart, but does not use their buffers to transfer data to the EA.
If "Indicator tester" shows you the same value all the time and the indicator is arrow-type, then try to set "Candle ID" to 1. To use some buffer in an EA, it must have values that change over time.
