Then put something that will limit trades... by time, once per bar, something like that. Some other condition that is not true all the time, but when it's ok to create a new trade.
In your project you don't need those AND blocks.
Posts made by fxDreema
-
RE: Another trade executes after take profit was hitposted in Questions & Answers
-
RE: Calculation-problem with Lotsize: mql4, local version 082posted in Questions & Answers
Why do I feel that is can be easier. Here is almost the same thing: viewtopic.php?p=6259#p6259
And better don't use variables to organize lot size like this. I mean... what if the EA is restarted, all the temporary data will be lost and it will start from 0. But if you get data from trades and orders directly, everything will be fine. Well, it depends.
Also, if possible don't use those Trade statistics. When they are used, special mechanism is turned on, and this causes the whole EA to work slowed on backtest. -
RE: Can you tell me how to write to MQL5 this loop order?posted in Questions & Answers
On your account I see some MT4 project, not MT5. And it's a little bit wrong, Buy now and Sell now should come from both outputs of the previous block, not from the same output. Or you can download the .mq5 file from the project I give above, and then import that file in fxDreema.
-
RE: How to open new trade in the same direction when hit SLposted in Questions & Answers
About this project, I can't see how lot size depends on the trades, it depends on indicators. And in this scenarion I think you also have to use the "OR" block... check http://fxdreema.com/examples about this block to understand why.
Maybe you want to do this: http://prntscr.com/3nnjy3 - this is getting the lot size of the last closed trade (notice the parameter that is "1") and then use that lot size in Buy now. You can also use the yellow output of this pink block. -
RE: How to open new trade in the same direction when hit SLposted in Questions & Answers
You can try Buy now (Martingale), or the one for Custom Martingale. I have ideas to add all those betting systems as MM in Buy now/Sell now, but for now they are blocks.
Otherwise you can define some variable for the lot size and control it somehow.
Or if you ask for lot size that depends on the profit.... take a look at the available MM. -
RE: Can you tell me how to write to MQL5 this loop order?posted in Questions & Answers
What is that mean? When the position hits SL or TP it's gone. Then when that is detected, a new one is created.
-
RE: Can you tell me how to write to MQL5 this loop order?posted in Questions & Answers
Check the last closed position and open the opposite type: https://fxdreema.com/shared/1pqRSQkdb
-
RE: Stoch Divergence available? Custom indi attached here.posted in Questions & Answers
https://fxdreema.com/shared/bSz1KkGwe
Here is how to get signals from it's buffers, I draw arrows on the main chart when signals come.
Buffers 0 and 1 seems to work when candle offset >=2 is used, I used 2 for this example (look at Candle ID parameter).I also found a bug in fxDreema when adding an indicator with commented extern parameters like this one:
extern string separator1 = "*** Stochastic Settings ***"; /*extern int fastEMA = 12; extern int slowEMA = 26; extern int signalSMA = 9;*/ extern int KPeriod=8; extern int DPeriod=3;the result is that fxDreema reads more parameters than needed and then the backtester does some bad things.
Make sure that you have added that indicator with all the correct parameters, or clear that comment and add the indicator again:extern string separator1 = "*** Stochastic Settings ***"; extern int KPeriod=8; extern int DPeriod=3; -
RE: I could not use the local versionposted in Bug Reports
I can see that the name of the project contains ">", which can't be used in a filename, and output filenames are the same as the project names. Well, maybe I should do something about it, to disallow such letters or something else, but I think it's better to name the projects as they will appear in the /MQL4 directory as files, at least you will be afle to find them later.
For each block there is some description (Information) and here http://fxdreema.com/examples there are some basic examples that I want everyone to really understand, but people often skip this one

-
RE: Feature Request: EA Search/Favoritesposted in Questions & Answers
I also don't like this menu
By the way when you hit the green title (for example Name) that row sorts by name... at least it works on the web version... well, it's something. -
RE: helpposted in Questions & Answers
With some custom loop? This is example of simple trailing stop, but something more can be added to this: https://fxdreema.com/demo/mt4-loop-trailing-stop
-
RE: FEATURE REQUEST: "Save As..." optionposted in Questions & Answers
There is no such option. It depends by the way, you are probably talking for the local desktop version, because normally for the web one it pops Save as every time.
Well, you can always create a copy of some .mq4/.ex4 file that was generated. Then the same file can be again imported as a project. -
RE: Problem with conditionsposted in Questions & Answers
Somewhere in Condition -> Market properties you can find Lowest/Highest options, or just use the High point of the weekly candle. Compare this value to the current candle high, and I guess it will work that way.
-
RE: The strategy from scratch questions and problemsposted in Questions & Answers
There is no block like this, and I'm not sure how can you easily make it with pink blocks without using too many of them. The best will be as a custom code (which I will be unable to create because I'm going out this holiday).
This sounds to me: set TP for group of trades as the equivalent of X pips for Y lots in market Z. And it will be something complex as a block, because multiple factors must be considered - trade types, lots, markets....
Otherwise if the market is like EURUSD where the value of 1 pip is fixed, it should be easier
-
RE: The strategy from scratch questions and problemsposted in Questions & Answers
For all trades as a group or for all trades - individually? Because there is Break even to do that for each one individually. As a group... it depends here, especially when you mix trade types, lot sizes, markets, pips, money and who knows what else. One easy way is to monitor equity-balance and close them all
-
RE: Problem with conditionsposted in Questions & Answers
http://prntscr.com/3lr7tx
Those are unfortunately called "global variables", but they are different kind of global variables: https://fxdreema.com/documentation/proj ... metatrader
Use Value -> Numeric there (it will work with boolean) -
RE: Problem with conditionsposted in Questions & Answers
Maybe the condition is somehow wrong? I can see your project, but there is no condition at the moment. By the way blocks 8 and 9 are not to be used there, these are actually for pending orders. But if you have some pending orders anyway, you should also put "For each Pending Order" to select the pending order(s) to be modified.
-
RE: helpposted in Questions & Answers
I uploaded build 082, get it now. Tell me if there are problems with this.
-
RE: balanceposted in Questions & Answers
Set a Variable: https://fxdreema.com/demo/mt4-variables
Some people are using the Formula block, which is similar... but I will recommend Variables.