EA based on a channel indicator
-
Hello fxDreema. I tried several ways, but I can not work.
The rule is simple:
Entry
Look to Buy when price touches begins to decline and the rising Mid-Donchian Channel. Enter When price trades one tick above previous bar. (Reverse for Sell).Stops
Place Stops just below the lowest low or Pullback (Reverse for Sell).
Exit
Exit Longs When price touches the High DC
Exit Shorts When price touches the Low DCFor more information about this indicator, see the problem solved here: viewtopic.php?f=3&t=2598&hilit=donchian
......
donchian_channels.mq5 -
I think the problem with this EA is that there are 2 "Price crossover Indicator" blocks placed one after another. I have made these more precise than the crossover in "Condition".
Each of these blocks knows the previous tick value, it uses that value and the present tick value to detect whether the price is crossing the indicator - below or above. Three values are compared - previous tick value, present tick value and the indicator value. A signal happens when the indicator value is between the two price values. The "problem" here is that the signals detected with this blocks are rare - you have the signal for 1 single tick only, on the next tick that signal is not there. These blocks detects the exact moment when the price crosses some value.
Compared to the crossover in "Condition" - there the signal is up to 1-candle-long. Even that way, using two crossovers one after another should be used in very special situations.
So, I think when there is some crossover to be detected, all the other conditions should be regular >, <, >= or <=.
-
Yes ... I am using two blocks of price x> indicator, and soon saw that it will be very difficult to be activated. How do I suggest this strategy to work? Please make a sample project so I can see and learn how.
-
My idea is to check only 1 crossover at a time. The second one can probably be something normal... let's say ">". Why don't you write down all the conditions that must be true at a given moment, this will tell you everything.
Well, there can be situation where you want some condition somewhere in the past. Something what was happened while ago, but not in a specific time or candle. Unfortunately I think that fxDreema becomes weak in this scenario. Is this your case? Note that you can have some crossover happened while ago, and then the opposite one.
-
__Unfortunately I think that fxDreema becomes weak in this scenario. Is this your case? Note that you can have some crossover happened while ago, and then the opposite one.[/quote:314cklvy]
Yes ... that's right. How do I?One idea is based on an indicator for this to be possible.
-
I don't know
I mean... I know how, but I can't suggest how to do it using blocks, it's a little bit weird
But if A crossed B in the past, no matter where, then at the present moment A is probably above B, so are you sure you can't use that simple condition? -
It may be as you see fit, provided that work properly.
How do I? Please show me an example of a project, if it is difficult.
-
But I don't think you need that anyway, this also probably makes the EA to go slower.
Why it's not enough to detect when the price crosses one line while the price also must be above/below other line? This insicator is like MA or Bollinger, just some lines, positive values for each candle, nothing special. I don't know what can't be done with simple ">" and "<" conditions.
-
So ... I tried this way:
To know the trend, I'm using turtle or indicator. The condition is if the Ask price is above the line Downtrend Breakout, and if the price crosses the line first period Donchian indicator, buy signal. Vice versa for sale.
But this acontendo that when Brekout Uptrend line appears, instead of just buying, selling this together, and this should not happen. I believe that is because the two lines are visible at the same time
Take the example of my project: https://fxdreema.com/shared/JwC23sDsc
-
You know that the price moves up and down, so multiple crossovers may happen in very short amount of time, especially with "Minimum turnover distance" parameter set to 1 pips. What happens now is that multiple crosses happen in very short period of time due to the moving price.
Again, this method of crossover checks where is the indicator level compared to the previous tick value and the present tick value. The indicator value can be still... it's probably moving... but ticks moves up and down for sure, so in just a few seconds the price can, and actually do, cross the same indicator point multiple times - above, below, above, below... This is how this specific block works. So I added this minimum turnover distance parameter to filter out repeated crossovers like this.
I thin you need some "Once per bar" and/or bigger value for the minimum turnover distance. Or use the crossover from "Condition" block. Or use Candle Open, Candle Close (or Bid) to compare them with the indicator value.
-
Ahhh, maybe there is another prtoblem in block 42!
See... when the indicator is not "visible" it still have some value, normally the biggest possible positive integer value is used. It's some numeric value that is like... millions... something very big. And this value is bigger than the Bid price for sure, so the condition it true even if the indicator is not "visible"
You can check it for visibility using "Indicator is visible" -
In fact, this working in parts. The problem with this indicator turtle, that from the second sign of the turtle, instead of respecting the trend also opens operations against the trend.
See the image. Problem with the indicator turtle now.
Actually I think it can also be a problem in the block or something.
......
Problema.PNG -
__Ahhh, maybe there is another prtoblem in block 42!
... You can check it for visibility using "Indicator is visible"[/quote:1bldbz6y]
Ok I'll be checking. -
Yeah ... I tried, but I could not do as the strategy calls. Unfortunately I will have to put aside.
Complete information on this strategy: https://www.youtube.com/watch?v=-DKb6Rutrig
If you can one way to do it, please let me know so I can finish this project. I'll be happy for it.
-
I want to say that I don't want to create complete EAs for people, what I want is to help people to understand fxDreema. In fact, fxDreema specifics are not very much - how to place blocks, how to modify parameters, how to connect, disconnect, what the inputs and outputs mean. Where people mostly fail is in the logic part of the project, so most of the time I repeat the same things again and again -> the basics of the EA.
The ability to detect problems is the best. It's a little bit hard in MT4 and MT5 to detect problems (to debug), you are looking at multiple events happened in time in a log that is very old school. Also working with numbers like 1.37292 is very intensive, especially for someone who is not friend with mathematics. But this is not impossible.
- To check when and where some block passes, use "Draw arrow"
- To check some value, variable, indicator value... anything numeric - use "Indicator tester"
- Also "Comment on chart" is good to visualize some values in realtime
Just train that, finding the problems with simple tools like the blocks above

This video... let's say that describing some strategy over the chart is easy and unfortunately not very realistic most of the time
Technically, it's a little bit different, here we work with data. Looking at the chart you can clearly say - this is uptrend and this is downtrend, but technically it's all about following very very specific rules, it's not that subjective. -
Yes .. a tendency to know, I use the pz-turtle indicator, which shows a blue line when this high, and color tomato when this low.
But I see that has helped me very much, and thank you for that. Are things we can not know the beginning, but with time I can learn. So I ask examples of models, because with them I add in my strategies and has perfected
-
Here is some example of the EA from the video... I believe...
https://fxdreema.com/shared/HszmN2poe
http://prntscr.com/4gpmx5It can be made with less blocks, but that's ok
-
Thank fxDreema! I see you have some ways to use the blocks and some variables. A good new part for me. Now I want to see if I can fit into my current strategy. Need only to add an external parameter to modify and optimize the periods, and some things the most.
-
Hello fxDreema
I noticed that some orders triggered the SL was far removed from the proposed strategy. Look at this SL:

It seems this wrong.
I would also, if possible, so that I can modify to backtest and optimize the execution: only opening price of candles, which is the fastest method of making the test strategy tester.
The Turtle EA I got, but this not the exact result.
......
Erro SL.png