I think I have to create some blocks to check the object name or description
This is not new, someone else was asking for this before. But something pops in my mind, I'm not sure, but there was some problem when working with descriptions... or I can be wrong, I'll see.
Posts made by fxDreema
-
RE: helpposted in Questions & Answers
-
RE: Entry Condition From Existing EAposted in Questions & Answers
You are talking for the input parameters of the EA? If yes, then use those "Constants": https://fxdreema.com/demo/mt4-constants
Otherwise inside the EA you can use "Variables": https://fxdreema.com/demo/mt4-variablesI will make the local build to try to connect the server first, and if not - to enter offline after 5 seconds, depending on the profile information that was previously received from the server.
-
RE: helpposted in Questions & Answers
Well, it matches the exact text, this is "==", which means "equal to" or "not different than" or "the same as". Why don't you try with EUR, USD and so on...
I also can admit that in fxDreema blocks for wotking with objects are not really powerful, so let's say that the whole scenario can be made more optimized in some custom block.
The best of all will be if the indicator itself gives you some meaningful information through it's buffers, but I expect that this is real-time-only, so there should not be many performance issues.One of the things I wanted to have when started fxDreema was the ability to use these news, but...

-
RE: The strategy from scratch questions and problemsposted in Questions & Answers
Custom MQL4 code executes the code but it does not care of it, it passes every time.
Once per bar contains similar code to what you are using there. It depends on where it is placed. On top level - it passes on the first tick that belongs to a new bar. Under some condition - it passes on the first tick where the condition becomes true, and if not already passes for that bar.
What drives the EA are ticks. In real-time you can create some infinite loop and check the current server time each second, but in backtesting if you do that the EA will stuck. Here is some example to check this: https://fxdreema.com/shared/DyKSy5S2c
So in short, in real-time we can detect the exact time where a new bar is created, but not in backtest. So Once per bar placed under the tick event works the same for both situations and it's pretty much accurate.
-
RE: helpposted in Questions & Answers
Can you give more details? How object names looks like (object named EURUSD sounds weird to me, there should be some prefix) and how your blocks looks like?
-
RE: What if, for ECN broker, the SL/TP failed to be set?posted in Questions & Answers
What is the error message?
This was months ago when we had to first create the trade and then in another request to place stops. EAs in MT4 are now capable of doing that in single request using the native MQL4 function OrderSend().
-
RE: Multi time frames EAposted in Questions & Answers
Yes. Well, it probably depends on what history data is available for those timeframes, especially in backtesting. You can try it actually, there is this "Timeframe" option available where it can be used: http://prntscr.com/3kxr21
-
RE: Trailing stop lossposted in Questions & Answers
The trailing stop block does not care of the original SL/TP values... normally. If the original SL is bigger than the one in the TS block, then that SL will be set to the value in TS. If the original SL is lower there will be no reaction until the distance between the current price and SL is big enough (trailing stop + trailing step).
Someone asked about these things before, you can read my explanations here: topic/2486
-
RE: Error:Indicator Cannot load Error code=4806posted in Bug Reports
Indicators don't appear on real-time anyway, they appear automatically only when backtesting. Those 3-4 errors are not fatal... normally. But obviously this indicator must be investigated. Well, I don't have it so I can suggest what to do. Use "Indicator tester" to see how the indicator behaves, or use "Draw arrow" (or something similar that prints something somewhere) to detect when some block passes.
-
RE: How to check previous trade level (losing) of the day?posted in Questions & Answers
Losing trade in steps 3 and 4?
Here is some example that hopefully can help to get the idea: https://fxdreema.com/shared/p0958FoA -
RE: Bug with Condition block & _OrderStopLoss Blockposted in Bug Reports
Ah, you are using the local version? Ok, I reuploaded it now because of other small problem with another person (081), you can ty it.
-
RE: History tape colorposted in Questions & Answers
How can you compile this indicator anyway?
// indicator parameters extern string Indi.Version= INDICATOR_VERSION; extern string TimeFrame.Settings="——————————————————————————————"; extern int TimeFrame.Period=0; // Timeframe: 0,1,5,15,30,60,240,1440 etc. Current Timeframe=0. extern int TimeFrame.Auto=1; // Automatically select higher TF. M15 and M30 -> H1. Off=0, 1st HTF=1, 2nd HTF=2 extern string Stoch.Settings="——————————————————————————————"; extern int Stoch.KPeriod=11; extern int Stoch.Slowing=3; extern int Stoch.MAMethod=MODE_SMA; // "<< SMA=0, EMA=1, SMMA=2, LWMA=3 >>"; extern int Stoch.PriceField=1; // "<< 0=High/Low, 1=Close/Close >>"; extern int Stoch.Low=20; extern int Stoch.High=80;With these "." in the variable names... at least I got errors about that.
Otherwise only your eyes care about colors, programs work with numbers. Buffers should give you data that represents those colors in some way, for example blue can be 1, red can be 0, or something else that means something and can be used from the EA.
-
RE: Stoch Divergence available? Custom indi attached here.posted in Questions & Answers
The best is if you have some indicator to do that. Doing indicator's job in an EA is not the very best thing to do

