I assume you are using "above" and "below" in your conditions.
Try using "cross above" and "cross below", with candle ID 1 
Posts made by roar
-
RE: Parbolic Sar Issueposted in Questions & Answers
-
RE: A Place to discuss, optimize and share profitable Ea's?posted in Questions & Answers
@wralyn I'll not bother to go into too much detail, but usually my approach is this:
- just sell highs and buy lows, timeframe M5 or M30. Use H4 orD1 to identify the general "market phase"
- find a way to do this so the effect of long trends is minimized
Sell at upper bollinger bands, macd cross, RSI 70, set limit orders above price...
Also, always filter out quiet periods using ATR or st.dev. You can't make profit if spread makes 20% of the micro-swing. -
RE: using swap rate as aconditionposted in Questions & Answers
@wralyn I agree. You don't need custom code in every project, but it does at least simplify certain things. Its pretty easy to google the necessary function from docs.mql4.com
-
RE: A Place to discuss, optimize and share profitable Ea's?posted in Questions & Answers
It's good to share ideas, but getting to a consensus on useful methods is pretty much impossible. That's why you don't see community-build strategies too often.
My thoughts:
- Don't use "close profitable trades" as your main exit. It is an easy way to get quick profits, but there is no way to tell how long the luck lasts. As a result, it just adds more uncertainty to your tests.
- Don't focuse on optimizing MA periods. If you need to use MA for trend, just pick some rough values and keep them, and find the profitable edge with some more clever algorithm. Millions of people have tried millions of MA combinations, that is not the magic we are looking for.
- You will use your profitable EA for years, so backtest it for 5-10 years. Use 50-50 optimizing and training period, if possible
Just my own foolish thoughts, don't put too much weight on them lol

-
RE: using swap rate as aconditionposted in Questions & Answers
Easiest to use this custom function:
https://fxdreema.com/shared/ExwS5XMUc

Here is more info about all available symbol info codes:
https://docs.mql4.com/constants/environment_state/marketinfoconstants#enum_symbol_info_doubleYou will need a DOUBLE -type data, because that data can use decimal points.
This is long swap, I challenge you to find out the short swap

-
RE: Unmatched data errorposted in General Discussions
I think it is not the code, but backtest data itself
-
RE: MQ5 convertion to MQ4posted in Questions & Answers
Well, most of the blocks will work if you just copy them. Trade and position blocks will need some fixing
-
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 https://fxdreema.com/shared/le2CyfDhb
I put my blocks to the project. Now it is closing the biggest losing trade, if winners cover it.
Note that this is not going to close the 2nd biggest loser, or 3rd biggest, it always focuses on the biggest.You can download the .mq4 and then import the file to your builder, the variables will come along that way.
-
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 You can share the project from the Projects-menu in upper left corner
-
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 I'm self tought, too - didn't visit this forum for a year or so when I started

Help is always positive, but in the end, you learn the fastest by trial and error -
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 Sorry, forgot to mention - I used variables in this project, and if you copy the blocks, you have to declare the same variables.
Update your constant and variables (find them in left panel, below project name) as these:


-
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 This should be pretty close: https://fxdreema.com/shared/cMfIpPQtd
It uses lots of loops, and thus not very easy to understand
First loop just finds the biggest loser.
Second loop starts going through all trades, starting from biggest winner. It makes a sum of the profits, and when that sum is bigger than the biggest loser, it activates 2 last loops: firstly it closes the loser, secondly it closes x number of biggest winners (x being TradeCount variable)Constants and variables are your best friends in FxDreema https://fxdreema.com/tutorial/builder/constants-and-variables
-
RE: How can i close a group of trades when they are in specific profit,EVEN there are multiple others running in loss?posted in Questions & Answers
@fxmich78 I made this very simple, we can improve from here if needed.
https://fxdreema.com/shared/MzuDN140b
How the logic goes in this:- If biggest losing trade is down $200 or more
-> Check if overall account is on profit (equity > balance)
-> If yes, close ALL trades
- If biggest losing trade is down $200 or more
-
RE: Getting a value into the Input boxposted in Questions & Answers
@line
First, create new constant:

Then use the constant in the adjust field:

-
RE: Variablesposted in Questions & Answers
@zackry Here:https://fxdreema.com/shared/Wfvtkbn6e
Note the OnTrade tab
-
RE: How to make that Close Condition !posted in Questions & Answers
@alexdepa Ok, good luck!
Personally I have zero interest in systems like this - the market doesn't care about your position management scheme, thus it will not generate a profit, only generates an illusion of profit.My advice: focus more on the chart, less on complicated position structures
-
RE: How to make that Close Condition !posted in Questions & Answers
@alexdepa I looked into it, the "once per bar" must reset the ActivateSystem variable - I think that is missing from the sell side.
Nice work applying my design, I really appreciate your diligence!
-
RE: How to add for Multi TimeFrameposted in Questions & Answers
https://fxdreema.com/shared/rC3Ka7V7e
I'd use something like this.. Some variables that can either be 0 or 1.
When all variables are 1, you can take your trade action, and then reset them all back to 0Note: orange output is TRUE, yellow is FALSE.
