I guess you are talking for the "Indicator appear" block, but I don't recognize this code. From where did you get this code? If it's from the indicator... I can suggest to try it with "Trace" first, so you are sure that the output buffers are giving you good values.
Posts made by fxDreema
-
RE: Having a problem with buffer on indicator appearposted in Questions & Answers
-
RE: Comparing last order close time to amount of closed candles since order was closedposted in Questions & Answers
If you want to check how old is some trade, using pink blocks, there is a block "check age" which can be used and it feels more naturally.
If you want to create input parameter for the EA where you can select different timeframes, you can make it with data type ENUM_TIMEFRAMES. As a default value you can have PERIOD_M15, which is a predefind constant. Here is more info: https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes
-
RE: How to implement Fill Or Kill (FOK)?Close all trades if trade x is closed?posted in Questions & Answers
If you want to close group 1 when you have 0 trades from group 2, I think this is easy - just put "No trade" (for group 2) and "Close trades" (for group 1) after that.
If your logic is something else, you can also try it in "on Trade" - there you can detect when a trade was closed (as an event) and do something when that happens.
-
RE: Disconnecting lines between conditions, or blocks.posted in Questions & Answers
Maybe it's this one, I'm not sure: http://prntscr.com/h3m42z Or try to close the browser, or clear the cache
-
RE: Copy and Paste for Additional EAposted in Questions & Answers
Yes, you can save the project as .mq4/.mq5 and then import it back into the EA builder - a new project will be created.
-
RE: Simple EAposted in Questions & Answers
I guess that this is some custom indicator. Colors in indicators in general does not matter. What matters is their output buffers. Or, if you can't get anything from them, maybe you can get something from the objects that the indicator prints on the chart (if it does that of course).
-
RE: Area background colour change?posted in Questions & Answers
Not at the moment, but it's a good idea

-
RE: its not opening sell tradeposted in Questions & Answers
Yes, on the right side of each block there is a value that is something like 10 (for 10 pips), nothing like the kind of value on the left side that is like 1.2345.
I don't like the way you connected those 2 Condition blocks. Now you have 2 paths to reach the "Buy now" block. It's the same for the Sell part. If for some reason both Condition blocks can be true at the same time, you will get 2 Buy trades.
As a general rule, if you think that you want to detect 2 crossovers, just turn one of them into < or >. Because if two lines (or whatever values) crossed somewhere in the past, now at this moment one of them is bigger than the other and by that you can tell that they crossed.
-
RE: how can i make Hedge ?posted in Questions & Answers
There is a way to get the total lot size of all buys and use it (with a Bucket block), but I will start to call the Hedge idea scam. I really dislike this kind of strategies, because they are nothing more than overly complicated way to do something like Martingale. It's much better to just close all trades instead of opening the same opposite position thinking that you magically returned all the loss. So my recommendation is to forget about this idea.
-
RE: Normalize ID's cause deletion of all blocks with custom IDposted in Bug Reports
Oh, I see. I will try to fix that. But anyone, remember that in any situatuion, if something on the project looks bad, there is History button in the upper right corner so you can go 1 or more steps in the past

-
RE: Turn ON/OFF blocks with connections-links (not numbers)posted in Questions & Answers
Let's say that you turned off some blocks in the project and they are glowing red. Now in the output code, somewhere in OnInit() those blocks are marked as disabled blocks. Which means that their code exists, but when they are called and their __disabled parameter is checked and its value is true, their code is simply not executed.
With these ON/OFF blocks you can basically affect this __disabled parameter for each block. What you need is the id of the block. And in this case I recommend to give some id that is not numeric. Yes, block numbers can be... not numbers
Try with some short word that means something to you.I see many AND and OR blocks in your project. Those AND blocks are not needed, I think it's much better idea to connect 2 blocks one after another instead of using AND.
-
RE: OrderModify error 130posted in Questions & Answers
But I have checks like these in the code above, even more, so if the SL level is less than the required, it is automatically changed to the minimum that is required
But I think the problem happens because until the request travels to the server, sometimes all the numbers become different (and wrong) -
RE: OrderModify error 130posted in Questions & Answers
it calculates the stop level of the broker... just before sending the request. But the actual prices could change while the request travels to the broker, so when the request finally arrives there (let's say 200 ms later), the requested SL is already invalid.
Unfortunately in the request we specify SL and TP as absolute values, not as relative. We send values such as 1.2345, not for example 0.0010 (for 10 pips relative to the current Ask/Bid price that is on the broker). So, because of that the EA can say one price, but until this price goes to the broker, the price is already different.
-
RE: OrderModify error 130posted in Questions & Answers
I added various checks here and there, so the EA would attempt to automatically move SL or TP to the nearest possible levels before the request is sent to the server. But while the request is sending, the price moves and suddenly the SL or TP level that is sent looks invalid. This is what I think the problem is. I guess that the problem happens only sometimes, and other times everything is fine.
-
RE: Trade is disabled (133) error with binary options EA's that used to work fine in the past...posted in Questions & Answers
Not even a single trade? I remember such problems when I was adding this ability to trade on BO brokers back then. Can you really say for sure that 1 EA works fine every time while the other EA doesn't work and always gives you that error? Because I am thinking that it might be some temporary problem on the server.
-
RE: retriving the project i have been working on after a browser restartposted in Questions & Answers
I can see your projects, you have 2 total. I don't know what browser you have, but I recommend Chrome... also there is a plugin for easy download for Chrome, so...
-
RE: how to make the trade not close in the same candle as the buyposted in Questions & Answers
"Once per bar" maybe? https://fxdreema.com/demo/mt4-once-per-bar I'm not sure that I understand the question...
-
RE: c:: prepended to custom code variablesposted in Questions & Answers
So, I found a problem that happens only to some variable names, such as "size" or I guess "count". Yes, you have them as local variables and they should not be prepended with c:: or v::, because there is no Constant or Variable with such name. What I found is a bug in the function that does this prepend job and it happens only with certain names... it's a long story. I think I fixed this particular problem anyway.
-
RE: Normalize ID's cause deletion of all blocks with custom IDposted in Bug Reports
These blocks disappear from the project?