-
RE: Trailing Stop Blockposted in Questions & Answers
Start when profit is above is this Trailing Start that I described. The trade is skipped if it does not have enough profit.
New take profit... I think it tells it by itself. The block is designed to move SL, but optionally it can also modify TP. Not needed most of the time.
-
RE: Bug with Condition block & _OrderStopLoss Blockposted in Bug Reports
Don't try to fix error that comes from fxDreema, it's most probably some bug that I must fix, so reporting it is enough. You have extra days.
-
RE: Indicator rise / fallposted in Bug Reports
Maybe it's something in your project. I can point to some problems even now, for example this block "check age" is most probably not working correctly, because it's meant to be used that way.
Otherwise you can always check if some conditions are not working properly in separate project that is as simple as possible. In this one... very hard to say what is not working really. -
RE: Error:Indicator Cannot load Error code=4806posted in Bug Reports
This error shows 3-4 times when the EA starts or until the end of the backtest?
-
RE: Hedging tradeposted in Questions & Answers
Otherwise here are some examples of how to calculate sum of profits in multiple filtered trades: https://fxdreema.com/shared/78kNK7MQb
In the example on the left I reset the variable (SumofProfits) in block 1 before the block starts, see the additional panel for controlling variables. Then the profit of the current trade is added to the variable in block 2.
But I like when things takes less space, so in the right example everything happens in block 4... well... at least you should know what OrderProfit(), OrderCommission() and OrderSwap() means in MQL4.
V1 means the name of the variable. The real name can be used instead, but V1 will be renamed to what is the real name.When "For each trade" does it's job it goes to it's yellow output, so this is the exit after calculations where you can use that variable to compare it with something else.
-
RE: Hedging tradeposted in Questions & Answers
Blocks 5 and 11 are for average profit, not sum of profits. The other problem is that "For each trade" is supposed to work with other pink blocks from it's group. Those blue blocks at the end already have the "For each trade" functionality inside, they don't care of "For each trade" block that is used above.
The biggest problem here is how to compare the profit of 1 trade to the sum of profits of 2 other trades in different group. This can be made with some pink blocks and the result will be - too many blocks used for something relatively simple (but too "custom"). It will be a little bit better for all the logic to be in a single custom block, or two, but if you don't get MQL this block will be a black box with no options to customize.
But I wonder why you want to wait for 7 trades (and 7 more for the opposite type) to open another 1 (or 2), then to wait for that last 1 to become profitable, and not only this, but profitable enough compared to the last 2 of the initial 7. Well, I don't know the strategy exactly, maybe there is some reasonable logic that I can't see.
Meanwhile, I have unreleased block that gets the most losable trade (imagine that there is a mix of opened trades), then searches in other profitable trades for sum of profit that is bigger than that loss (with X money) and closes those trades (the biggest loss and profits). If it's only 1 trade it can close it when the desired profit is reached. Does a block like this sound good?