Another thing. When you connect 2 or more blocks in parallen out of some block, they will all be executed. In your case, 49, 55 and 64. The problem is that if you are 60 pips away from the OP, all 3 of them will be true. Because of that these blocks can be connected one after another from their yellow outputs.
Posts made by fxDreema
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
There is no matter how many trades there are, all the rules are the same with 1 or 1000 trades.
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
By the way you can remove "Once per tick" block, everything already happen once per tick when your blocks are under "on Tick". This block has another rare functionality, but in in your case it's just not needed. Also you don't need "AND" blocks if you connect 3 conditions in a row. Now the EA executes all the 3 condition (actually 6), and then asks if all of them are true. If you connect them one after another and the first one is not true -> next will not be executed because there is no need of that. "AND" block is also with rare functionality.
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
I forgot about the blue block...
If there are 2 or more trades at the moment, the blue block does the same thing to all of them (or depending on the filter settings). It has a loop inside that picks each one of them one after another, checks if it match the filter and does what it is supposed to do.
Pink blocks that contain (in loop) - these blocks MUST work with "Start trades loop", "Start pending orders loop" or "Start history trades loop". With one of these 3 blocks you are creating a loop, which picks available trades/orders/history trades one after another, and with "(in loop)" blocks you do certain actions with the picked one.
Let's say you use with trades and there are 2 trades at the moment. You place "Start trades loop", and this block will be self-executed 2 times per tick and it will execute the blocks that follows 2 times. First time for the first trade, second time for the second trade. If there are 100 trades - it will be self-executed 100 times per tick!.
Blue block named "Reduce volume sie of each trade" contains that loop inside. But you sholud not mix the work of this one and the pink blocks.
-
RE: Close percentageposted in Questions & Answers
You can check this: http://fxdreema.com/forum/post/2955
-
RE: EA simple that works by the movement of the price.posted in Questions & Answers
Well, I don't think that Modify or Shrink blocks are working at all in your example, they are just excluded from the project. See the red glowing blocks 6 and 9. If block 6, 9, 13 or 26 is ever executed in this EA, this will be a bug actually. But even if 6 and 9 were not disabled... don't you think that using both Modify and Shrink blocks one after another is not the best logic in the world?
By the way if you think that when a block is red glowing, that means that it is skipped and the next one is executed - no, this is not the situation. Red glowing blocks are disabled with all the blocks that follow.
-
RE: Phantom blocksposted in Questions & Answers
Well, I don't know the situation exacly, but it's not the memory (I mean RAM).
When Constant and Variable is used in a block, It cannot be deleted. If it can be deleted just like that - someone else will ask me why this can happen and why his variables or constants are suddenly gone from some of the blocks...I think there can be a problem because of properties window caching, but I'm not sure (didn't tested that a lot). If you load and close a window, the next times you open it - it is not requested from the server, so everyting stays on the browser html and javascript. Maybe I should disable this caching in the local version, there is not a good reason for this to be used that way in the local one.
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
This depends on many things. You use MT4 or MT5? You must also know that MetaTrader has a parameter called "Lot Step", so if it is 0.01, you can open 0.01, 0.02, 0.03 lots, but not 0.0123, 0.025. So, if you want to close 90% of 0.02 lots, this can't happen just like that - you can close 0.01 or 0.02 lots in this case. If you have 0.1 lots and you want to open 90% of it... it can probably happen.
Closing part of the trade happens by closing the whole trade and then opening another one (in MT4). The new trade is with a new ticket, but stops remain.
There is a block named "(in loop) Close part of volume", but it must be used with "Start trades loop" block. You can study these pink blocks, with them you can create a loop and do many custom things with trades.
This is very basic example, without any conditions: http://fxdreema.com/shared/Xw4BJCPyd
Once per trade block is optional. You can try without it to see what will happen
-
RE: Phantom blocksposted in Questions & Answers
You know that some block parameters can be visible or invisible. When you configure some paraeter and make it invisible, it still exists there with it's last setup. If you add Variable and you hide it, it is still there, and in this case it can think that the Variable is still used.
-
RE: EA simple that works by the movement of the price.posted in Questions & Answers
There is some misunderstood here. But I will explain it again. With the word "shrink" I mean the opposite of "expand". I'm not native english, but I think that similar word for "shrink" is "contraction". It's when something becomes smaller and smaller. This block moves SL only in direction to the OpenPrice, and TP only in direction to the OpenPrice. If you have SL 100 pips and you shrink it with 10 pips, it will become 90 pips. If you have TP 200 pips and you shrink it with 50 pips, it will be 150 pips.
This block does not care where Price Channel is, it only cares where SL and TP are at the moment. To place SL 3 pips below Price Channel, use "Modify" block, not "Shrink", because "Modify" block can put SL/TP on the exact price level you tell. "Shrink" block has only 1 direction -> to the OpenPrice. "Shrink" block takes the current SL/TP prices and moves them from that position with your input pips.
But as you show me this EA... it does not work with "Modify" blocks, it does not work with "Shrink" blocks as well. Because blocks 6 and 9 are disabled, they will not be executed, and because of that blocks 13 and 26 will not be executed as well.
You can check my example that I posted before.
-
RE: EA simple that works by the movement of the price.posted in Questions & Answers
Ok, once again
Shrink block gets the Price Channel value, adds or (subtracts) 3 pips from it, which in the case does not matter because the output value is considered as pips size and it is added (or subtracted) to the current SL level.For example, if you want to manipulate SL of a buy trade:
- Say that Price Channel value is 1.3000
- You remove 3 pips from this value using toDigits(3), and now Price Channel is like 1.2997. Just in case, toDigits(3) is 0.0003.
- 1,2997 is considered as pips size, and it is transformed in digits format inside the Shrink block => 0.00013. Here you can see that your 3 pips are actually lost, because the value is rounded to the 5th sign at best.
- Say that SL of the trade is 1.3010. The block modifies it to 1.30113 (because 1.3010+0.00013=1.30113)
- In the next step it will again move SL with ~1.3 pips
The whole prodedure will be the same if you just use fixed value of 1.3 pips in Shrink block. Any movements of Price Channel indicator does not make significant difference and you are just sliding the trade upwards with 1.3 pips on every new candle.
Is that what happens to your EA and is that what you expect to happen?
-
RE: EA simple that works by the movement of the price.posted in Questions & Answers
Well, if you work with multiple SL-modify mechanisms at the same time over the same trade, I can't save you from multiple and weird SL changes. I didn't changed that Shrink block, so it is the same as months ago. And you can easily see if it's working, for example: http://fxdreema.com/shared/7OAF3VzZc
Shrink block takes the current SL (and/or TP) and makes it smaller with X pips. The amount of pips you defined in one of these formats:
pips format - where "1" means 1 pip
digits format - where "0.0001" means 1 pip if Point format setting is "0.0001", which is the default state.Shrink block does not care of any previous SL and TP states. It just takes the current one and makes it smaller.
So what you must see in the above example is how SL line moves to the open-price line. Try this in low-speed visual mode.
-
RE: Running on Multiple Forex pairsposted in Questions & Answers
I believe you already know about the chat and the Contact (email) form.
There is something called "Magic number". Because you have single pool of trades and orders, if you want to run multiple EAs they must know which trades and orders are theirs. Otherwise it will be like playing soccer with all the players with the same shirts.
So, this "Magic number" is actually a hidden attribute of each trade and order, which helps the EA to identify those created from it, and not bother all the others (if any).
When adding EA created with fxDreema to the chart, there is input parameter called "MagicStart". This is almost Magic number. Here is a little bit more about this topic: http://fxdreema.com/documentation/proje ... d%20groupsBUT if there is no chance to have two trades from the same pair created from different EAs, you don't need Magic number, because the EA can filter it's trades by their pair (aka Symbol, aka Market). Everything depends on the situation. Check in options in blocks like "No trade is running".
If you want to use one and only EA to work with multiple pairs... well, this might be not so good idea, but it also depends.
You can find [Set "Current market" for next blocks] that will do like it says, so this is almost like working with multiple pairs with the same EA. But because that EA is opened at certain pair, and this block will be placed under "on Tick", it will work only when a new tick comes to the pair where the EA is placed.By the way, MT4 tester is not capable to backtest on pair different that the chosen one.
-
RE: EA simple that works by the movement of the price.posted in Questions & Answers
The problem is not in toDigits. This function transforms only the value that is inside the function (which is SLPipsDistPriceChannel), but it does not make anything over the value of the indicator, which is some price level value (similar to 1.31034) and such a value is just not suitable for Shrink block. Or you really want to shrink the current SL with about 1.3 pips on every new candle?
-
RE: Help To Build My EAposted in Questions & Answers
For the system above. Is there some formula behind those numbers or they are imagined by you? If lot sizes, dropping pips and TP pips are totally custom, the whole thing will take many blocks, but if there is a formula behind those numbers, it can be done with minimum blocks (and better control).
Why 7.9 pips, not 8 pips? There must be something behind that...In any case, there are two blocks to put multiple pending orders at once with different parameters. Their lot sizes, distance from each other, SL and TP can be non-linear, so this is maybe the best and easiest approach to do everything. At least to see if everything works. What is also good in pending orders is that they work automatically on the server.
Maybe the reason why you want to not use pending orders is that you don't want your broker to see how your EA works. Maybe I should also create virtual pending orders system. But in fact, I think that the broker, if he wants to, can cause much more damage on your trades.For example, these days a friend of mine losed tousands of dollars because of 5-minutes problems with the server. The EA was confused of what to do. But if something wrong happens on your EA... well, from the broker's point, this is your fault. But if the whole system is located in their server in form of pending orders and if something went wrong - this is clearly their fault. Each pending order is like a micro-EA working on their server.
So, can you imagine the system described above with pending orders?
-
RE: Help To Build My EAposted in Questions & Answers
I saw your current project and you are following the same mistake that many people does - connecting everything in a row, hoping that events will happen that way. But this is not a web script that (execute once and forget), this is a program that works in time.
And when a program works in time, it works on an events principle. There is a main cycle that repeats everything again and again and again... In desktop programs there are many hidden cycles everywhere. For a program, just to detect that you clicked on a button, the program loops into infinite cycle asking "clicked? clicked? clicked? clicked?...". This happens with high frequency, but you cannot see it.
In MetaTrader there is no need to ask for something with high frequency, it's enough for that to happen on every new tick, because ticks are causing changes. So when you look at the top of fxDreema, you will see one orange button called "on Tick". Which basically means that everything below it is executed on every tick. It's not just "run and forget". The blocks itself are not designed to enter in their own independent cycles, and there is no need to do that.
This is the case with EAs. Scripts are "execute once and forget", but I don't think you are trying to make a script. -
RE: EA simple that works by the movement of the price.posted in Questions & Answers
I'm almost sure that you want to do this: http://fxdreema.com/shared/f8fXi5QNb
-
RE: Close all trades on Friday before market closeposted in Questions & Answers
Well, there is no special block that can do everything, maybe I should create one, but for now you can use available time filters. Weekday filter, then hours filter... this should work.
